|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
<Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHello,
To implement the new GTK file chooser I've started this open source project: http://code.google.com/p/gtkjfilechooser/ I've just released the first beta version tested on Fedora 10 and Ubuntu 9.04 and I'd like to integrate it in the JDK: how do we do that? You can already run a full working demo, download the .zip for the last version, unpack it and run $ java -jar gtkjfilechooser-demo.jar Other useful infos are in the wiki pages. I'm looking forward to hearing your feedback Best Regards, Costantino - Stuttgart, Germany |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHi Costantino,
I've tried to run the demo but I got the next exception: java -jar gtkjfilechooser-demo.jar Exception in thread "main" java.io.IOError: java.io.FileNotFoundException: Cannot find resource null at eu.kostia.gtkjfilechooser.GettextResource.<init>(GettextResource.java:187) at eu.kostia.gtkjfilechooser.I18N.<clinit>(I18N.java:45) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.installStrings(GtkFileChooserUI.java:752) at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:241) at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:156) at javax.swing.JComponent.setUI(JComponent.java:664) at javax.swing.JFileChooser.updateUI(JFileChooser.java:1787) at javax.swing.JFileChooser.setup(JFileChooser.java:374) at javax.swing.JFileChooser.<init>(JFileChooser.java:347) at javax.swing.JFileChooser.<init>(JFileChooser.java:300) at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.<init>(FileChooserDemo.java:135) at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.main(FileChooserDemo.java:638) Caused by: java.io.FileNotFoundException: Cannot find resource null ... 12 more Regards, Pavel > Hello, > > To implement the new GTK file chooser I've started this open source project: > http://code.google.com/p/gtkjfilechooser/ > > I've just released the first beta version tested on Fedora 10 and > Ubuntu 9.04 and I'd like to integrate it in the JDK: how do we do > that? > > You can already run a full working demo, download the .zip for the > last version, unpack it and run > $ java -jar gtkjfilechooser-demo.jar > > Other useful infos are in the wiki pages. > > I'm looking forward to hearing your feedback > Best Regards, > Costantino - Stuttgart, Germany > |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHello Pavel,
Could you try with this updated version: http://gtkjfilechooser.googlecode.com/files/GtkJFileChooser_v1.3.1.zip The reason for this exception is that I'use the native gtk bundles for the I18N. For example under Fedora it is in /usr/share/locale/it/LC_MESSAGES/gtk20.mo But under Ubuntu and Suse respectively in /usr/share/locale-langpack and /usr/share/locale-bundle What OS do you use? and where is your gtk20.mo? I know, that isn't the standay way the I18N is done in Swing, but for the moment I wanted to "recycle" the gnome bundles. For the next releases we can adopt the standard Swing way. Let me know if now it works correctly. Bye, Costantino P.S.: The error was here: http://code.google.com/p/gtkjfilechooser/source/browse/branches/release_1_3/GtkJFileChooser/src/eu/kostia/gtkjfilechooser/I18N.java I've also writtern a wiki page about gettext: http://code.google.com/p/gtkjfilechooser/wiki/GettextResource 2009/11/9 Pavel Porvatov <Pavel.Porvatov@...>: > Hi Costantino, > > I've tried to run the demo but I got the next exception: > java -jar gtkjfilechooser-demo.jar > Exception in thread "main" java.io.IOError: java.io.FileNotFoundException: > Cannot find resource null > at > eu.kostia.gtkjfilechooser.GettextResource.<init>(GettextResource.java:187) > at eu.kostia.gtkjfilechooser.I18N.<clinit>(I18N.java:45) > at > eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.installStrings(GtkFileChooserUI.java:752) > at > javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:241) > at > javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:156) > at javax.swing.JComponent.setUI(JComponent.java:664) > at javax.swing.JFileChooser.updateUI(JFileChooser.java:1787) > at javax.swing.JFileChooser.setup(JFileChooser.java:374) > at javax.swing.JFileChooser.<init>(JFileChooser.java:347) > at javax.swing.JFileChooser.<init>(JFileChooser.java:300) > at > eu.kostia.gtkjfilechooser.demo.FileChooserDemo.<init>(FileChooserDemo.java:135) > at > eu.kostia.gtkjfilechooser.demo.FileChooserDemo.main(FileChooserDemo.java:638) > Caused by: java.io.FileNotFoundException: Cannot find resource null > ... 12 more > > Regards, Pavel >> >> Hello, >> >> To implement the new GTK file chooser I've started this open source >> project: >> http://code.google.com/p/gtkjfilechooser/ >> >> I've just released the first beta version tested on Fedora 10 and >> Ubuntu 9.04 and I'd like to integrate it in the JDK: how do we do >> that? >> >> You can already run a full working demo, download the .zip for the >> last version, unpack it and run >> $ java -jar gtkjfilechooser-demo.jar >> >> Other useful infos are in the wiki pages. >> >> I'm looking forward to hearing your feedback >> Best Regards, >> Costantino - Stuttgart, Germany >> > > |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHi Costantino,
I run the demo and it looks good. Please take a look at my comments: 1. Gaps between components differ from the original FileChooser 2. Some bitmaps differ from the original FileChooser 3. I got some errors (see attach) Regards, Pavel. > Hello Pavel, > > Could you try with this updated version: > http://gtkjfilechooser.googlecode.com/files/GtkJFileChooser_v1.3.1.zip > > The reason for this exception is that I'use the native gtk bundles for the I18N. > For example under Fedora it is in > /usr/share/locale/it/LC_MESSAGES/gtk20.mo > But under Ubuntu and Suse respectively in /usr/share/locale-langpack > and /usr/share/locale-bundle > > What OS do you use? and where is your gtk20.mo? > > I know, that isn't the standay way the I18N is done in Swing, but for > the moment I wanted to "recycle" the gnome bundles. > For the next releases we can adopt the standard Swing way. > > Let me know if now it works correctly. > Bye, > Costantino > > P.S.: The error was here: > http://code.google.com/p/gtkjfilechooser/source/browse/branches/release_1_3/GtkJFileChooser/src/eu/kostia/gtkjfilechooser/I18N.java > I've also writtern a wiki page about gettext: > http://code.google.com/p/gtkjfilechooser/wiki/GettextResource > > > > > 2009/11/9 Pavel Porvatov <Pavel.Porvatov@...>: > >> Hi Costantino, >> >> I've tried to run the demo but I got the next exception: >> java -jar gtkjfilechooser-demo.jar >> Exception in thread "main" java.io.IOError: java.io.FileNotFoundException: >> Cannot find resource null >> at >> eu.kostia.gtkjfilechooser.GettextResource.<init>(GettextResource.java:187) >> at eu.kostia.gtkjfilechooser.I18N.<clinit>(I18N.java:45) >> at >> eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.installStrings(GtkFileChooserUI.java:752) >> at >> javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:241) >> at >> javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:156) >> at javax.swing.JComponent.setUI(JComponent.java:664) >> at javax.swing.JFileChooser.updateUI(JFileChooser.java:1787) >> at javax.swing.JFileChooser.setup(JFileChooser.java:374) >> at javax.swing.JFileChooser.<init>(JFileChooser.java:347) >> at javax.swing.JFileChooser.<init>(JFileChooser.java:300) >> at >> eu.kostia.gtkjfilechooser.demo.FileChooserDemo.<init>(FileChooserDemo.java:135) >> at >> eu.kostia.gtkjfilechooser.demo.FileChooserDemo.main(FileChooserDemo.java:638) >> Caused by: java.io.FileNotFoundException: Cannot find resource null >> ... 12 more >> >> Regards, Pavel >> >>> Hello, >>> >>> To implement the new GTK file chooser I've started this open source >>> project: >>> http://code.google.com/p/gtkjfilechooser/ >>> >>> I've just released the first beta version tested on Fedora 10 and >>> Ubuntu 9.04 and I'd like to integrate it in the JDK: how do we do >>> that? >>> >>> You can already run a full working demo, download the .zip for the >>> last version, unpack it and run >>> $ java -jar gtkjfilechooser-demo.jar >>> >>> Other useful infos are in the wiki pages. >>> >>> I'm looking forward to hearing your feedback >>> Best Regards, >>> Costantino - Stuttgart, Germany >>> >>> >> ption occurred during event dispatching: java.lang.IllegalArgumentException: /home/fritz/Documents doesn't exist. at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.listDirectory(FileBrowserPane.java:164) at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.setCurrentDir(FileBrowserPane.java:203) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.doDirectoryChanged(GtkFileChooserUI.java:1171) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.propertyChange(GtkFileChooserUI.java:1459) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.fireChangeDirectoryEvent(GtkFileChooserUI.java:1641) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.actionPerformed(GtkFileChooserUI.java:1617) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI$9.actionPerformed(GtkFileChooserUI.java:474) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.fireActionPerformed(GtkLocationsPane.java:289) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.access$100(GtkLocationsPane.java:67) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane$3.mousePressed(GtkLocationsPane.java:147) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) at java.awt.Component.processMouseEvent(Component.java:6260) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1045) at java.awt.Dialog$3.run(Dialog.java:1097) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1095) at javax.swing.JFileChooser.showDialog(JFileChooser.java:723) at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.actionPerformed(FileChooserDemo.java:363) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception occurred during event dispatching: java.lang.IllegalArgumentException: /home/fritz/Documents doesn't exist. at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.listDirectory(FileBrowserPane.java:164) at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.setCurrentDir(FileBrowserPane.java:203) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.doDirectoryChanged(GtkFileChooserUI.java:1171) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.propertyChange(GtkFileChooserUI.java:1459) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.fireChangeDirectoryEvent(GtkFileChooserUI.java:1641) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.actionPerformed(GtkFileChooserUI.java:1617) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI$9.actionPerformed(GtkFileChooserUI.java:474) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.fireActionPerformed(GtkLocationsPane.java:289) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.access$100(GtkLocationsPane.java:67) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane$3.mousePressed(GtkLocationsPane.java:147) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) at java.awt.Component.processMouseEvent(Component.java:6260) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1045) at java.awt.Dialog$3.run(Dialog.java:1097) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1095) at javax.swing.JFileChooser.showDialog(JFileChooser.java:723) at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.actionPerformed(FileChooserDemo.java:363) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception occurred during event dispatching: java.lang.IllegalArgumentException: /home/fritz/Music doesn't exist. at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.listDirectory(FileBrowserPane.java:164) at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.setCurrentDir(FileBrowserPane.java:203) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.doDirectoryChanged(GtkFileChooserUI.java:1171) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.propertyChange(GtkFileChooserUI.java:1459) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.fireChangeDirectoryEvent(GtkFileChooserUI.java:1641) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.actionPerformed(GtkFileChooserUI.java:1617) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI$9.actionPerformed(GtkFileChooserUI.java:474) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.fireActionPerformed(GtkLocationsPane.java:289) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.access$100(GtkLocationsPane.java:67) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane$3.mousePressed(GtkLocationsPane.java:147) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) at java.awt.Component.processMouseEvent(Component.java:6260) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1045) at java.awt.Dialog$3.run(Dialog.java:1097) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1095) at javax.swing.JFileChooser.showDialog(JFileChooser.java:723) at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.actionPerformed(FileChooserDemo.java:363) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception occurred during event dispatching: java.lang.IllegalArgumentException: /home/fritz/Music doesn't exist. at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.listDirectory(FileBrowserPane.java:164) at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.setCurrentDir(FileBrowserPane.java:203) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.doDirectoryChanged(GtkFileChooserUI.java:1171) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.propertyChange(GtkFileChooserUI.java:1459) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.fireChangeDirectoryEvent(GtkFileChooserUI.java:1641) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.actionPerformed(GtkFileChooserUI.java:1617) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI$9.actionPerformed(GtkFileChooserUI.java:474) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.fireActionPerformed(GtkLocationsPane.java:289) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.access$100(GtkLocationsPane.java:67) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane$3.mousePressed(GtkLocationsPane.java:147) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) at java.awt.Component.processMouseEvent(Component.java:6260) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1045) at java.awt.Dialog$3.run(Dialog.java:1097) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1095) at javax.swing.JFileChooser.showDialog(JFileChooser.java:723) at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.actionPerformed(FileChooserDemo.java:363) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception occurred during event dispatching: java.lang.IllegalArgumentException: /home/fritz/Documents doesn't exist. at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.listDirectory(FileBrowserPane.java:164) at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.setCurrentDir(FileBrowserPane.java:203) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.doDirectoryChanged(GtkFileChooserUI.java:1171) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.propertyChange(GtkFileChooserUI.java:1459) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.fireChangeDirectoryEvent(GtkFileChooserUI.java:1641) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.actionPerformed(GtkFileChooserUI.java:1617) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI$9.actionPerformed(GtkFileChooserUI.java:474) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.fireActionPerformed(GtkLocationsPane.java:289) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane.access$100(GtkLocationsPane.java:67) at eu.kostia.gtkjfilechooser.ui.GtkLocationsPane$3.mousePressed(GtkLocationsPane.java:147) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) at java.awt.Component.processMouseEvent(Component.java:6260) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1045) at java.awt.Dialog$3.run(Dialog.java:1097) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1095) at javax.swing.JFileChooser.showDialog(JFileChooser.java:723) at eu.kostia.gtkjfilechooser.demo.FileChooserDemo.actionPerformed(FileChooserDemo.java:363) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHallo Pavel
2009/11/12 Pavel Porvatov <Pavel.Porvatov@...>: > I run the demo and it looks good. Thanks! I hope we can improve it so much to include it in the OpenJDK. > Please take a look at my comments: > 1. Gaps between components differ from the original FileChooser Maybe do you refer to the Save Dialog? In the Open Dialog they are quite similar (see the attached screenshot) > 2. Some bitmaps differ from the original FileChooser Do you mean the small preview icons near the filename? This thumbs are in the folder /home/c.cerbo/.thumbnails/normal and their name is the md5 of the file uri, for example: file:///home/c.cerbo/Documenti/Effective_Java.pdf --> 6e1c7944eac7bc932b2b56c6ac94960f The bug was that the uri must be encoded according rfc2396 (see http://www.ietf.org/rfc/rfc2396.txt) and I didn't so, for example file:///home/c.cerbo/Documenti/Ciao Belli.pdf becames file:///home/c.cerbo/Documenti/Ciao%20Belli.pdf The new code looks so like (eu.kostia.gtkjfilechooser.GtkStockIcon): private static File lookForThumbs(File file) { String thumbsFolder = System.getProperty("user.home") + "/.thumbnails/normal"; String md5 = md5(toFileuri(file)); File thumn = new File(thumbsFolder + "/" + md5 + ".png"); if (!thumn.exists()) { return null; } return thumn; } static String toFileuri(File file) { return file.toURI().toASCIIString().replace("file:", "file://"); } Regarding the other icons, I get them directly from the actual implementation in the JDK: private static Icon getFromStock(String name, Size size) { try { Class<?> gtkStockIconClass = Class.forName("com.sun.java.swing.plaf.gtk.GTKStyle$GTKStockIcon"); Constructor<?> constructor = gtkStockIconClass.getDeclaredConstructor(String.class, int.class); constructor.setAccessible(true); return (Icon) constructor.newInstance(name, size.ordinal()); } catch (Exception ex) { return null; } } > 3. I got some errors (see attach) How do you caused these exceptions? I cannot reproduce them. Do the folders '/home/fritz/Documents' and '/home/fritz/Music' really exist? They are some of the so-called "well known" user directories: $ cat ~/.config/user-dirs.dirs XDG_DESKTOP_DIR="$HOME/Scrivania" XDG_DOWNLOAD_DIR="$HOME/Download" XDG_TEMPLATES_DIR="$HOME/Modelli" XDG_PUBLICSHARE_DIR="$HOME/Pubblici" XDG_DOCUMENTS_DIR="$HOME/Documenti" XDG_MUSIC_DIR="$HOME/Musica" XDG_PICTURES_DIR="$HOME/Immagini" XDG_VIDEOS_DIR="$HOME/Video" Maybe did you manually delete them, but they are still in your ~/.gtk-bookmarks? Could you check please the content of that file? Thanks for your support! Cheers, Costantino P.S.: Is there somebody else that may help to further test and improve the new GtkFileChooser? Now that Java is open source it can become a more important player in the desktop linux. Furthermore Gnome is also the standard desktop environment under the Sun OS (Solaris). It's really a pity, that the GTKLookAndFeel hasn't yet an updated FileChooser. |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHi Costantino,
> Hallo Pavel > > 2009/11/12 Pavel Porvatov <Pavel.Porvatov@...>: > >> I run the demo and it looks good. >> > Thanks! I hope we can improve it so much to include it in the OpenJDK. > > >> Please take a look at my comments: >> 1. Gaps between components differ from the original FileChooser >> > Maybe do you refer to the Save Dialog? In the Open Dialog they are > quite similar (see the attached screenshot) > > >> 2. Some bitmaps differ from the original FileChooser >> > Do you mean the small preview icons near the filename? > This thumbs are in the folder /home/c.cerbo/.thumbnails/normal and > their name is the md5 of the file uri, for example: > file:///home/c.cerbo/Documenti/Effective_Java.pdf --> > 6e1c7944eac7bc932b2b56c6ac94960f > The bug was that the uri must be encoded according rfc2396 (see > http://www.ietf.org/rfc/rfc2396.txt) and I didn't so, for example > file:///home/c.cerbo/Documenti/Ciao Belli.pdf becames > file:///home/c.cerbo/Documenti/Ciao%20Belli.pdf > > The new code looks so like (eu.kostia.gtkjfilechooser.GtkStockIcon): > private static File lookForThumbs(File file) { > String thumbsFolder = System.getProperty("user.home") + "/.thumbnails/normal"; > String md5 = md5(toFileuri(file)); > > File thumn = new File(thumbsFolder + "/" + md5 + ".png"); > > if (!thumn.exists()) { > return null; > } > return thumn; > } > > static String toFileuri(File file) { > return file.toURI().toASCIIString().replace("file:", "file://"); > } > > Regarding the other icons, I get them directly from the actual > implementation in the JDK: > private static Icon getFromStock(String name, Size size) { > try { > Class<?> gtkStockIconClass = > Class.forName("com.sun.java.swing.plaf.gtk.GTKStyle$GTKStockIcon"); > Constructor<?> constructor = > gtkStockIconClass.getDeclaredConstructor(String.class, int.class); > constructor.setAccessible(true); > return (Icon) constructor.newInstance(name, size.ordinal()); > } catch (Exception ex) { > return null; > } > } > > > >> 3. I got some errors (see attach) >> > How do you caused these exceptions? I cannot reproduce them. > Do the folders '/home/fritz/Documents' and '/home/fritz/Music' really exist? > > They are some of the so-called "well known" user directories: > > $ cat ~/.config/user-dirs.dirs > XDG_DESKTOP_DIR="$HOME/Scrivania" > XDG_DOWNLOAD_DIR="$HOME/Download" > XDG_TEMPLATES_DIR="$HOME/Modelli" > XDG_PUBLICSHARE_DIR="$HOME/Pubblici" > XDG_DOCUMENTS_DIR="$HOME/Documenti" > XDG_MUSIC_DIR="$HOME/Musica" > XDG_PICTURES_DIR="$HOME/Immagini" > XDG_VIDEOS_DIR="$HOME/Video" > > Maybe did you manually delete them, but they are still in your ~/.gtk-bookmarks? > Could you check please the content of that file? > > Thanks for your support! > > > Cheers, > Costantino > > P.S.: Is there somebody else that may help to further test and improve > the new GtkFileChooser? Now that Java is open source it can become a > more important player in the desktop linux. Furthermore Gnome is also > the standard desktop environment under the Sun OS (Solaris). It's > really a pity, that the GTKLookAndFeel hasn't yet an updated > FileChooser. > > > ------------------------------------------------------------------------ > file:///home/fritz/Documents file:///home/fritz/Music file:///home/fritz/Pictures file:///home/fritz/Videos |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHallo Pavel, Hallo everyone
I've added 15px after the label "Posizione:" ( = Location) exactly like in the original GTK FileChooser. The change is committed in the trunk and will be included in the next release. Regarding the exception that you reported: java.lang.IllegalArgumentException: /home/fritz/Documents doesn't exist. at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.listDirectory(FileBrowserPane.java:164) at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.setCurrentDir(FileBrowserPane.java:203) at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.doDirectoryChanged(GtkFileChooserUI.java:1171) it's thrown from this code in FileBrowserPane: 162: private void listDirectory(File dir, javax.swing.filechooser.FileFilter swingFilter) { 163: if (!dir.exists()) { 164: throw new IllegalArgumentException(dir + " doesn't exist."); 165: } You say that the folder "/home/fritz/Documents" exists, therefore I cannot understand why this exception occurs. What do you think about? You can also anonymously check out the latest project source code: svn checkout http://gtkjfilechooser.googlecode.com/svn/trunk/ gtkjfilechooser-read-only If you want, or if somebody else ask for it, i can give the right to commit directly in the svn repository. Cheers, Costantino |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHi Costantino,
> Hallo Pavel, Hallo everyone > > I've added 15px after the label "Posizione:" ( = Location) exactly > like in the original GTK FileChooser. > The change is committed in the trunk and will be included in the next release. > > Regarding the exception that you reported: > > java.lang.IllegalArgumentException: /home/fritz/Documents doesn't exist. > at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.listDirectory(FileBrowserPane.java:164) > at eu.kostia.gtkjfilechooser.ui.FileBrowserPane.setCurrentDir(FileBrowserPane.java:203) > at eu.kostia.gtkjfilechooser.ui.GtkFileChooserUI.doDirectoryChanged(GtkFileChooserUI.java:1171) > > it's thrown from this code in FileBrowserPane: > 162: private void listDirectory(File dir, > javax.swing.filechooser.FileFilter swingFilter) { > 163: if (!dir.exists()) { > 164: throw new IllegalArgumentException(dir + " doesn't exist."); > 165: } > > You say that the folder "/home/fritz/Documents" exists, therefore I > cannot understand why this exception occurs. > What do you think about? > > You can also anonymously check out the latest project source code: > svn checkout http://gtkjfilechooser.googlecode.com/svn/trunk/ > gtkjfilechooser-read-only > > If you want, or if somebody else ask for it, i can give the right to > commit directly in the svn repository. > a contributor (details are here: http://openjdk.java.net/contribute/). To develop some new components or extend an existing one I'd recommend to use the official site dev.java.net. You have to pass some steps: 1. Become a contributor: https://sca.dev.java.net/ 2. Create a new project: http://www.java.net/request-project After that your project will be more official and you could get feedback from Sun employers and other people. Regards, Pavel > Cheers, > Costantino > |
|
|
Re: <Swing Dev> Issue 5090726 - GTK L&F: Need new FileChooserUI to match native GTK 2.4 widgetHello Pavel,
Thanks for you tips! I've posted a signed copy of the "Sun Contributor Agreement" to sun_ca@... and created the following project on java.net (approvation still pending): http://www.java.net/project/updated-gtk24-jfilechooserui-swing-gtk-look-and-feel I'm looking forward to receiving Sun's feedback! Regards, Costantino |
| Free embeddable forum powered by Nabble | Forum Help |