borland Packages Class Hierarchy jbcl.dataset Package Index
java.lang.Object +----borland.jbcl.dataset.Column
Constructors Properties Methods Event Listeners
Implements Serializable, Cloneable
The Column component stores important column-level metadata type properties (such as data type and precision) as well as visual properties such as font and alignment. For QueryDataSet and ProcedureDataSet components, a set of Column components is dynamically created each time the StorageDataSet is instantiated, mirroring the actual columns in the data source at that time.
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.
Use the Column Designer in the UI Designer to work with Column components easily and quickly. You access the Column Designer by right-clicking any StorageDataSet in the Component Tree then selecting Activate Designer. A table with three columns displays the Column components, column names and data types of each Column in the StorageDataSet. The values in the table are not editable, however, selecting a Column displays its properties in the Inspector where you can view or modify their values.
Press the plus button (+) to add a new Column to the StorageDataSet. The new column is added below the selected row and defaults to a String data type. Change this and set other properties in the Inspector. The minus button (-) removes the currently selected Column from the StorageDataSet.
Click the up arrow and down arrow buttons to navigate the rows in the table.
Click the check mark button to invoke a restructure of the DataSet.
Warning: When a Column's data type is changed and the store property is set to MemoryStore (the default), data values are not converted to the new data type. The old values are lost. When using a DataStore, type coercions may occur and are outlined in the Data type coercions topic in the DataStore component documentation.
The Column Designer also provides type-safe programmatic access to the underlying data by generating an Exception in cases of mismatched data. You can design the columns of a StorageDataSet that uses either implementation of MemoryStore or DataStore. Similarly, the StorageDataSet can reside within your application or a DataModule.
A Column may derive its values as a result of a calculated expression. Calculated Columns can be set using the Column Editor but are not retrieved from its data source. Instead, values for the Column are calculated for each row of data using a formula defined in the StorageDataSet object's calcFields event handler. Calculated columns are read-only; you cannot set individual values of a row for columns that are calculated columns.
Typically, the formula for a calculated field uses expressions involving values from other Columns in that row to generate a value for each row of the calculated Column. For example, a table might have non-calculated columns for Quantity and UnitPrice, and a calculated Column for ExtendedPrice, which is calculated by multiplying the values of Quantity and UnitPrice. Calculated Columns are also useful for performing lookups in other tables. For example, a part number can be used to retrieve a part description for display in an invoice line item.
Calculated columns are read-only and while JBuilder automatically recognizes this and attempts to discover other non-updatable columns, some JDBC drivers seem unaware that such columns are read-only. The JDBC-ODBC bridge seems particularly affected by this. For this reason, you should set column properties to read-only and not resolvable. While this seems redundant, this can prove crucial to your application.
An important Column property is persistence. Set this property to create a persistent, unchanging set of columns. Setting a Column to persistent guarantees that each time your application runs, it uses and displays the same Column components every time and in the same order. In the Column Editor, setting any property sets that Column to persistent. This is designated in the Component Tree with square brackets ([]) around the Column name. Programmatically, you set the persist property.
You can define events at the Column level, however, you must make a column persistent before you can define events on it.
A side-effect of setting a Column as persistent is that persistent columns may not placed in the same order as they are found in the DataSet.
When a StorageDataSet is provided data, it:
Another important Column level feature is the support of constraints. Supported constraints include:
These constraints are not enforced when data is loaded into a JBCL StorageDataSet since it is assumed that the data satisfied the constraints before being stored in the SQL database. However, you cannot leave a field until its value satisfies the constraints set on that Column. This is done automatically; you do not need special code to handle or enforce these constraints. You can extend constraints by writing a class that implements ColumnChangeListener or EditListener if you want additional validation handling.
Columns can contain various data types of data including Object. In general, you should provide custom ItemPainter and ItemEditor classes for each Java Object type. Set each Column that contains Object data to its applicable ItemPainter and ItemEditor classes.
The default ItemPainter prints the toString() value of the object. The default ItemEditor treats the Object as a String. The result of an edit will therefore be an Object of java.lang.String. If these defaults are acceptable given your Object's data, with the exception that the edited Object should be of a different data type, set a custom formatter for this Column. This formatter should be able to format the Object into a String and parse a String back into the wanted Object type.
For more information on Columns, see the Working with Columns topic in the Database Application Developer's Guide.
public Column()Constructs a Column component with the following defaults:
Property | Value |
visible | TriStateProperty.DEFAULT |
dataType | Variant.ASSIGNED_NULL |
searchable | true |
resolvable | TriStateProperty.DEFAULT |
editable | true |
public Column(java.lang.String columnName, java.lang.String caption, int dataType)Constructs a Column component with property values similar to those of its null constructor (Column()) and as specified by its parameters.
Parameters:
public final AggDescriptor getAgg() public final void setAgg(borland.jbcl.dataset.AggDescriptor aggDescriptor)Stores the AggDescriptor object that defines the aggregator properties for a calculated Column whose calcType property is AGGREGATE.
public final int getAlignment() public final void setAlignment(int alignment)Stores the alignment of the items in the Column, 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 alignment are defined in borland.jbcl.util.Alignment Variables.
public final Color getBackground() public final void setBackground(java.awt.Color background)Stores the background color used by the Column component in UI controls. Valid values for background are listed under java.awt.color
public final int getCalcType() public final void setCalcType(int calcType)Specifies the calculation type of the Column. Valid values for the calculation type are defined in borland.jbcl.dataset.CalcType Variables. Setting a column to any calculation type (other than NO_CALC) sets this Column to readOnly. On error, the setCalcType() method throws a DataSetException.
public final String getCaption() public final void setCaption(java.lang.String caption)Stores the Column object's label that displays in a data-aware control. The value of the caption need not be unique across all Column objects of the DataSet. The default caption is the Column name.
public final String getColumnName() public final void setColumnName(java.lang.String name)
Specifies the String name of a newly added Column component to the DataSet. The setColumnName() method attaches the Column to a field in the data source. For QueryDataSet and ProcedureDataSet components, the column name is the SQL server name for the Column. For data-aware controls, use setColumnName() to bind a Column to a field in the DataSet. All Column names in the DataSet must be unique. On error, the setColumnName() method throws a DataSetException.
See also: setCaption()
public final boolean isCurrency() public final void setCurrency(boolean currency)Stores whether the Column defaults to currency formatting as specified in the locale for the Column. This property applies only to Column components containing numeric values. The default for this property is false, meaning that numeric data is not formatted as currency. To display values using default currency formatting, set this property to true.
An explicit displayMask always takes precedence over the formatting specified in the locale object. Specifying a display mask with currency symbols in it will display the value with currency formatting regardless of the currency setting.
See also: java.util.Locale
public StorageDataSet getDataSet()Read-only property returns the StorageDataSet associated with this Column component.
public final int getDataType() public final void setDataType(int dataType)Stores the data type of the Column. Valid values for the data type are listed under borland.jbcl.util.Variant Variables, except the BTYE_ARRAY variable. This property is used when saving changes to the local copy of the data in the StorageDataSet back to its original source. You should not change the data type of such a column.
The setDataType() method can also be used to set the data type for a calculated field. It should not be called at runtime when the Column already has data in it. On error, this method throws a DataSetException.
public final String getDefault() public final void setDefault(java.lang.String defaultString)Stores the default value for this Column in new records using String objects. If a display mask is specified for the Column, the value for this property must be consistent with the display mask. For example, if negative values are displayed enclosed in parentheses, the default value of -1 must be entered as "(1)".
If the defaultString parameter is set to "now" and the dataType for this Column is Date, Time, or Timestamp, the default will be the current time returned from System.currentTimeMillis(). The setDefaultValue method can be used to set the default as a borland.jbcl.util.Variant. This can be useful for binary data types.
Default values are automatically filled in when a new row is inserted. If no other updates are made to the row, it is considered untouched and is not posted.
public final Variant getDefaultValue() public final void setDefaultValue(borland.jbcl.util.Variant defaultValue)Stores the default value for fields in new records as borland.jbcl.util.Variant types.
public final String getDisplayMask() public final void setDisplayMask(java.lang.String displayMask)
Stores the string specification used to format the data displayed in the Column. This can format a Date column to display as "MM/dd/yy" or "dd/MM/yy" for example. In numeric columns, this is how you show commas, decimal points, and currency symbols. In String columns, display masks can add spaces or special characters that are not contained in the data itself for display formatting purposes. For example, a telephone number stored as 4084311000 can be displayed as (408) 431-1000 using a display mask of "(999) 999-9999" (without quotes).
The display mask is also used to parse user input by converting the String input back into the correct data type for the Column. User input which cannot be parsed using the specified display mask causes JBuilder to keep the user in the edit field until the data entered is correct. You can display these validation messages by adding a StatusBar control to your application, and connecting it to the same StorageDataSet as the data in your GridControl (or other data-aware control). When you want tighter character validation (for example, character by character validation), set the editMask property. The edit mask has the same syntax as the displayMask, but it is used only for user input, not for display formatting.
There is no default display mask specification, however, explicitly setting this property to null or an empty string causes JBuilder to choose a display mask specification. If the data type of the column has international (localization) implications, the locale file for the Column is accessed for default display settings, for example, date and currency symbol. Otherwise, the formatter is bypassed and a basic display mask is used.
Because default display masks are locale-sensitive and built as needed, they are automatically localized. User-defined display masks are not altered if the column's locale changes.
Display masks and edit masks are never substituted if one is supplied and the other not. However, the display mask does perform validatation of user input even if no edit mask is specified.
The displayMask property is an easy way to generate an instance of a formatter object which manages how the data is displayed. If you find that the displayMask does not handle your formatting needs, you can create your own class which implements the ItemFormatStr interface and assign it into the Column component's formatter property directly. In such cases, do not assign the displayMask property as your formatter will be overwritten.
To reset an edit mask back to its default, call the setEditMask() method.
Note: When editing data formatted with a display or edit mask, the TAB and ENTER keys attempt to post the field; they are not subfield navigation keys. Pressing either key attempt to post the value to the DataSet and if incomplete, the cursor is positionned at the offending index. If a StatusBar control has its dataSet property set to the same DataSet and the error generated is a ValidationException, the error displays on the StatusBar. Otherwise, an error dialog displays with the error. To prevent this dialog from appearing, customize the DataSetException error handler to trap for the exception.
For examples of patterns used with display masks, see Adding an Edit or Display Pattern to control data in the Database Application Developer's Guide.
See also: editMask, exportDisplayMask, String-based patterns (masks)
public final boolean isEditable() public final void setEditable(boolean editable)Stores whether a Column is editable or not through a data-aware control. Programmatic edits to the Column are not affected by this property. If false (the default) a Column can be modified. To prevent a Column from being modified, set this property to true. To prevent edits to the Column data programmatically or through data-aware controls, set the readOnly property.
The setEditable() method throws a DataSetException when called on a Column of an open DataSet.
public final String getEditMask() public void setEditMask(java.lang.String editMask)
Stores the string specification used to format and control the entry of data in the column when the user starts editing data. Before editing starts, the displayMask handles the formatting and parsing. Edit masks affect the formatting of data by displaying spaces or special characters that ease data entry. For String columns, these characters may optionally be stored with the data or not. For example, displaying parenthesis for a telephone number can ease data entry by clearly separating the area code from the telephone number.
Edit masks also restrict the type of data the user can enter, for example, by allowing digits only, or requiring entry in certain parts of a field, and so on.
User-defined edit masks are not altered if the column's locale changes.
When entering data into a edit mask and using the left shift feature where characters are entered from the right end of the pattern specification and shift left, if any character input cannot shift left, shifting stops. If you continue to type when you are positionned at the right of the pattern, the last character is overwritten with each key pressed.
Edit and display masks are never substituted one for the other if one is supplied and the other not. However, if an edit mask is not specified, the display mask performs validatation of user input.
If you find that the editMask does not handle your formatting needs, you can create your own class which implements the ItemEditMask interface and assign it into the Column component's editMasker property directly. In such cases, do not assign the editMask property as your editMasker will be overwritten.
To reset a display mask back to its default, call the setDisplayMask() method.
For examples of patterns used with display masks, see Adding an Edit or Display Pattern to control data in the Database Application Developer's Guide.
See also: displayMask property, String-based patterns (masks)
public final ItemEditMask getEditMasker() public void setEditMasker(borland.jbcl.model.ItemEditMask editMasker)The ItemEditMask implementation that provides the keystroke by keystroke validation of the data in the Column.
In most cases, the editMask property is used to provide formatting rules when data in the Column is being entered or edited. From the editMask, an editMasker object is created that manages the validation of the data entry or data editing.
If you want custom rules beyond those provided by the JBCL, create your own class that implements ItemEditMask and set this property to your custom class. Do not set the editMask property in addition to the editMasker property as the editMasker will be overridden.
public final String getExportDisplayMask() public final void setExportDisplayMask(java.lang.String exportDisplayMask)The string display mask specification that is used when importing and exporting data to a text file.
When exporting, JBuilder creates a schema file (.SCHEMA file extension) that contains information about the data being exported so that it can be easily read back into a JBCL TableDataSet component. This mask is also written into the schema file. The exportDisplayMask value in the schema file always takes precedence -- you cannot override this value by setting a new exportDisplayMask.
When importing data that has been previously exported by JBuilder, JBuilder looks for the corresponding schema file. If the schema file exists, JBuilder uses the exportDisplayMask information contained in the file to import the data. If the schema file doesn't exist, the setting for this property is used to import the data. If neither conditions exist and the data type of the column has international (localization) implications, the locale file for the Column is accessed for default display settings, for example, date and currency symbol. Otherwise, the export formatter is bypassed and a basic export mask is used.
The exportDisplayMask specification is used to create an instance of an exportFormatter (a VariantFormatter) class object that controls the formatting of the exported data. If you want custom rules beyond those provided by the JBCL, create your own class that implements ItemFormatStr and set the exportFormatter property to your custom class. In this case, do not set the exportDisplayMask as it will overwrite the exportFormattter property.
To reset an export display mask back to its default, call the setExportDisplayMask() method.
For examples of patterns used with export display masks, see Adding an Edit or Display Pattern to control data in the Database Application Developer's Guide.
See also: displayMask property, String-based patterns (masks)
public final VariantFormatter getExportFormatter() public final void setExportFormatter(borland.jbcl.model.VariantFormatter exportFormatter)The VariantFormatter implementation that provides formatting rules when exporting data in the Column. The implementation is specific to the data type of the Column, for example, BigDecimalFormatter.
In most cases, the exportDisplayMask property is used to provide formatting rules when exporting the data a Column. From the exportDisplayMask, an exportFormatter object is created that manages what the data looks like when it is exported.
If you want custom formatting rules beyond those provided by the JBCL, create a custom class that extends ItemFormatStr and set this property to an instance of that class. Do not set the exportDisplayMask property in addition to the exportFormatter property as the exportFormatter will be overridden.
public boolean isFixedPrecision() public void setFixedPrecision(boolean fixedPrecision)Stores whether the precision of decimal point values is fixed (true) or not (false).
public final Font getFont() public final void setFont(java.awt.Font font)Stores the font used to display the Column in a data-aware control. Valid values for the font are listed under java.awt.font.
public final Color getForeground() public final void setForeground(java.awt.Color foreground)Stores the foreground color of the Column when displayed in a data-aware control. Valid values for color are listed under java.awt.color.
public final VariantFormatter getFormatter() public final void setFormatter(borland.jbcl.model.VariantFormatter formatter)The VariantFormatter implementation that provides formatting rules when displaying data in the Column. The implementation is specific to the data type of the Column, for example, BigDecimalFormatter.
In most cases, the displayMask property is used to provide formatting rules for a Column. From the displayMask, a formatter object is created that manages the display of the data.
If you want more custom display rules than are provided by the JBCL, create a custom class that extends the VariantFormatter (or one of its subclasses) and set this property to an instance of that class. Do not set a displayMask in addition to the formatter property as the formatter will be overridden.
public final boolean isHidden() public final void setHidden(boolean hidden)This method is used internally by other classes in the JBCL. Do not use this method directly.
public final ItemEditor getItemEditor() public final void setItemEditor(borland.jbcl.model.ItemEditor itemEditor)Stores the ItemEditor (optional) that can be used by controls that support ViewManager properties, for example, the FieldControl, ListControl, and GridControl. The ItemEditor for this Column is passed a ColumnVariant as the "data" object. The ColumnVariant class extends the Variant class with getColumn() and getDataSet() methods. These can be used to provide more context about the Column, for example, its PickListDescriptor and DataSet properties.
public final ItemPainter getItemPainter() public final void setItemPainter(borland.jbcl.model.ItemPainter itemPainter)Stores the ItemPainter (optional) that can be used by controls that support ViewManager properties, for example, the FieldControl, ListControl, and GridControl. The ItemPainter for this Column is passed a ColumnVariant as the "data" object. The ColumnVariant class extends the Variant class with getColumn() and getDataSet() methods. These can be used to provide more context about the Column, for example, its PickListDescriptor and DataSet properties.
public final Locale getLocale() public final void setLocale(java.util.Locale locale) public final void setLocale(java.lang.String localeName)Stores the Locale object to use for formatting a Column. Locale contains country or area-specific formatting specifications such as date format (MM/DD/YY, DD/MM/YY, YY/MM/DD), currency symbol, and so on.
Set this property in code or through the Inspector. In the Inspector, select a locale from the drop-down list of locales, or to "<default>". Pressing the Delete key when editing this value removes any generated code that sets the locale property. This has the effect of resetting the locale to the DataSet class's locale.
If this property is not specified at the Column level, it defaults to the DataSet component's locale, if specified. Otherwise it default to the locale of the Java environment.
public final String getLocaleName() public final void setLocaleName(java.lang.String localeName)Get Locale. The 'locale' property allows the user to identify which locale to use in formatting a column Set Locale by name. The 'locale' property allows the user to identify which locale to use in formatting a column
public final String getMax() public final void setMax(java.lang.String maxString)Specifies the maximum allowable value (inclusive) in this Column as a String. The setMax() method throws a DataSetException if called on a Column of an open DataSet.
public final Variant getMaxValue() public final void setMaxValue(borland.jbcl.util.Variant maxValue)Specifies the maximum value allowable (inclusive) in this Column as a Variant. The setMaxValue() method throws a DataSetException if called on a Column of an open DataSet.
public final String getMin() public final void setMin(java.lang.String minString)Specifies the minimum allowable value (inclusive) in this Column. The setMin() method throws a DataSetException if called on a Column of an open DataSet.
public final Variant getMinValue() public final void setMinValue(borland.jbcl.util.Variant minValue)Stores the minimum value allowable (inclusive) in this Column as a Variant. The setMinValue() method throws a DataSetException if called on a Column of an open DataSet.
public int getOrdinal()Read-only property that specifies the ordinal position of the Column component within the DataSet.
public int getParameterType() public void setParameterType(int parameterType)Returns the type of parameter. For valid values for this property, see ParameterType variables.
public final boolean isPersist() public final void setPersist(boolean persist)Stores whether the Column is persisted in a DataSet when the application is run.
Any column for which a property has been explicitly set in the JBuilder Component Inspector is automatically set (internally) to persistent. This is indicated with square brackets ([]) around the Column component's name in the Component Tree.
By default, the columns that display in a data-aware control are determined at run-time based on the Columns that appear in the DataSet. If your application depends on particular columns displaying in the control, set this property programmatically to true. If the source column of the persistent column changes or is deleted, the column is left empty. No Exception is thrown.
public final PickListDescriptor getPickList() public final void setPickList(borland.jbcl.dataset.PickListDescriptor pickList)Specifies the PickListDescriptor for the Column which describes the relationship between the Column and a second, separate "pick list" or "lookup" DataSet.
Any control that follows the JBCL model-view architecture uses the pickListItemEditor as its itemEditor by default when this property is set. JBCL model-view controls include:
When you navigate to the Column with the pickList property specifying a PickListDescriptor object, the first column of the pickListDisplayColumns property of the pickListDataSet displays.
Although the pickListDisplayColumns property of the PickListDescriptor takes an array of Column components, only the first column is used by the PickListItemEditor. To display multiple columns in the picklist, set the itemEditor property of the Column to the PopupPickListItemEditor.
For an example of how to use the PickListDescriptor in your application, see Looking up choices with a pick list in the Database Application Developer's Guide.
public final int getPrecision() public final void setPrecision(int precision)Stores the precision used for the Column in data-aware controls. For a String column, precision represents the maximum length of a value.
public int getPreferredOrdinal() public void setPreferredOrdinal(int preferredOrdinal)Stores the preferred ordinal position of the Column in the DataSet. Normally, Columns that are defined in your application that are not provided by the query or procedure will appear before columns that are provided. Set this property to any value greater than or equal to zero to move this Column to that position in the DataSet. The first column ordinal is zero. You can set more than one column to the same ordinal value, however, the results may not be predictable. Columns whose preferredOrdinal is not set retain their position relative to each other.
This property defaults to -1 meaning that there is no preferred position for this Column.
public final boolean isReadOnly() public final void setReadOnly(boolean readOnly)Stores the whether the Column is writable or read-only. Setting readOnly to true disables modification of the data in the Column (both programmatically and through a UI control) and prevents the user from navigating to the Column. Setting readOnly to false allows both modification of the data and navigation to the Column. To restrict data editing from a data-aware control only (but allow data editing programmatically), set the editable property of the Column.
This property is automatically set to true when you set the calcType of this Column to any value other than NO_CALC.
A DataSetException is thrown if the setReadOnly() method is called on a Column of an open DataSet.
public final boolean isRequired() public final void setRequired(boolean required)Specifies whether values in the Column may be left blank at the time of posting the row of data to the DataSet. A DataSetException is thrown if the setRequired() method is called on a Column of an open DataSet.
public boolean isResolvable() public void setResolvable(boolean resolvable)
Specifies whether the Column is included when resolving changes back to it data source. By default, all non-calculated columns are set to true. If set to false, this Column will not be saved back to its data source during the resolution. This property is useful when saving a DataSet back to a SQL server when the DataSet has calculated or aggregation columns that should not be included in the resolution.
public final boolean isRowId() public final void setRowId(boolean rowId)Specifies whether the Column contains data that uniquely identifies the row. A unique row identifier (also known as a unique rowID) is necessary to save changes to the data in the DataSet back to its data source.
Several columns may have their rowId property set to true. This indicates that the values in these columns together uniquely identify a row.
public final int getScale() public final void setScale(int scale)Specifies the number of digits to the right of the decimal point for BIGDECIMAL values. This property is used by data-aware controls when displaying values in the Column.
You should set this property when working with BIGDECIMAL values. Otherwise, you get far more decimal places than most applications need.
public final String getSchemaName() public final void setSchemaName(java.lang.String schemaName)Specifies the schema name of the table that the Column belongs to. Used mostly with QueryDataSets to flag the table that a Column belongs to. This property may be left null.
public boolean isSearchable() public void setSearchable(boolean searchable)Specifies whether a Column is searchable (true) or not (false). Not all servers allow search operations on all data types, for example, binary data is commonly not searchable. JBuilder attempts to read this information from the server metadata whenever possible.
Columns that are not searchable are not used in the comparisons of an update query, even when the updateMode property is set to ALL_COLUMNS.
Note: Not all data accessed from SQL servers are searchable. Check your server documentation for more information on capabilities supported on its data types.
public final String getServerColumnName() public final void setServerColumnName(java.lang.String serverColumnName)Stores the name of the column that the server specified. If an alias to a column of a table is given in a query string, the alias would be the ServerColumnName, and the original name of the column in the table would appear as the ColumnName property. Most useful for QueryDataSet components. It may be left null.
public final boolean isSortable()Read-only property that stores whether the Column is sortable or not. JBuilder attempts to read such information from the server whenever possible. Typically, all Column components are sortable except those containing binary or Object data.
public final int getSortPrecision() public final void setSortPrecision(int precision)Stores the precision of the data in this Column. This property is used only for non english locales that use Collation keys for sorting.
public final int getSqlType() public void setSqlType(int sqlType)Stores the type of JDBC SqlType of the Column. Accepted values for SqlType are defined in java.sql.Types.
public final String getTableName() public final void setTableName(java.lang.String tableName)Stores the String table name that the Column belongs to. This property is used by the QueryDataSet component to identify the table a Column belongs to. For all StorageDataSet objects, the table name is the same for all Column components (unless the Column components were instantiated as a result of a SQL JOIN statement), or null.
public final boolean isTextual()Stores whether the Column contains data that can be represented by a String. For example, numeric, date, and string data return true. Data stored as binary data return false.
public final int getVisible() public final void setVisible(int visible)Specifies whether the Column is visible or hidden. If not set, default logic is used to determine whether to display the Column. For example, the linking column(s) of the detail DataSet in a master-detail relationship are hidden by default. Accepted values for visible are listed in borland.jbcl.util.TriStateProperty.
public int getWidth() public void setWidth(int width)The number of characters in the Column. This property is used in data-aware controls when displaying the Column.
For information on setting the width of a Column component's data (for example, the width of a String column), see the precision property.
public Object clone()Clones the Column and returns it as specified by Object.
Overrides: java.lang.Object.clone()
public Column copy()Creates and returns a complete copy of the Column, without unbinding the StorageDataSet.
public final String format(borland.jbcl.util.Variant value)Uses the formatter property to produce a String representation of the Variant. If there is no formatter for this Column, value.toString() is returned.
Parameters:
public final void getDefault(borland.jbcl.util.Variant value)Returns the default value set for the Column.
public boolean hasValidations()Read-only property that returns whether the Column has specified validation criteria in the form of:
public final void setDisplayMask()Sets the Column to its default formatter. This is different from calling setDisplayMask(null), which explicitly asks to select a preferred formatter based on locale.
public final void setEditMask()Sets the Column to its default editMasker. This is different from calling setEditMask(null), which explicitly asks to select a preferred editMasker based on locale.
public final void setExportDisplayMask()Sets the Column to its default formatter for import/export. This is different from setExportDisplayMask(null), which explicitly asks to select a preferred formatter based on locale.
public final void setLocaleName()An alternate way to set the Column component's locale back to its default.
public String toString()Returns the String representation of the Column.
Overrides: java.lang.Object.toString()
public void validate(borland.jbcl.dataset.DataSet editDataSet, borland.jbcl.util.Variant value)Validates the specified value against the Column component's validation criteria (minimum value, maximum value, and so on). On error, this method throws a ValidationException or DataSetException as applicable.
public void addColumnChangeListener(borland.jbcl.dataset.ColumnChangeListener listener) public synchronized void removeColumnChangeListener(borland.jbcl.dataset.ColumnChangeListener listener)
public void addColumnPaintListener(borland.jbcl.dataset.ColumnPaintListener listener) public synchronized void removeColumnPaintListener(borland.jbcl.dataset.ColumnPaintListener listener)