From: Steffen P. <ste...@gm...> - 2005-06-10 20:34:03
|
Hi, --- xnap-commons.org/src/java/org/xnap/commons/gui/DirectoryChooser.java 2005-05-04 12:53:28.000000000 +0900 +++ xnap-commons/src/java/org/xnap/commons/gui/DirectoryChooser.java 2005-06-04 11:01:35.000000000 +0900 @@ -45,8 +45,8 @@ implements TreeSelectionListener { - public static final int APPROVE_OPTION = 1; - public static final int CANCEL_OPTION = 2; + public static final int APPROVE_OPTION = 0; + public static final int CANCEL_OPTION = 1; Is there a special reason why you changed these values? > But I think it will be required to make subclass of FileChooserDelegator > which delegates method calls to a JFileChooser instances or > an DirectoryChooser instance or something else chooser instance. Why not have a separate class for the directory chooser panel? We could extract methods that can be shared between FileChooserPanel and DirectoryChooserPanel to an abstract common super class. I don't like the idea of boolean flags much. And concerning FileDropAcceptableTextField.java: How about using a "decoration pattern instead of inheritance" (as Felix put in chat). I'd prefer implementing the DropTargetListener as an abstract class, requiring the chooser panel to implement drop(File) and to set the filename instead of inhereting JTextField. Thanks for providing the patch. I think this will be a very useful enhancement of the XNap Commons. Once we have figured out the technical details I am certainly interested in merging it. If anything above is unclear, please ask and I will try to explain in more detail. Steffen -- Steffen Pingel - ste...@gm... - http://steffenpingel.de |