com.togethersoft.openapi.ide.inspector.util.editors
Class ExtendedFileNameEditor
java.lang.Object
|
+--java.beans.PropertyEditorSupport
|
+--com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
|
+--com.togethersoft.openapi.ide.inspector.util.editors.ExtendedEditor
|
+--com.togethersoft.openapi.ide.inspector.util.editors.ExtendedFileNameEditor
- Direct Known Subclasses:
- ExtendedFolderNameEditor
- public class ExtendedFileNameEditor
- extends ExtendedEditor
Represents ExtendedEditor for the file name values.
- Author:
- TogetherSoft
| Method Summary |
protected String | choose() This method actually opens file chooser dialog. |
void | doAction() Opens extended dialog to edit value. |
int | getChooserType() Returns type of button which is used to call extended editor. |
protected String | getInitalPath(Object value) Validates initial path. |
Object | getValue() Fetches value from the inner editor. |
protected void | setBackground(boolean isSelectedFileExists) Sets background color of this editor to the red if file does not exist. |
void | setValue(Object value) If given path is not empty then passes it to the inner editor. |
| Methods inherited from class java.beans.PropertyEditorSupport |
isPaintable, paintValue, getJavaInitializationString, getAsText, setAsText, getTags, addPropertyChangeListener, removePropertyChangeListener, firePropertyChange |
| Methods inherited from class java.lang.Object |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize |
myInitalPath
protected String myInitalPath
ExtendedFileNameEditor
public ExtendedFileNameEditor()
- Creates editor without initial path.
ExtendedFileNameEditor
public ExtendedFileNameEditor(String initalPath)
- Creates editor with initial path.
choose
protected String choose()
- This method actually opens file chooser dialog.
- Returns: path to the selected file, or null if nothjing is selected
doAction
public void doAction()
- Opens extended dialog to edit value.
getChooserType
public int getChooserType()
- Returns type of button which is used to call extended editor.
- Returns: ExtendedControl.FILE_CHOOSER_BUTTON
- See Also:
- com.togethersoft.openapi.util.ui.ExtendedControl.FILE_CHOOSER_BUTTON
getInitalPath
protected String getInitalPath(Object value)
- Validates initial path.
- Returns: initial path string, or null if path does not exist or not valid
getValue
public Object getValue()
- Fetches value from the inner editor.
setBackground
protected void setBackground(boolean isSelectedFileExists)
- Sets background color of this editor to the red if file does not exist.
setValue
public void setValue(Object value)
- If given path is not empty then passes it to the inner editor.
- Parameters:
- value - File path
to Class java.lang.String