borland Packages  Class Hierarchy  jbcl.view Package  Index 

CompositeItemEditor component

java.lang.Object
   +----borland.jbcl.view.CompositeItemEditor

About the CompositeItemEditor component

Constructors  Properties  Methods  Event Listeners

Implements ItemEditor, ToggleItemEditor, Serializable

A CompsiteItemEditor enables editing items in a control, for data items that consist of two parts, such as an image and a string in a tree. It uses a CompositeItemPainter to calculate the rectangles for the individual items. It delegates all ItemEditor methods to the appropriate item editors.

See also: CompositeItemPainter


CompositeItemEditor constructors

CompositeItemEditor properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

CompositeItemEditor methods

Methods implemented in this class

Methods implemented in java.lang.Object

CompositeItemEditor event listeners


CompositeItemEditor constructors

CompositeItemEditor()

  public CompositeItemEditor()
Constructs a CompositeItemEditor.

CompositeItemEditor(borland.jbcl.view.CompositeItemPainter)

  public CompositeItemEditor(borland.jbcl.view.CompositeItemPainter compositePainter)
Constructs a CompositeItemEditor using specified the CompositeItemPainter to do the painting.

CompositeItemEditor(borland.jbcl.view.CompositeItemPainter, borland.jbcl.model.ItemEditor, borland.jbcl.model.ItemEditor)

  public CompositeItemEditor(borland.jbcl.view.CompositeItemPainter compositePainter, borland.jbcl.model.ItemEditor firstEditor, borland.jbcl.model.ItemEditor secondEditor)
Constructs a CompositeItemEditor using the specified composite item painter to do the painting and the specified item editors to handle the editing.

Parameters:

compositePainter
The composite item painter object to use to paint each pair of data items.
firstEditor
The item editor to use for the first element of each composite data item.
secondEditor
The item editor to use for the second element of each composite data item.

CompositeItemEditor(borland.jbcl.view.CompositeItemPainter, borland.jbcl.model.ItemEditor, borland.jbcl.model.ItemEditor, int)

  public CompositeItemEditor(borland.jbcl.view.CompositeItemPainter compositePainter, borland.jbcl.model.ItemEditor firstEditor, borland.jbcl.model.ItemEditor secondEditor, int defaultEditor)
Constructs a CompositeItemEditor, with the specified item editor as the default editor.

Parameters:

compositePainter
The composite item painter object to use to paint each pair of data items.
firstEditor
The item editor to use for the first element of each composite data item.
secondEditor
The item editor to use for the second element of each composite data item.
defaultEditor
The default editor to use. A value of 1 indicates the firstEditor, 2 specifies the secondEditor.


CompositeItemEditor properties

component

 public Component getComponent()
The component property stores which component is added to the host control as an item editor. It dispatches all key events from the main component to the individual controls.

compositeItemPainter

 public CompositeItemPainter getCompositeItemPainter()
 public void setCompositeItemPainter(borland.jbcl.view.CompositeItemPainter compositePainter)
Determines the CompositeItemPainter used to handle the painting tasks.

defaultEditor

 public int getDefaultEditor()
 public void setDefaultEditor(int defaultEditor)
The defaultEditor property stores which item editor to use for each element of a composite data item if no other item editor is specified. A value of 1 specifies the first editor is the default editor. A value of 2 specifies the second editor is the default editor.

editor1

 public ItemEditor getEditor1()
 public void setEditor1(borland.jbcl.model.ItemEditor firstEditor)
Determines the item editor to use to edit the first item in the pair of items.

editor2

 public ItemEditor getEditor2()
 public void setEditor2(borland.jbcl.model.ItemEditor secondEditor)
Determines the item editor to use to edit the second item in the pair of items.

value

 public Object getValue()
The value property stores the current value that is in the active item editor. The editor host can ask for the value at any time and should always ask for the value when posting to the data object.


CompositeItemEditor methods

hitTest(java.awt.Point, java.awt.Rectangle, java.awt.Rectangle)

  public int hitTest(java.awt.Point clickPoint, java.awt.Rectangle rect1, java.awt.Rectangle rect2)
Returns which item editor or item painter contains the location that was clicked.

Parameters:

clickPoint
The point that was clicked.
rect1
The first rectangle to test.
rect2
The second rectangle to test.


CompositeItemEditor event listeners

This component 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)