All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.excelaccessor.FileNamePropertyEditor
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----com.ibm.excelaccessor.FileNamePropertyEditor
- public class FileNamePropertyEditor
- extends Panel
- implements PropertyEditor, ActionListener, TextListener
Custom property editor for configuration file path.
This property editor allows browsing for files
using the FileDialog as well as entering the file
name.
-
FileNamePropertyEditor()
- Constructs the required file name editor.
-
actionPerformed(ActionEvent)
- Handles the pressing of the Apply and the Browse
buttons.
-
addPropertyChangeListener(PropertyChangeListener)
- Register a listener for the PropertyChange event.
-
firePropertyChange()
- This method is used to fire PropertyChangeEvents to all
registered listeners.
-
getAsText()
- Returns the file name property as a human editable string.
-
getCustomEditor()
- This method returns the custom property editor.
-
getJavaInitializationString()
- This method returns a fragment of Java code
that can be used to initialize a variable with the current property
value.
-
getPrefferedSize()
- Returns the preferred size for this property editor.
-
getTags()
- This method returns null since this
property cannot be represented as a tagged value.
-
getValue()
- Returns the file name property as a String.
-
isPaintable()
- Returns true as this editor honors the paintValue method.
-
paintValue(Graphics, Rectangle)
- Paint a representation of the file name into a given area of screen
real estate.
-
removePropertyChangeListener(PropertyChangeListener)
- Remove a listener for the PropertyChange event.
-
setAsText(String)
- Set the file name as the given String.
-
setValue(Object)
- Sets the file name that is to be edited.
-
supportsCustomEditor()
- Returns true as a custom editor is supported.
-
textValueChanged(TextEvent)
- Handles changes made to the text in the textfield.
FileNamePropertyEditor
public FileNamePropertyEditor()
- Constructs the required file name editor.
actionPerformed
public void actionPerformed(ActionEvent event)
- Handles the pressing of the Apply and the Browse
buttons.
- Parameters:
- event - The corresponding ActionEvent.
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Register a listener for the PropertyChange event. When the
PropertyEditor changes its value it fires a PropertyChange
event on all registered PropertyChangeListeners, specifying the
null value for the property name and itself as the source.
- Parameters:
- listener - An object to be invoked when a PropertyChange
event is fired.
firePropertyChange
public void firePropertyChange()
- This method is used to fire PropertyChangeEvents to all
registered listeners.
getAsText
public String getAsText()
- Returns the file name property as a human editable string.
- Returns:
- The property value as a human editable string.
getCustomEditor
public Component getCustomEditor()
- This method returns the custom property editor.
- Returns:
- A java.awt.Component that will allow a human to directly
edit the current property value.
getJavaInitializationString
public String getJavaInitializationString()
- This method returns a fragment of Java code
that can be used to initialize a variable with the current property
value.
- Returns:
- A fragment of Java code representing an initializer for the
current value.
getPrefferedSize
public Dimension getPrefferedSize()
- Returns the preferred size for this property editor.
- Returns:
- java.awt.Dimension The preferred size for this property
editor.
getTags
public String[] getTags()
- This method returns null since this
property cannot be represented as a tagged value.
- Returns:
- null, since this
property cannot be represented as a tagged value.
getValue
public Object getValue()
- Returns the file name property as a String.
- Returns:
- The value of the property.
isPaintable
public boolean isPaintable()
- Returns true as this editor honors the paintValue method.
- Returns:
- True, as the class will honor the paintValue method.
paintValue
public void paintValue(Graphics gfx,
Rectangle rect)
- Paint a representation of the file name into a given area of screen
real estate.
- Parameters:
- gfx - Graphics object to paint into.
- box - Rectangle within graphics object into which we should paint.
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Remove a listener for the PropertyChange event.
- Parameters:
- listener - The PropertyChange listener to be removed.
setAsText
public void setAsText(String filename)
- Set the file name as the given String.
- Parameters:
- text - The string to be parsed.
setValue
public void setValue(Object value)
- Sets the file name that is to be edited.
- Parameters:
- value - The new file name to be edited.
supportsCustomEditor
public boolean supportsCustomEditor()
- Returns true as a custom editor is supported.
- Returns:
- True as the propertyEditor can provide a custom editor.
textValueChanged
public void textValueChanged(TextEvent event)
- Handles changes made to the text in the textfield.
- Parameters:
- event - The corresponding TextEvent.
All Packages Class Hierarchy This Package Previous Next Index