swingwt-developers Mailing List for SwingWT (Page 4)
Status: Beta
Brought to you by:
bobintetley
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(16) |
Feb
(20) |
Mar
(10) |
Apr
(35) |
May
(117) |
Jun
(41) |
Jul
(14) |
Aug
(19) |
Sep
(14) |
Oct
(5) |
Nov
(7) |
Dec
(4) |
2005 |
Jan
(29) |
Feb
(38) |
Mar
(32) |
Apr
(17) |
May
(5) |
Jun
(15) |
Jul
(2) |
Aug
(9) |
Sep
(5) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
|
Feb
(1) |
Mar
(30) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(4) |
2007 |
Jan
(5) |
Feb
(12) |
Mar
(9) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
(7) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Scott C. <sc...@co...> - 2006-03-11 21:56:55
|
On Sat, 2006-03-11 at 16:14 +0000, Robin Rawson-Tetley wrote: > > I'm going to try to understand this a little more, but it seems like I > > need to make a new EventQueue so it uses the same event thread as swt. > > I think your problem might be the postEvent(AWTEvent) method of EventQueue - > it's currently wrapping SwingUtilities.invokeLater. This could > probably be switched to SwingUtilities.invokeAndWait to block the > dispatch thread while the event is handled (which may solve your > problem). > > This is assuming you're using swingwt.awt.EventQueue of course :-) I can't directly use swingwt.awt.EventQueue because I need to handle java.awt.Event and java.awt.* components. See below for a note about this. So instead I'm using the java.awt.EventQueue. And it seems I can't change it to only use the swt event thread. But that turned out not to be the problem. The problem was the SWTGraphics2DRenderer.create method returns "this". javax.swing makes extensive use of creating duplicate graphic objects and then disposing them. So I needed to fix the create method to return duplicates. I did it in my wrapper class because it can keep track of a control to make a new GC with. Now that I fixed that, it is at least painting. It isn't painting correctly, but the reasons are obvious so far. So far I've been doing a manual wrapping of the necessary swingwt classes. Because I need pass the incoming java.awt objects to swingwt.awt objects. And then I need to return the resulting swingwt object as awt object. This has been manageable, but a better option would be to use bcel to create versions of the required swingwt classes that can handle real awt objects. Scott |
From: Robin Rawson-T. <ro...@ra...> - 2006-03-11 16:14:08
|
> I'm going to try to understand this a little more, but it seems like I > need to make a new EventQueue so it uses the same event thread as swt.=20 I think your problem might be the postEvent(AWTEvent) method of EventQueue - it's currently wrapping SwingUtilities.invokeLater. This could probably be switched to SwingUtilities.invokeAndWait to block the dispatch thread while the event is handled (which may solve your problem). This is assuming you're using swingwt.awt.EventQueue of course :-) Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Scott C. <sc...@co...> - 2006-03-11 16:00:50
|
I've got it to the point of showing a frame when I start an simple swing application. It isn't painting yet though. I think the issue is with the event threads. I started by using the java.awt EventQueue, but that makes a new thread to handle the awt events. This seems to be bad because: - an swt event comes in which I translate to a awt event and post to the awt queue - when the event is handled the SWTGraphics2DRenderer class is used to draw. That class uses the invokeSync method. Which should be blocking the awt thread, but sometimes it seems the awt thread isn't blocked, so then the GC object is disposed too soon. I'm going to try to understand this a little more, but it seems like I need to make a new EventQueue so it uses the same event thread as swt. Scott |
From: Scott C. <sc...@co...> - 2006-03-11 15:41:54
|
I remembered something I should tell you about, I uncommented a commented out line, in Cursor.java: case(MOVE_CURSOR): retCursor = pre_move; break; // -- Same as Resize.. I assume this was commented out for a reason. However, without it I was getting a NPE. On Sat, 2006-03-11 at 08:56 +0000, Robin Rawson-Tetley wrote: > > One thing that I found is that JSeparator is supposed to work in any > > component. I did some hacking so that it would at least run in this > > situation, but changing the class hierarchy might be a better way. > > But that would break the dynamic classloader? All class hierarchies have > to match. Actually the current swingwt hierarchy for JSeparator is not correct. >From my 1.4.2.10 javadocs it should be: java.lang.Object extended byjava.awt.Component extended byjava.awt.Container extended byjavax.swing.JComponent extended byjavax.swing.JSeparator In swingwt it includes the AbstractButton and JSWTMenuComponent. I was suggesting having JSeparator not extend JSWTMenuComponent. It seems like things work ok with the dynamic classloader when the hierarchies don't completely match. > > > I didn't find an easy way to handle JComboBoxes that have custom > > ListCellRenderers. It seems like swt combo boxes can only handle > > strings. Is there some kind of extended combo box that could be used? > > Nope, we'd have to write one - you could probably reuse the custom table > cell rendering code and use events to hide/show the table (or something > like it) portion representing the dropdown. > > I still think it's important to use the native one unless someone > really wants custom combo rendering (the purpose of SwingWT is very much > to offer native components where possible). Great. I'll look into that more. Scott |
From: Robin Rawson-T. <ro...@ra...> - 2006-03-11 08:56:51
|
> http://www.concord.org/~scytacki/files/swingwt-2006031000.patch Thanks! Applied and in the CVS repository now. > There are some files in that patch that you probably want to skip, like > the changes to the eclipse project files so things compile and run on my > machine. =20 Done. > One thing that I found is that JSeparator is supposed to work in any > component. I did some hacking so that it would at least run in this > situation, but changing the class hierarchy might be a better way.=20 But that would break the dynamic classloader? All class hierarchies have to match. > I didn't find an easy way to handle JComboBoxes that have custom > ListCellRenderers. It seems like swt combo boxes can only handle > strings. Is there some kind of extended combo box that could be used? Nope, we'd have to write one - you could probably reuse the custom table cell rendering code and use events to hide/show the table (or something like it) portion representing the dropdown. I still think it's important to use the native one unless someone=20 really wants custom combo rendering (the purpose of SwingWT is very much to offer native components where possible). > You see an ugly screen shot of Squiggle running in swingwt. It doesn't > actually display any svg documents, but at least it loads. Very impressive! > It also uses the GlyphVector a lot. However I didn't see a way to get at > the Glyph information from swt fonts. I did see that in 3.2 there will > at least be GlyphMetrics in swt, so hopefully that will make > it easier to implement the Glyph* classes. Interesting - we're about to move to 3.2M5 in the CVS this week. Thanks again for the code! Kind regards, Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Scott C. <sc...@co...> - 2006-03-10 20:15:12
|
Here is a patch that includes the last patch plus lots more: http://www.concord.org/~scytacki/files/swingwt-2006031000.patch There are some files in that patch that you probably want to skip, like the changes to the eclipse project files so things compile and run on my machine. One thing that I found is that JSeparator is supposed to work in any component. I did some hacking so that it would at least run in this situation, but changing the class hierarchy might be a better way. I didn't find an easy way to handle JComboBoxes that have custom ListCellRenderers. It seems like swt combo boxes can only handle strings. Is there some kind of extended combo box that could be used? You see an ugly screen shot of Squiggle running in swingwt. It doesn't actually display any svg documents, but at least it loads. http://www.concord.org/~scytacki/files/squiggle-swt.png It uses the shape and transform classes of java extensively. The shapes and transforms are easy to implement with the new features in 3.1 I think the implementations in swt are mostly native so this might mean graphics2d could run faster on swingwt. It also uses the GlyphVector a lot. However I didn't see a way to get at the Glyph information from swt fonts. I did see that in 3.2 there will at least be GlyphMetrics in swt, so hopefully that will make it easier to implement the Glyph* classes. Scott |
From: Robin Rawson-T. <ro...@ra...> - 2006-03-10 18:23:31
|
> I'm using all the new stuff in swt 3.1. I hope that is ok. I wonder if > that will make swingwt have problems on limited devices like handhelds. > 3.1 has affine transforms and paths both with identical functionality to > graphics2d. That's fine - most of SwingWT relies on fixes in 3.1 anway. > I'll send another patch latter today, hopefully with a screen shot.=20 Thank you! Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Scott C. <sc...@co...> - 2006-03-10 15:01:42
|
I've got a lot more of Graphics2D working. More shapes, AffineTransform... I'm using all the new stuff in swt 3.1. I hope that is ok. I wonder if that will make swingwt have problems on limited devices like handhelds. 3.1 has affine transforms and paths both with identical functionality to graphics2d. My target right now is to have enough support to at least start batik's Swiggle Browser with the translating classloader. I had to disable its security stuff because that messes up the classloader. But now I'm well on the way. I'll send another patch latter today, hopefully with a screen shot. Scott On Fri, 2006-03-10 at 08:04 +0000, Robin Rawson-Tetley wrote: > > I attached a patch of what I've change so far. Here is a summary: > > added awt.BasicStroke > > updated Component - fixed bug where mouse drag was fired after release > > it should be fired before. > > updated Graphics2D - uses new RenderingHints.Key class > > updated awt.geom.Line2D > > updated awt.geom.Point2D > > added awt.geom.uadCurve2D > > added awt.image.IndexColorModel > > added awt.image.RGBImageFilter > > added x.swing.GrayFilter > > updated awt.SWTGraphics2DRenderer - > > added implementation of draw(Shape s) that only handles Line2D objects > > I have been careful to only use the javadocs and not the source code for > > swing when I implement these classes. > > Fantastic! This is exactly the area of SwingWT that needs more > development - thanks! I'll get it included this weekend (currently away > from home) > > Rob > |
From: Robin Rawson-T. <ro...@ra...> - 2006-03-10 08:05:31
|
> I attached a patch of what I've change so far. Here is a summary: > added awt.BasicStroke > updated Component - fixed bug where mouse drag was fired after release > it should be fired before. > updated Graphics2D - uses new RenderingHints.Key class > updated awt.geom.Line2D > updated awt.geom.Point2D > added awt.geom.uadCurve2D > added awt.image.IndexColorModel > added awt.image.RGBImageFilter > added x.swing.GrayFilter > updated awt.SWTGraphics2DRenderer -=20 > added implementation of draw(Shape s) that only handles Line2D objects > I have been careful to only use the javadocs and not the source code for > swing when I implement these classes. Fantastic! This is exactly the area of SwingWT that needs more development - thanks! I'll get it included this weekend (currently away =66rom home) Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Scott C. <sc...@co...> - 2006-03-09 18:34:12
|
Thanks Curt. I was looking for projects like the links you sent. The swing implementation of awt is particularly interesting. Passing that through the translating classloader might be exactly what I want. Finding the the SwingWTBootstrap class was a joy. :) I postponed the awt implementation while I see how much work it is to make some of our applications work with that Bootstrap loader. I've fixed several things in SwingWT. I attached a patch of what I've change so far. Here is a summary: added awt.BasicStroke updated Component - fixed bug where mouse drag was fired after release it should be fired before. updated Graphics2D - uses new RenderingHints.Key class updated awt.geom.Line2D updated awt.geom.Point2D added awt.geom.uadCurve2D added awt.image.IndexColorModel added awt.image.RGBImageFilter added x.swing.GrayFilter updated awt.SWTGraphics2DRenderer - added implementation of draw(Shape s) that only handles Line2D objects I have been careful to only use the javadocs and not the source code for swing when I implement these classes. If there is something wrong with the code format or you want more comments just let me know. Scott On Wed, 2006-03-08 at 15:57 -0600, Curt Cox wrote: > No, but I've tried similar stuff for completely different reasons. > > It looks possible at first, but the list of things you have to > implement quickly grows out of control--Toolkit, Graphics2D, Image, > BufferedImage, VolatileImage, GraphicsEnvironment, AWT peers. There > are classloader and order complications. The GraphicsEnvironment and > Toolkit implementations provided by Sun are tightly interdependent. > This is true of the entire package to a lesser extent. > > Still, people have had some luck doing similar things. Below are some > links you might find useful or at least interesting. > > Good luck and please share you success, failure, joy, and frustration. > > - Curt > > Remote AWT > http://www.eli.sdsu.edu/courses/spring99/cs696/notes/remoteAWT/remoteAWT.html > http://www.alphaworks.ibm.com/tech/remoteawtforjava > > Remote SWT > http://rswt.sourceforge.net/quickstart.html > > Swing implementation of AWT. LAOS (light awt over swing) > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jdistro/source/src/com/memoire/laos/ > > The Janux Project includes an implementation of Swing on top > of the Linux FrameBuffer. > http://janux.sourceforge.net/ > > PJA (Pure Java AWT) Toolkit is a Java > http://www.eteks.com/pja/en/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd_______________________________________________ > Swingwt-developers mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swingwt-developers |
From: Curt C. <cu...@gm...> - 2006-03-08 21:57:31
|
No, but I've tried similar stuff for completely different reasons. It looks possible at first, but the list of things you have to implement quickly grows out of control--Toolkit, Graphics2D, Image, BufferedImage, VolatileImage, GraphicsEnvironment, AWT peers. There are classloader and order complications. The GraphicsEnvironment and Toolkit implementations provided by Sun are tightly interdependent. This is true of the entire package to a lesser extent. Still, people have had some luck doing similar things. Below are some links you might find useful or at least interesting. Good luck and please share you success, failure, joy, and frustration. - Curt Remote AWT http://www.eli.sdsu.edu/courses/spring99/cs696/notes/remoteAWT/remoteAWT.ht= ml http://www.alphaworks.ibm.com/tech/remoteawtforjava Remote SWT http://rswt.sourceforge.net/quickstart.html Swing implementation of AWT. LAOS (light awt over swing) http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jdistro/source/src/com/memoi= re/laos/ The Janux Project includes an implementation of Swing on top of the Linux FrameBuffer. http://janux.sourceforge.net/ PJA (Pure Java AWT) Toolkit is a Java http://www.eteks.com/pja/en/ |
From: Scott C. <sc...@co...> - 2006-03-08 21:23:29
|
Has anyone tried to extend java.awt.Toolkit with SwingWT. I know there is a Toolkit class in SwingWT but that isn't quite what I'm talking about. In awt you can extend the java.awt.Toolkit class and then set the awt.toolkit system property to be this classname. This is how the different platforms (windows, linux, osx) implement their platform specific version of awt. If java.awt.Toolkit was extended using SwingWT that basically means we would now have an awt implementation that uses SWT instead of directly using native components. I'm interested in this because on OSX it is currently not possible to embed Swing components in SWT. They are getting closer, but it sounds like it will be a while. This can be done with SwingWT, but it requires changing the swing components to use the new package name. I'd prefer not to do that. But if there is a swingwt awt implementation things should work. This won't be very efficient, so it will probably be slower than direct swing on osx, and definately slower than direct swingwt. As I understand it now, it would take: - Extending java.awt.Toolkit - Implementing several of the awt peer interfaces. - Extending java.awt.EventQueue >From a high level this doesn't sound too bad. Most of the hard work has already been done by SwingWT. It seems like just a mater of connecting lot of classes together. Most of the new classes can be wrappers around SwingWT class. But I'm probably missing something. If I can get this to work would you be interested in including functionality like this in the SwingWT project? Scott |
From: Scott C. <sc...@co...> - 2006-03-08 20:36:42
|
I just checked out the code from cvs and started looking at it in Eclipse. I ran into the following issues: - Missing libraries: the lib/linux_gtk2/swt-mozilla.jar and lib/linux_gtk2/swt-pi.jar could not be found. That wasn't a big deal I just removed them from the project libraries - test folder is added as a source folder. This screws up eclipse because it strips the test from the package name so now the declared packages in all the test classes is wrong. This can be fixed by removing the test source folder and removing the exclusion from the root source folder from the eclipse project. - JLabel and JComponent packages. These are package names inside of the test folder. This is bad because Java and Eclipse discourage class names that match package names. check out this thread for more info: http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg17061.html The fix for this is to rename the packages. But becareful not to propagate the change to references, otherwise all the classes where JComponent is imported will get screwed up. Scott |
From: Robin Rawson-T. <ro...@ra...> - 2006-03-01 19:16:16
|
> Not having used SwingWT in some time now, I plan on retiring as its > Debian maintainer. As I do so and to decide the package's future in > Debian, I was wondering what your current activity in the project is? I've not had much time for extra-curricular activites over the last few months (Christmas, my birthday and now arranging my wedding), however I have resumed development on SwingWT recently (experimenting with SWT 3.2M5 and=20 finally looking at printing/drag and drop support) so there will be further releases. Sorry to hear you're retiring as maintainer - does this mean SwingWT=20 will drop out of Debian, remain (but orphaned), or will another maintainer= =20 take it on? Kind regards, Robin --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Shaun J. <sja...@gm...> - 2006-02-27 20:56:40
|
SGVsbG8gUm9iaW4sCgpOb3QgaGF2aW5nIHVzZWQgU3dpbmdXVCBpbiBzb21lIHRpbWUgbm93LCBJ IHBsYW4gb24gcmV0aXJpbmcgYXMgaXRzCkRlYmlhbiBtYWludGFpbmVyLiBBcyBJIGRvIHNvIGFu ZCB0byBkZWNpZGUgdGhlIHBhY2thZ2UncyBmdXR1cmUgaW4KRGViaWFuLCBJIHdhcyB3b25kZXJp bmcgd2hhdCB5b3VyIGN1cnJlbnQgYWN0aXZpdHkgaW4gdGhlIHByb2plY3QgaXM/CgpDaGVlcnMs ClNoYXVuCg== |
From: Robin Rawson-T. <ro...@ra...> - 2005-12-29 10:12:37
|
> actionPerformed(ActionEvent event) > event.getActionCommand() is the empty string, but when running with swing= it is "comboBoxChanged". Must have missed that one. > I'm not very familiar with swing, awt or java for that mater, so if this = is an incorrect way of doing things, please direct me. If you want to trap the combo changing, JComboBox provides two event classes - one with info about the previous/new selection and one without. 1. Call [JComboBox].addChangeListener() and implement the ChangeListener interface in either your class or a new anonymous inner class. ChangeEvent only includes the source of the event (the combo) 2. Call [JComboBox].addItemListener() and implement the ItemListener interface in either your class or a new anonymous inner class. ItemEvent includes a reference to the selected object in the combo. ItemEvents are also fired when setSelectedIndex/Item is called in code (unlike ChangeEvent) The ActionListener/Event stuff is a leftover from AWT and not the best way of picking out specific events (although we do include it for compatibility - looks like you found a hole) > JFrame.setDefaultLookAndFeelDecorated(true); > doesn't work, but I guess this is quite reasonable since in http://java.s= un.com/docs/books/tutorial/uiswing/learn/example1.html Obviously, SwingWT uses SWT to provide native widgets to get the platform look and feel. You can't therefore ask SwingWT to render your window decorations instead of the platform so the call is meaningless for our use. Regards, Rob --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: <seg...@cl...> - 2005-12-29 01:03:02
|
Hi. I've just started having a look at SWT at tested it with the swing examples at: http://java.sun.com/docs/books/tutorial/uiswing/learn/example5.html I'm having the following problems: in LunarPhasesSWT.java actionPerformed(ActionEvent event) event.getActionCommand() is the empty string, but when running with swing it is "comboBoxChanged". I'm not very familiar with swing, awt or java for that mater, so if this is an incorrect way of doing things, please direct me. Another problem is that ActionEvent doesn't have a paramString method, but I see it in the specification. http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/ActionEvent.html JFrame.setDefaultLookAndFeelDecorated(true); doesn't work, but I guess this is quite reasonable since in http://java.sun.com/docs/books/tutorial/uiswing/learn/example1.html "Note: The following line of code applies decorative borders and window titles to frames. However, it works only as of v1.4. If you're using an earlier version, you'll need to comment out this code. JFrame.setDefaultLookAndFeelDecorated(true);" I made all test using gcj on linux with version 0.87. Code attached. Thank you all in advance. -- Cláudio Valente |
From: Andriy P. <ap...@ya...> - 2005-11-04 18:39:24
|
Bob, while researching possibility of using SwingWT for our application I stumbled upon infinite recursion. Our component overloaded setLocation() method called setLocation with other signature, which in turn called super. Super forwarded call to the method with first signature forming a recursion. I broke recursion making both Component.setLocation methods to call common implementation. Here is the fix. Hope it will explain thing clearer than myself ;-) BTW, message to the email address you mentioned on the home page (...@users.sourceforge.net) bounced back. Thank you for the nice library. Good luck. Andriy Palamarchuk __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |
From: Curt C. <cu...@gm...> - 2005-10-18 16:42:23
|
Rob, I'm trying to run some existing Swing code with SwingWT. Being lazy, I trie= d the SwingWTClassLoader approach. That failed with a ClassFormatError. Scanning the list archives, it looks like a known problem. http://sourceforge.net/mailarchive/forum.php?thread_id=3D7675075&forum_id= =3D36987 "In a word - no. Not until GCJ/Classpath and Kaffe are up to the 5.0 spec anyway." - Rob Do you know what's going on here, or do you feel it's not worth investigating until the tools you use support the 5.0 spec? Moreover, the SwingWTClassLoader appears to be a common source of questions for the list. Perhaps it warrants an entry in the FAQ. I run with Sun's JDK 1.5.0_05 on Windows, Linux, and Solaris, so I might take a stab at this. Any additional information about where to start would be appreciated. Thanks, Curt Just in case it can help anybody, here's my stack trace. Caused by: java.lang.ClassFormatError: LVTT entry for 'i' in class file generic/gui/event/AbstractEventSource does not match any LVT entry at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.lang.ClassLoader.defineClass(ClassLoader.java:465) at swingwt.classloader.SwingWTClassLoader.transform(SwingWTClassLoader.java :93) at swingwt.classloader.SwingWTClassLoader.findClass(SwingWTClassLoader.java :64) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java :106) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java :74) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.lang.ClassLoader.defineClass(ClassLoader.java:465) at swingwt.classloader.SwingWTClassLoader.transform(SwingWTClassLoader.java :93) at swingwt.classloader.SwingWTClassLoader.findClass(SwingWTClassLoader.java :64) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java :106) at swingwt.classloader.SwingWTClassLoader.loadClass(SwingWTClassLoader.java :74) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.privateGetPublicMethods(Class.java:2488) at java.lang.Class.getMethods(Class.java:1406) at sun.misc.ProxyGenerator.generateClassFile(ProxyGenerator.java:409) at sun.misc.ProxyGenerator.generateProxyClass(ProxyGenerator.java:306) at java.lang.reflect.Proxy.getProxyClass(Proxy.java:484) at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:564) |
From: Robin Rawson-T. <ro...@ra...> - 2005-09-24 16:48:31
|
On Saturday 24 September 2005 16:10, Marcelo Romulo Fernandes wrote: > Lesser General Public Licence for more details. > Aborted I saw this behaviour previously under GCC 3.3 and it seemed to clear up wit= h=20 GCC 3.4 Rob =2D-=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: Marcelo R. F. <ma...@pe...> - 2005-09-24 15:10:49
|
I'm evaluating java native compilation alternatives, and I'm interested in swingwt. I'm using mandrake 10.2, gcc(gcj) 3.4.3, mozilla 1.7.6. Swingwtdemo compiled ok, but I've got the following error when i run: [marcelo@einstein ~]$ swingwtdemo This is SwingWT (http://swingwt.sourceforge.net) Version: 0.87 (020605)[SWT gtk 3123] Copyright(c)2003-2005, R.Rawson-Tetley and other contributors. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public Licence for more details. Aborted Thanks for help in advance. marcelo |
From: <ser...@gm...> - 2005-09-20 02:45:30
|
Hello robbin,=20 Thank you for the last solution. man, I thinking about to develop an application with this library, but I need one specific feature when I use the JEditorPane. well, I need in this application get from JEditorPane the selected text by user. with javax.swing.JEditorPane we can use the getAccessibleText() and use it to get the selected text in that moment. I just would like to know, if is it already possible in swingwt thank you, for your attention |
From: Robin Rawson-T. <ro...@ra...> - 2005-09-19 15:00:33
|
The component you pass as the parent must be the child of a visible container as the filechooser attempts to find the top level parent of it to lock the modal dialog to it. Instead of a new JPanel(), give it the reference to some kind of JFrame that you have visible on screen and it will be fine. Regards, Rob On Fri, Sep 16, 2005 at 04:20:26PM -0400, Sergio Afonso Lima Franco de S? J= r. wrote: > Hello,=20 >=20 > I'm having a problem when I try to call the method > showDirectorySelectDialog in the JFileChooser class. > well, i have to give two parameters. >=20 > this is the code:=20 >=20 > public String getDir(){ > JFileChooser jfc =3D new JFileChooser(); > JPanel p =3D new JPanel();=09 > jfc.showDirectorySelectDialog(p,"Chooser your site directory,pleased"); > return "fsd"; > } >=20 > and this is the error : >=20 > Exception in thread "main" java.lang.NullPointerException > at swingwtx.swing.JFileChooser.showDirectorySelectDialog(JFileChooser.ja= va:512) > at hotdebye.modules.FileView.actions.ChooseDirAction.getDir(ChooseDirAct= ion.java:48) > at hotdebye.modules.FileView.FileViewer.<init>(FileViewer.java:30) > at hotdebye.HotDebye.<init>(HotDebye.java:19) > at hotdebye.HotDebye.main(HotDebye.java:48) >=20 > looking the JFileChooser source, I supposed that the method > getSWTPeer().getShell() is returning null. >=20 > can someone help me ? >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Downl= oad > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Swingwt-developers mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swingwt-developers >=20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Robin Rawson-Tetley (ro...@ra...) Jabber: bob...@ja... Yahoo: bobintetley MSN: bobintetley Home: http://www.rawsontetley.org I prefer encrypted email. Download my public key from http://www.rawsontetley.org/rrtpk.asc |
From: <ser...@gm...> - 2005-09-16 20:20:32
|
Hello,=20 I'm having a problem when I try to call the method showDirectorySelectDialog in the JFileChooser class. well, i have to give two parameters. this is the code:=20 public String getDir(){ =09JFileChooser jfc =3D new JFileChooser(); =09JPanel p =3D new JPanel();=09 =09jfc.showDirectorySelectDialog(p,"Chooser your site directory,pleased"); =09return "fsd"; =09} and this is the error : Exception in thread "main" java.lang.NullPointerException =09at swingwtx.swing.JFileChooser.showDirectorySelectDialog(JFileChooser.ja= va:512) =09at hotdebye.modules.FileView.actions.ChooseDirAction.getDir(ChooseDirAct= ion.java:48) =09at hotdebye.modules.FileView.FileViewer.<init>(FileViewer.java:30) =09at hotdebye.HotDebye.<init>(HotDebye.java:19) =09at hotdebye.HotDebye.main(HotDebye.java:48) looking the JFileChooser source, I supposed that the method getSWTPeer().getShell() is returning null. can someone help me ? |
From: Laurent D. <deb...@gm...> - 2005-08-31 07:07:24
|
Thank you! :D I also have for each .bat file to replace each : by a ; for the -cp=20 argument. And indeed the java -h command says we have to do such. Also the "ant -Dsun=3Dno" did not produce a correct .jar file. It did not= =20 contain swingwtx. So I used the following command to get a working jar: D:\j2sdk1.4.2_04\bin\jar.exe -cf0 swingwt.jar java javax swingwt swingwtx Last but not least, when I want to load a swing sample of my own I get : java.lang.IllegalAccessException: Class swingwt.classloader.SwingWTBootstrapcan not access a member of class Calc with modifiers "public static" at sun.reflect.Reflection.ensureMemberAccess at java.lang.reflect.Method.invoke at swingwt.classloader.SwingWTBootstrap.main(SwintWTBootstrap.java:75) The code is import javax.swing.*; class Calc { public static void main(String[] args) { JFrame window =3D new CalcGUI(); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); window.setVisible(true); }//end main }//endclass Calc Any idea? Thank you for your help. On 8/30/05, Robin Rawson-Tetley <ro...@ra...> wrote: >=20 > Delete the Graphics2DRenderer class in the custom package - it isn't > necessary for normal operation and is there to interoperate with a Sun > Java2D. >=20 > Given that nobody really uses this class and it causes a pain in the ass= =20 > for so many people, I think I may remove it from the repository (or at > least, move it out of the default build). Complaints anyone? >=20 > Rob >=20 > On Tue, Aug 30, 2005 at 07:56:38PM +0200, Laurent Debacker wrote:=20 > > Hi > > > > I wanted to first search the mailing list archive to search a solution= =20 > to my > > problem but couldn't find a search box. > > > > So I tried to compile SwingWT on Windows with sun jdk1.4 . I ran 'ant > > -Dsun=3Dno' because I want to get jar files for ikvm. > > > > javac tell me SwingWT\javax\custom\Graphics2DRenderer.java:102: > > cannot resolve symbol: method getRGB(int,int,int,int,int[],int,int)=20 > > localtion:class java.awt.image.BufferedImage > > awtImage.getRGB(clipX, clipY, clipW, clipH, awtPixels, 0, clipW); > > > > So I looked at the source code of BufferedImage, but doesn't contains= =20 > much, > > since it extends Image, I looked the code and also coundn't fine a=20 > getRGB > > method. > > > > Could someone tell me what to do please? > > > > Thanks! > > Laurent. >=20 > -- > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=20 > Robin Rawson-Tetley (ro...@ra...) >=20 > Jabber: bob...@ja... > Yahoo: bobintetley > MSN: bobintetley >=20 > Home: http://www.rawsontetley.org >=20 > I prefer encrypted email. > Download my public key from http://www.rawsontetley.org/rrtpk.asc=20 >=20 >=20 > |