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.


Constructor Index

 o FileNamePropertyEditor()
Constructs the required file name editor.

Method Index

 o actionPerformed(ActionEvent)
Handles the pressing of the Apply and the Browse buttons.
 o addPropertyChangeListener(PropertyChangeListener)
Register a listener for the PropertyChange event.
 o firePropertyChange()
This method is used to fire PropertyChangeEvents to all registered listeners.
 o getAsText()
Returns the file name property as a human editable string.
 o getCustomEditor()
This method returns the custom property editor.
 o getJavaInitializationString()
This method returns a fragment of Java code that can be used to initialize a variable with the current property value.
 o getPrefferedSize()
Returns the preferred size for this property editor.
 o getTags()
This method returns null since this property cannot be represented as a tagged value.
 o getValue()
Returns the file name property as a String.
 o isPaintable()
Returns true as this editor honors the paintValue method.
 o paintValue(Graphics, Rectangle)
Paint a representation of the file name into a given area of screen real estate.
 o removePropertyChangeListener(PropertyChangeListener)
Remove a listener for the PropertyChange event.
 o setAsText(String)
Set the file name as the given String.
 o setValue(Object)
Sets the file name that is to be edited.
 o supportsCustomEditor()
Returns true as a custom editor is supported.
 o textValueChanged(TextEvent)
Handles changes made to the text in the textfield.

Constructors

 o FileNamePropertyEditor
 public FileNamePropertyEditor()
Constructs the required file name editor.

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent event)
Handles the pressing of the Apply and the Browse buttons.

Parameters:
event - The corresponding ActionEvent.
 o 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.
 o firePropertyChange
 public void firePropertyChange()
This method is used to fire PropertyChangeEvents to all registered listeners.

 o getAsText
 public String getAsText()
Returns the file name property as a human editable string.

Returns:
The property value as a human editable string.
 o 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.
 o 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.
 o getPrefferedSize
 public Dimension getPrefferedSize()
Returns the preferred size for this property editor.

Returns:
java.awt.Dimension The preferred size for this property editor.
 o 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.
 o getValue
 public Object getValue()
Returns the file name property as a String.

Returns:
The value of the property.
 o isPaintable
 public boolean isPaintable()
Returns true as this editor honors the paintValue method.

Returns:
True, as the class will honor the paintValue method.
 o 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.
 o removePropertyChangeListener
 public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for the PropertyChange event.

Parameters:
listener - The PropertyChange listener to be removed.
 o setAsText
 public void setAsText(String filename)
Set the file name as the given String.

Parameters:
text - The string to be parsed.
 o setValue
 public void setValue(Object value)
Sets the file name that is to be edited.

Parameters:
value - The new file name to be edited.
 o supportsCustomEditor
 public boolean supportsCustomEditor()
Returns true as a custom editor is supported.

Returns:
True as the propertyEditor can provide a custom editor.
 o 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