|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyComponent
Defines interface that custom JComponents can implement to be used in the PropertyTable. Custom components that implement or provide adapters to this interface can be used generically in the table.
Field Summary | |
---|---|
static java.lang.String |
EMPTY_STRING
An empty String constant. |
Method Summary | |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
|
void |
addFocusListener(java.awt.event.FocusListener listener)
|
void |
editingStarted()
Notify this component that it has been activated and should enable any controls necessary for editing property values. |
void |
editingStopped()
Notification to this component that keyboard/mouse focus has moved away from the component and it should deselect any items and deactivate any editing controls. |
java.lang.Object |
getNullValue()
Get the Object that this PropertyComponent will use to indicate null. |
javax.swing.JComponent |
getSingleRowComponent()
create a single-row JComponent from this component when needed. |
java.lang.String |
getSingleRowString()
create a String from this component when needed. |
java.lang.Object |
getValue()
Get the value being displayed by this component. |
boolean |
isCurrentValueEqualTo(java.lang.Object value)
Return whether or not the specified value Object is equal to this component's currently displayed value. |
void |
removePropertyValidationListener(PropertyValidationListener listener)
Remove the PropertyValidationListener for this component. |
void |
setEnabled(boolean flag)
Set whether or not this component should be enabled to allow user editing of the value(s). |
void |
setPropertyValidationListener(PropertyValidationListener listener)
Set a listener on this component that will receive request to validate property values as they are entered. |
void |
setValidity(boolean flag)
Set a visual indication that this component's displayed value is or is not valid in the current context. |
Field Detail |
---|
static final java.lang.String EMPTY_STRING
Method Detail |
---|
void addActionListener(java.awt.event.ActionListener listener)
void addFocusListener(java.awt.event.FocusListener listener)
java.lang.Object getNullValue()
java.lang.Object getValue()
void setEnabled(boolean flag)
flag
- true if the component should enable editing.void setPropertyValidationListener(PropertyValidationListener listener)
Set a listener on this component that will receive request to validate property values as they are entered. An example would be a custom component that allows a user to type in an entry that should be validated keystroke-by-keystroke. Such a component would route KeyListener.keyReleased() events to the PropertyValidationListener.checkValue(Object) method. The result of the checkValue call will be communicated to this component via the setValidity(boolean) method.
Not all components require validation; therefore it is permissable for such components to no-op this method.
listener
- the PropertyValidationListener that this object should call if
validation is required.void removePropertyValidationListener(PropertyValidationListener listener)
Remove the PropertyValidationListener for this component. This method will be called immediately after editing has stopped on this component. Implementations that no-op the setPropertyValidationListener method may no-op this method as well.
listener
- the PropertyValidationListener to be removed from this object.void setValidity(boolean flag)
flag
- true if the value is valid, false if it is invalid.boolean isCurrentValueEqualTo(java.lang.Object value)
value
- an Object that was previously obtained from this component's
getValue method.
void editingStarted()
void editingStopped()
javax.swing.JComponent getSingleRowComponent()
java.lang.String getSingleRowString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |