borland Packages Class Hierarchy jbcl.view Package Index
java.lang.Object +----borland.jbcl.view.CustomItemEditor
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
protected int alignment
protected Color background
protected transient ItemEditor editor
protected transient ItemEditSite editSite
protected Font font
protected Color foreground
protected Insets margins
public CustomItemEditor()Creates a CustomItemEditor class.
public CustomItemEditor(borland.jbcl.model.ItemEditor editor)Creates a CustomItemEditor class using the specified ItemEditor.
Parameters:
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.
public Color getBackground() public void setBackground(java.awt.Color color)Determines the background color of the item being edited.
public Component getComponent()Returns the actual component that is added to the host control as an editor.
public Point getEditClickPoint()Returns the Point that locates the position where the mouse was clicked on the item being edited.
public ItemEditor getEditor() public void setEditor(borland.jbcl.model.ItemEditor editor)Determines the item editor used to edit the item.
public Font getFont() public void setFont(java.awt.Font font)Determines the font of the item being edited.
public Color getForeground() public void setForeground(java.awt.Color color)Determines the foreground color of the item being edited.
public Insets getItemMargins() public void setItemMargins(java.awt.Insets margins)Determines the margins that surround the item being edited.
public Component getSiteComponent()Returns the component used as the item paint site.
public Graphics getSiteGraphics()
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.
public Object getValue()Returns the current value of the item being edited.
public void addKeyListener(java.awt.event.KeyListener l) public void removeKeyListener(java.awt.event.KeyListener l)