borland Packages  Class Hierarchy  jbcl.view Package  Index 

CustomItemEditor component

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

About the CustomItemEditor component

Variables  Constructors  Properties  Methods  Event Listeners

Implements CustomPaintSite, ItemEditor, ItemEditSite, ItemPaintSite, ToggleItemEditor, Serializable

CustomItemEditor is an item editor you can subclass to create your own specialized item editor. The editor property allows you to specify an item editor to use to do the editing.

CustomItemPainter implements CustomPaintSite so you can customize the paint site with the background and foreground colors, font, alignment, and margin settings of your choosing. Custom item editors are especially useful for editing items in the cells of a grid. For example, you might want negative numbers in grid cells to be painted red while the others are painted black.

See also: CustomItemListener, CustomItemPainter


CustomItemEditor variables

Variables implemented in this class

CustomItemEditor constructors

CustomItemEditor properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

CustomItemEditor methods

Methods implemented in this class

Methods implemented in java.lang.Object

CustomItemEditor event listeners


CustomItemEditor variables

alignment

  protected int alignment

background

  protected Color background

editor

  protected transient ItemEditor editor

editSite

  protected transient ItemEditSite editSite

font

  protected Font font

foreground

  protected Color foreground

margins

  protected Insets margins

CustomItemEditor constructors

CustomItemEditor()

  public CustomItemEditor()
Creates a CustomItemEditor class.

CustomItemEditor(borland.jbcl.model.ItemEditor)

  public CustomItemEditor(borland.jbcl.model.ItemEditor editor)
Creates a CustomItemEditor class using the specified ItemEditor.

Parameters:

editor
The ItemEditor used for editing an item.

CustomItemEditor properties

alignment

 public int getAlignment()
 public void setAlignment(int alignment)
Determines the alignment of the item being edited. Use one or some combination of the Alignment variables.

background

 public Color getBackground()
 public void setBackground(java.awt.Color color)
Determines the background color of the item being edited.

component

 public Component getComponent()
Returns the actual component that is added to the host control as an editor.

editClickPoint

 public Point getEditClickPoint()
Returns the Point that locates the position where the mouse was clicked on the item being edited.

editor

 public ItemEditor getEditor()
 public void setEditor(borland.jbcl.model.ItemEditor editor)
Determines the item editor used to edit the item.

font

 public Font getFont()
 public void setFont(java.awt.Font font)
Determines the font of the item being edited.

foreground

 public Color getForeground()
 public void setForeground(java.awt.Color color)
Determines the foreground color of the item being edited.

itemMargins

 public Insets getItemMargins()
 public void setItemMargins(java.awt.Insets margins)
Determines the margins that surround the item being edited.

siteComponent

 public Component getSiteComponent()
Returns the component used as the item paint site.

siteGraphics

 public Graphics getSiteGraphics()

transparent

 public boolean isTransparent()
Determines whether the background of the item being edited is transparent so objects behind it show through. If it returns true, the item is painted with a transparent background.

value

 public Object getValue()
Returns the current value of the item being edited.

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