borland Packages Class Hierarchy jbcl.view Package Index
java.lang.Object +----borland.jbcl.view.CompositeItemPainter
Variables Constructors Properties Methods
Implements ItemPainter, Serializable
The CompositeItemPainter class paints items in a control, for items that have both an image and a string, such as in a tree. It delegates all painting to its two item painters.
See also: CompositeItemEditor.
protected int alignment
protected Color background
protected transient ItemPainter firstPainter
protected int gap
protected Insets margins
protected int orientation
protected boolean paintBackground
protected transient ItemPainter secondPainter
public CompositeItemPainter()Constructs a CompositeItemPainter.
public CompositeItemPainter(borland.jbcl.model.ItemPainter firstPainter, borland.jbcl.model.ItemPainter secondPainter)Constructs a CompositeItemPainter with the specified item painters. The orientation is horizontal, the alignment is Alignment.CENTER | Alignment.MIDDLE, and the gap between the painters is 4 pixels.
Parameters:
public CompositeItemPainter(borland.jbcl.model.ItemPainter firstPainter, borland.jbcl.model.ItemPainter secondPainter, int orientation)Constructs a CompositeItemPainter with the specified item painters and the specified orientation. The alignment is Alignment.CENTER | Alignment.MIDDLE, and the gap between the painters is 4 pixels.
Parameters:
public CompositeItemPainter(borland.jbcl.model.ItemPainter firstPainter, borland.jbcl.model.ItemPainter secondPainter, int orientation, int alignment)Constructs a CompositeItemPainter with the specified item painters, the specified orientation, and the specified alignment. The gap between the painters is 4 pixels.
Parameters:
public CompositeItemPainter(borland.jbcl.model.ItemPainter firstPainter, borland.jbcl.model.ItemPainter secondPainter, int orientation, int alignment, int gap)Constructs a CompositeItemPainter with the specified item painters, orientation, alignment, and gap.
Parameters:
public int getAlignment() public void setAlignment(int alignment)Determines the alignment of the item being painted in the painters. Specify alignment using the borland.jbcl.util.Alignment constants.
public Color getBackground() public void setBackground(java.awt.Color background)The background property defines the default background color for the TextItemPainter. If the ItemPaintSite passed into the getPreferredSize() or paint() methods has a valid background color setting, it will override this one.
public int getGap() public void setGap(int gap)Determines the distance in pixels between the two item painters. Specify the distance you want with the gap parameter.
public Insets getMargins() public void setMargins(java.awt.Insets margins)Determines the margins around the items to be painted.
public int getOrientation() public void setOrientation(int o)Determines the orientation of the text painted with item painter. The possibilities are Orientation.HORIZONTAL or Orienation.VERTICAL, as defined in the borland.jbcl.util.Orientation class.
public boolean isPaintBackground() public void setPaintBackground(boolean paintBackground)Determines whether the background is painted before the text is drawn in the paint() method. If paintBackground is true, the background is painted; otherwise, the background is not painted.
public ItemPainter getPainter1() public void setPainter1(borland.jbcl.model.ItemPainter firstPainter)Determines the item painter used to the first item in the item pair.
public ItemPainter getPainter2() public void setPainter2(borland.jbcl.model.ItemPainter secondPainter)Determines the item painter used to paint second item in the item pair.
public void calculateRects(java.lang.Object object, java.awt.Graphics graphics, java.awt.Rectangle rect, int state, borland.jbcl.model.ItemPaintSite site, java.awt.Rectangle rectFirst, java.awt.Rectangle rectSecond)Uses the passed paint information (same parameters to paint) to calculate the ItemPainter rectangles, and fills in the passed rectangle's values.
Parameters: