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

Field Summary
 protected StringmyInitalPath
           

Fields inherited from class com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
MEDIUM_DIMENSION, panel, SMALL_DIMENSION

Constructor Summary
ExtendedFileNameEditor()
           Creates editor without initial path.
ExtendedFileNameEditor(String initalPath)
           Creates editor with initial path.

Method Summary
 protected Stringchoose()
           This method actually opens file chooser dialog.
 voiddoAction()
           Opens extended dialog to edit value.
 intgetChooserType()
           Returns type of button which is used to call extended editor.
 protected StringgetInitalPath(Object value)
           Validates initial path.
 ObjectgetValue()
           Fetches value from the inner editor.
 protected voidsetBackground(boolean isSelectedFileExists)
           Sets background color of this editor to the red if file does not exist.
 voidsetValue(Object value)
           If given path is not empty then passes it to the inner editor.

Methods inherited from class com.togethersoft.openapi.ide.inspector.util.editors.ExtendedEditor
editingCanceled, editingStopped, getInnerEditor

Methods inherited from class com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCustomEditor, init, removeCellEditorListener, setAlignment, supportsCustomEditor

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

Field Detail

myInitalPath

protected String myInitalPath
Constructor Detail

ExtendedFileNameEditor

public ExtendedFileNameEditor()
Creates editor without initial path.

ExtendedFileNameEditor

public ExtendedFileNameEditor(String initalPath)
Creates editor with initial path.
Method Detail

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

Association Links

to Class java.lang.String