|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.beans.PropertyEditorSupport
|
+--TimeOutEditor
This is a Bean Property Editor for the 'timeOut' (TimerBean) value. This class allows me to create/set-up a custom Property Editor.
| 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 |
public TimeOutEditor()
| Method Detail |
public java.awt.Component getCustomEditor()
PRE: None.
POST: This method does nothing more than return an instance of the TimeOutEditorPanel class.
getCustomEditor in class java.beans.PropertyEditorSupportpublic boolean supportsCustomEditor()
PRE: None. .
POST: This method does nothing more than return "true";
supportsCustomEditor in class java.beans.PropertyEditorSupportpublic boolean isPaintable()
PRE: None.
POST: This method does nothing more than return "true".
isPaintable in class java.beans.PropertyEditorSupport
public void paintValue(java.awt.Graphics g,
java.awt.Rectangle box)
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.
paintValue in class java.beans.PropertyEditorSupportg - Graphics handle to the rectangle that I can paint.box - Coordinates of the rectangle that I can paint.public java.lang.String getAsText()
PRE: None.
POST: This method does nothing more than return null/
getAsText in class java.beans.PropertyEditorSupport
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||