borland Packages  Class Hierarchy  jbcl.model Package  Index 

ToggleItemEditor interface

borland.jbcl.model.ItemEditor
   +----borland.jbcl.model.ToggleItemEditor

About the ToggleItemEditor interface

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 JBCL components that this editor is a toggle. The JBCL 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.


ToggleItemEditor properties

*Read-only properties **Write-only properties

Properties implemented in borland.jbcl.model.ItemEditor

ToggleItemEditor methods

Methods defined in this interface

Methods implemented in borland.jbcl.model.ItemEditor

ToggleItemEditor event listeners


ToggleItemEditor methods

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

  public boolean isToggle(java.lang.Object data, java.awt.Rectangle rect, borland.jbcl.model.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
The data object from the model
rect
The rectangle of the item
site
The callback ItemEditSite to get information from the view.

ToggleItemEditor 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)