jbcl.view Package
java.lang.Object +----com.borland.jbcl.view.ColumnView +----com.borland.jbcl.control.DatasetColumnView
Variables Constructors Properties Methods
Implements ItemEditSite, ItemPaintSite, Serializable, Cloneable
This component provides persistent storage for properties that affect how information is displayed in a Column
of a GridControl
. This component can also be used to provide default property values when passed into other objects that know how to handle such properties, such as the DataSetColumnView
component.
Data-aware controls pick up Column
properties when bound to a DataSet
. After that, to affect display, set properties of the ColumnView
or DataSetColumnView
components.
protected int alignment
protected Color background
protected String caption
protected Font font
protected Color foreground
protected transient ItemEditor itemEditor
protected transient ItemPainter itemPainter
protected Insets margins
protected String name
protected int ordinal
public static final int PROP_ALIGNMENT = 3
public static final int PROP_BACKGROUND = 4
public static final int PROP_CAPTION = 6
public static final int PROP_FONT = 2
public static final int PROP_FOREGROUND = 5
public static final int PROP_ITEMEDITOR = 10
public static final int PROP_ITEMPAINTER = 9
public static final int PROP_MARGINS = 8
public static final int PROP_NAME = 0
public static final int PROP_ORDINAL = 1
public static final int PROP_WIDTH = 7
protected boolean userSetAlignment
protected boolean userSetBackground
protected boolean userSetCaption
protected boolean userSetFont
protected boolean userSetForeground
protected boolean userSetItemEditor
protected boolean userSetItemPainter
protected boolean userSetMargins
protected boolean userSetName
protected boolean userSetOrdinal
protected boolean userSetWidth
protected int width
public ColumnView()Creates a
ColumnView
object with default property values.
public ColumnView(ColumnView clonee)Creates a
ColumnView
object and uses property values from clonee
as its default values.
public ColumnView(int ordinal)Creates a
ColumnView
object for a specified column in the MatrixModel
. An ordinal
value of 0 specifies the first column, an ordinal
value of 1 specifies the second column, and so on. An ordinal
value of less than 0 means the index of the columnView
array is used to determine the correct SMatrixModel
column.
public int getAlignment() public void setAlignment(int newAlignment)Stores the
alignment
of the ColumnView
, both horizontal and vertical. To set a new value for both horizontal and vertical alignment, separate the values with a vertical bar (|). Unless otherwise specified, alignment
defaults to center and bottom. Acceptable values for newAlignment
are defined in com.borland.dx.text.Alignment
.
public Color getBackground() public void setBackground(Color newColor)Stores the background color used by the
ColumnView
component. Valid values for background
are listed in java.awt.Color
.
public String getCaption() public void setCaption(String newCaption)The
caption
property stores the ColumnView's
label that displays in a data-aware control. The default caption
is the Column
name to which the ColumnView
is bound.
public Point getEditClickPoint()Returns the point clicked with the mouse.
public Font getFont() public void setFont(Font newFont)Stores the font used for the
ColumnView
caption
(label). If not set, font
defaults to the Java-specified default font. Valid values for newFont
are listed in java.awt.Font
.
public Color getForeground() public void setForeground(Color newColor)Stores the foreground color of the
ColumnView
. Valid values for
color
are listed in java.awt.Color
.
public ItemEditor getItemEditor() public void setItemEditor(ItemEditor itemEditor)Read-only property that specifies the custom
ItemEditor
for this Column
.
public Insets getItemMargins() public void setItemMargins(Insets newMargins)The margins for this
Column
.
public ItemPainter getItemPainter() public void setItemPainter(ItemPainter itemPainter)Read-only property that returns the custom
ItemPainter
for this Column
.
public String getName() public void setName(String newName)The
String
name of this Column
.
public int getOrdinal() public void setOrdinal(int newOrdinal)This is the column index in the
MatrixModel
for this column. An S
value less than 0 means the index of the columnView array is used to determine the MatrixModel
column.
public Component getSiteComponent()
public Graphics getSiteGraphics()
public boolean isTransparent()Determines whether the column is transparent.
public int getWidth() public void setWidth(int newWidth)Returns or specifies the width of the
Column
, expressed in pixels.
public Object clone()
Overrides: java.lang.Object.clone()
public void resetUserFlags()This method resets all the user setting flags to false, so that any resolving of property settings results in the newly set ones.