com.isti.util.propertyeditor
Class FilePropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by com.isti.util.propertyeditor.AbstractPropertyEditor
          extended by com.isti.util.propertyeditor.FilePropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class FilePropertyEditor
extends AbstractPropertyEditor

A PropertyEditor for a files.


Field Summary
protected  javax.swing.JButton buttonObj
           
protected static java.io.File currentWorkingDirFileObj
           
protected static java.lang.String currentWorkingDirPathString
           
protected static java.lang.String curWorkingDirDotStr
           
protected static int curWorkingDirPathStringLen
           
protected  IstiFileChooser fileChooser
           
protected  java.lang.String fileText
           
protected static int MAX_BUTTON_TEXT
           
protected  javax.swing.JPanel panelObj
          The GUI component of this editor.
 
Constructor Summary
FilePropertyEditor()
          Creates a Property Editor for a files.
FilePropertyEditor(boolean directoryFlag)
          Creates a Property Editor for a files.
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
          Adds an ActionListener to the button.
 java.lang.String getAsText()
          Returns value as a String.
 java.awt.Component getCustomEditor()
          Returns the editor GUI.
 javax.swing.JFileChooser getFileChooser()
          Returns the file chooser.
 java.lang.Object getValue()
          Returns value.
 void removeActionListener(java.awt.event.ActionListener l)
          Removes an ActionListener from the button.
 void setAsText(java.lang.String text)
          Sets value as text.
 void setValue(java.lang.Object someObj)
          Sets value.
 boolean supportsCustomEditor()
          Determines whether the propertyeditor can provide a custom editor.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_BUTTON_TEXT

protected static final int MAX_BUTTON_TEXT

fileText

protected java.lang.String fileText

fileChooser

protected final IstiFileChooser fileChooser

curWorkingDirDotStr

protected static java.lang.String curWorkingDirDotStr

currentWorkingDirFileObj

protected static final java.io.File currentWorkingDirFileObj

currentWorkingDirPathString

protected static final java.lang.String currentWorkingDirPathString

curWorkingDirPathStringLen

protected static final int curWorkingDirPathStringLen

panelObj

protected final javax.swing.JPanel panelObj
The GUI component of this editor.


buttonObj

protected final javax.swing.JButton buttonObj
Constructor Detail

FilePropertyEditor

public FilePropertyEditor()
Creates a Property Editor for a files.


FilePropertyEditor

public FilePropertyEditor(boolean directoryFlag)
Creates a Property Editor for a files.

Parameters:
directoryFlag - true for directories only, false otherwise.
Method Detail

supportsCustomEditor

public boolean supportsCustomEditor()
Determines whether the propertyeditor can provide a custom editor.

Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor
Overrides:
supportsCustomEditor in class java.beans.PropertyEditorSupport
Returns:
true

getCustomEditor

public java.awt.Component getCustomEditor()
Returns the editor GUI.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Overrides:
getCustomEditor in class java.beans.PropertyEditorSupport
Returns:
component for editor.

getFileChooser

public javax.swing.JFileChooser getFileChooser()
Returns the file chooser.

Returns:
the file chooser.

setValue

public void setValue(java.lang.Object someObj)
Sets value.

Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class java.beans.PropertyEditorSupport
Parameters:
someObj - value

setAsText

public void setAsText(java.lang.String text)
Sets value as text.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Parameters:
text - value

getValue

public java.lang.Object getValue()
Returns value.

Specified by:
getValue in interface java.beans.PropertyEditor
Overrides:
getValue in class java.beans.PropertyEditorSupport
Returns:
the value

getAsText

public java.lang.String getAsText()
Returns value as a String.

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport
Returns:
the value as a string

addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Adds an ActionListener to the button.

Specified by:
addActionListener in class AbstractPropertyEditor
Parameters:
l - the ActionListener to be added

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Removes an ActionListener from the button. If the listener is the currently set Action for the button, then the Action is set to null.

Specified by:
removeActionListener in class AbstractPropertyEditor
Parameters:
l - the listener to be removed