public class FileEditor extends PropertyEditorSupport implements ExPropertyEditor, PropertyChangeListener
java.io.File
.PROP_VALUE_VALID, PROPERTY_HELP_ID
Constructor and Description |
---|
FileEditor() |
Modifier and Type | Method and Description |
---|---|
void |
attachEnv(PropertyEnv env)
This method is called by the IDE to pass
the environment to the property editor.
|
static JFileChooser |
createHackedFileChooser()
Creates hacked fileChooser, responding on Enter the way it
performs folder change.
|
String |
getAsText()
Returns human readable form of the edited value.
|
Component |
getCustomEditor()
Custon editor.
|
String |
getJavaInitializationString()
Should create a string insertable to the newly generated source code.
|
static void |
hackFileChooser(JFileChooser chooser)
Hacks fileChooser, responding on Enter the way it
performs folder change.
|
void |
propertyChange(PropertyChangeEvent e)
Property change listaner attached to the JFileChooser chooser.
|
void |
setAsText(String str)
Parses the given string and should create a new instance of the
edited object.
|
boolean |
supportsCustomEditor()
Implements PropertyEditor method.
|
addPropertyChangeListener, firePropertyChange, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setValue
public void attachEnv(PropertyEnv env)
attachEnv
in interface ExPropertyEditor
env
- Environment passed by the ide.public String getAsText()
getAsText
in interface PropertyEditor
getAsText
in class PropertyEditorSupport
public void setAsText(String str) throws IllegalArgumentException
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
str
- string reprezentation of the file (used as a parameter for File).IllegalArgumentException
- If the given string cannot be parsedpublic Component getCustomEditor()
getCustomEditor
in interface PropertyEditor
getCustomEditor
in class PropertyEditorSupport
public boolean supportsCustomEditor()
supportsCustomEditor
in interface PropertyEditor
supportsCustomEditor
in class PropertyEditorSupport
public String getJavaInitializationString()
getJavaInitializationString
in interface PropertyEditor
getJavaInitializationString
in class PropertyEditorSupport
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
public static JFileChooser createHackedFileChooser()
public static void hackFileChooser(JFileChooser chooser)