Class TimeOutEditor

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--TimeOutEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class TimeOutEditor
extends java.beans.PropertyEditorSupport

This is a Bean Property Editor for the 'timeOut' (TimerBean) value. This class allows me to create/set-up a custom Property Editor.

Since:
08/16/2003

Constructor Summary
TimeOutEditor()
           
 
Method Summary
 java.lang.String getAsText()
          Overriding the getAsText method of the PropertyEditor interface.
 java.awt.Component getCustomEditor()
          This method constructs and returns an object of the custom editor class.
 boolean isPaintable()
          Overriding the isPaintable method of the PropertyEditor interface so that it is able to be painted .
 void paintValue(java.awt.Graphics g, java.awt.Rectangle box)
          This method allows the program to graphically represent the 'timeOut' value in the property editor.
 boolean supportsCustomEditor()
          This method indicates that I will have a custom editor by overriding the supportCustomEditor and returning true.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getTags, getValue, removePropertyChangeListener, setAsText, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeOutEditor

public TimeOutEditor()
Method Detail

getCustomEditor

public java.awt.Component getCustomEditor()
This method constructs and returns an object of the custom editor class.

PRE: None.

POST: This method does nothing more than return an instance of the TimeOutEditorPanel class.

Overrides:
getCustomEditor in class java.beans.PropertyEditorSupport
Returns:
Returns a custom editor.
Since:
08/16/03

supportsCustomEditor

public boolean supportsCustomEditor()
This method indicates that I will have a custom editor by overriding the supportCustomEditor and returning true.

PRE: None. .

POST: This method does nothing more than return "true";

Overrides:
supportsCustomEditor in class java.beans.PropertyEditorSupport
Returns:
Returns true indicating that I will have a custom editor
Since:
08/16/03

isPaintable

public boolean isPaintable()
Overriding the isPaintable method of the PropertyEditor interface so that it is able to be painted . In effect I am telling the builder tool that I will paint the value and not use a string.

PRE: None.

POST: This method does nothing more than return "true".

Overrides:
isPaintable in class java.beans.PropertyEditorSupport
Returns:
Returns true specifying that it can be painted.
Since:
08/16/03

paintValue

public void paintValue(java.awt.Graphics g,
                       java.awt.Rectangle box)
This method allows the program to graphically represent the 'timeOut' value in the property editor.

PRE: This method assumes that the two parameters are not equal to null.

POST: This method does nothing more than draw the 'timeOut' value in the allotted space in the Bean Tool property editor. It does so by retrieving the 'timeOut' value, setting the background fill to black, setting the font color to white, setting the font properties and drawing the string value.

Overrides:
paintValue in class java.beans.PropertyEditorSupport
Parameters:
g - Graphics handle to the rectangle that I can paint.
box - Coordinates of the rectangle that I can paint.
Since:
08/16/03

getAsText

public java.lang.String getAsText()
Overriding the getAsText method of the PropertyEditor interface. In effect I am telling the builder tool that I will paint the value and not use a string.

PRE: None.

POST: This method does nothing more than return null/

Overrides:
getAsText in class java.beans.PropertyEditorSupport
Returns:
Returns null; I will not use a string.
Since:
08/16/03