jbcl.model Package
com.borland.jbcl.model.ItemEditor +----com.borland.jbcl.model.ToggleItemEditor
Properties Methods Event Listeners
Implemented by MaskableTextItemEditor, PickListItemEditor, PopupPickListItemEditor, BooleanToggleItemEditor, ChoiceItemEditor, CompositeItemEditor, CustomItemEditor, ExpandingTextItemEditor, ImageItemEditor, JComboBoxItemEditor, JTextFieldItemEditor, PairItemEditor, TextItemEditor
Classes that implement the ItemEditor
interface define a single item editor for editing data items.
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.
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.
public boolean canPost()Determines whether the current value can be posted. If
canPost()
returns true, the value can be posted.
public void changeBounds(Rectangle rect)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
Rectangle
that identifies the new area for the editor to occupy.
public void endEdit(boolean posted)Ends the editing. This method is always called just before the editor is removed.
Parameters:
posted
public void startEdit(Object data, Rectangle rect, 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
bounds
editSite
ItemEditSite
object that provides access to the editor host information.
public void addKeyListener(KeyListener l) public void removeKeyListener(KeyListener l)