This component manages display and editing of a property value in the IDE's property view. Mouse over, selection, and focus rendering will be handled by this class, as well as customizable formatting of the value string. Some PropertyEditor implementations support editing in place in the property table, selection from a drop-down panel and/or use of custom editor dialogs. PropertyEditors allowing keyboard input will support customizable filtering and validation.
A PropertyEditor is created with a reference to an IProperty which is used to get and set the property value as well provide any additional validation of edited values.
Related Topics
DefaultPropertyEditor
, ComboBoxPropertyEditor
Method Summary |
public void |
|
public void |
|
public |
|
public |
|
public boolean |
|
Method Detail |
public void activate(FocusListener
l)
Notification that this editor has been added to the
property view. The editor should read its IProperty
settings and redisplay.
The focus listener passed in should be added to all focusable components in the editor. The property view will update its selection highlighting for this property based on the focus gain and loss events received by this listener.
Note that if the property editor uses popup windows, it may need to add this focus listener to any focusable components in the popup window.
Related Topics
public void deactivate(FocusListener
l)
Notification that this editor is about to be removed from
the property view.
The listener should be removed from any focusable components that it was added to in addFocusListener. Additionally, the editor shoud detach any of it's own focus listeners or input verifier.
Related Topics
public Component
getComponent()
Returns the component which will be added to the property view
for display and editing of the property value.
Note that this method may be called multiple times.
public IProperty
getProperty()
Returns the IProperty whose value this editor displays.
public boolean setFocused()Called by the property view when this property editor should request focus to a component in its display.
Return value should reflect whether the focus request is guaranteed to fail or is likely to succeed. If the property editor already has focus, return true (note that this differs from the behavior of the Component and JComponent request focus methods which return false if the component already has focus).
Use of Component/JComponent.requestFocus(boolean temporary) is recommended (despite swing/awt java doc to the contrary). It is the only focus request method that both gives a return value, and will change active windows if necessary.
false
if the focus request is guaranteed to
fail; true
if it is likely to succeed