jbcl.model Package
com.borland.jbcl.model.ItemEditor +----com.borland.jbcl.model.ToggleItemEditor
Properties Methods Event Listeners
Implemented by BooleanToggleItemEditor, CompositeItemEditor, CustomItemEditor, PairItemEditor
The ToggleItemEditor
interface is a tagging interface (it has no methods) that notifies (with an instance of check) all components that this editor is a toggle. The components will then start an edit session with this editor on the first click (or SPACE) on the item.
A ToggleItemEditor
is expected to respond to the startEdit
method by toggling whatever value it needs to, and then promptly call ItemEditSite.safeEndEdit(...)
to terminate the edit session.
A ToggleItemEditor
should not provide an editor component to embed in the view and should rely on an ItemPainter
to display the results of the toggle change.
public boolean isToggle(Object data, Rectangle rect, ItemEditSite site)The
isToggle()
method allows a nesting ItemEditor
to ask its nested ItemEditors
if they are toggles, and respond appropriately to the view. An instanceof ToggleItemEditor
check would fail if the outermost ItemEditor
in the nesting chain is not a ToggleItemEditor
. This allows it to forward on the query, and see if the passed point should trigger a toggle.
Parameters:
data
rect
site
ItemEditSite
to get information from the view.
public void addKeyListener(KeyListener l) public void removeKeyListener(KeyListener l)