T Interface borland.jbcl.model.ItemEditor
borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.model 

ItemEditor interface

borland.jbcl.model.ItemEditor

About the ItemEditor interface

Properties  Methods  Event Listeners

Implemented by MaskableTextItemEditor, PickListItemEditor, ChoiceItemEditor, CompositeItemEditor, ExpandingTextItemEditor, ImageItemEditor, TextItemEditor

The ItemEditor interface defines a single item editor for editing data items.


ItemEditor properties

*Read-only properties **Write-only properties

Properties defined in this interface

ItemEditor methods

Methods defined in this interface

ItemEditor event listeners


ItemEditor properties

component

 public Component getComponent()
Returns the actual component that will be added to the host control as an editor.

If an editor is a composite component, such as a panel with several controls on it, dispatch all key events from the main component to the individual controls.

value

 public Object getValue()
Returns the current value in the editor. The editor host must be able to ask for the value at anytime and will always ask for it when posting to the data object.

ItemEditor methods

canPost()

  public boolean canPost()
Determines whether the current value can be posted. If canPost() returns true, the value can be posted.

changeBounds(java.awt.Rectangle)

  public void changeBounds(java.awt.Rectangle bounds)
Called when the editor site changes size due to a resize of the editor host. The editor should adjust its bounds to fit in the given rectangle.

Parameters:

bounds
The Rectangle that identifies the new area for the editor to occupy.

endEdit(boolean)

  public void endEdit(boolean posted)
Ends the editing. This method is always called just before the editor is removed.

Parameters:

posted
If posted is true, the item was posted. If it is false, posting did not occur.

startEdit(java.lang.Object, java.awt.Rectangle, borland.jbcl.model.ItemEditSite)

  public void startEdit(java.lang.Object data, java.awt.Rectangle bounds, borland.jbcl.model.ItemEditSite editSite)
Begins an editing session. This method is called after the editor is added to the host container. The editor should immediately copy the value, the show itself.

Parameters:

data
The data object being edited.
bounds
The area within which the data object is edited.
editSite
The ItemEditSite object that provides access to the editor host information.

ItemEditor event listeners

This interface is a source for the following event sets. For information on the standard AWT event sets, see Standard Java events.

key

 public void addKeyListener(java.awt.event.KeyListener l)
 public void removeKeyListener(java.awt.event.KeyListener l)