borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.view 

CompositeItemEditor class

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

About the CompositeItemEditor class

Constructors  Properties  Methods  Event Listeners

Implements ItemEditor

Enables editing items in a control, for data items that consist of two parts, such as an image and a string. Uses a CompositeItemPainter to calculate the rectangles for the individual items. Delegates all ItemEditor methods to the appropriate item editors.


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(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.

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 0 indicates the firstEditor, 1 specifies the secondEditor.


CompositeItemEditor properties

component

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

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.

value

 public Object getValue()
The value property stores the current value that is in the 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 class 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)