Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.ui
Class JFormattedTableColumn

java.lang.Object
  extended by javax.swing.table.TableColumn
      extended by com.ibm.etools.iseries.ui.JFormattedTableColumn
All Implemented Interfaces:
JFormattedComponent, Serializable, Cloneable

public class JFormattedTableColumn
extends TableColumn
implements JFormattedComponent, Serializable, Cloneable

JFormattedTableColumn extends javax.swing.table.TableColumn and implements com.ibm.etools.iseries.ui.JFormattedComponent. It allows you to specify a FieldModel for the data presented in the column. The FieldModel is used to format and verify the AS/400 data. JFormattedTableColumn supports editcode, editword, formatting , and verification capabilities for AS/400 data. To allow for these capabilities, you should specify the column's cellEditor and cellRenderer as one of the following JFormatted celleditors or renderers: JFormattedTextFieldCellEditor, JFormattedComboBoxCellEditor, or JFormattedLabelCellRenderer. You can also specify whether the column is editable or not.

See Also:
FieldModel, JFormattedTable, JFormattedComponent, TableColumn, Serialized Form

Field Summary
static String Copyright
           
protected  PropertyChangeSupport propertyChange
           
protected  VetoableChangeSupport vetoPropertyChange
           
 
Fields inherited from class javax.swing.table.TableColumn
CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, COLUMN_WIDTH_PROPERTY, HEADER_RENDERER_PROPERTY, HEADER_VALUE_PROPERTY, headerRenderer, headerValue, identifier, isResizable, maxWidth, minWidth, modelIndex, resizedPostingDisableCount, width
 
Fields inherited from interface com.ibm.etools.iseries.ui.JFormattedComponent
copyright
 
Constructor Summary
JFormattedTableColumn()
          Creates a new JFormattedTableColumn.
JFormattedTableColumn(FieldModel fm)
          Creates a new JFormattedTableColumn with the specified field model.
JFormattedTableColumn(int modelIndex)
          Creates a new JFormattedTableColumn with the specified model index.
JFormattedTableColumn(int modelIndex, FieldModel fm)
          Creates a new JFormattedTableColumn with the specified model index and field model.
JFormattedTableColumn(int modelIndex, int width)
          Creates a new JFormattedTableColumn with the specified model index and width.
JFormattedTableColumn(int modelIndex, int width, FieldModel fm)
          Creates a new JFormattedTableColumn with the specified model index,width and FieldModel.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list for all properties.
 void addVetoableChangeListener(VetoableChangeListener listener)
          Adds a VetoableChangeListener to the listener list for all constrained properties.
 Object clone()
          Clones a JFormattedTableColumn.
static String Copyright()
          Copyright notice.
 void firePropertyChange(PropertyChangeEvent evt)
          Fires an existing PropertyChangeEvent to any registered listeners.
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Reports a bound property change.
 void fireVetoableChange(PropertyChangeEvent evt)
          Fires a vetoable property update to any registered listeners.
 boolean getCellEditable()
          Returns true/false if the cells of current table column are editable/noneditable.
 TableCellEditor getCellEditor()
          Gets the TableCellEditor component of the column.
 TableCellRenderer getCellRenderer()
          Gets the TableCellRenderer component of the column.
 TableCellEditor getColumnCellEditor()
          Returns the columnCellEditor.
 Attributes getEditmaskAttributes()
          Returns the editmaskAttributes
 EditmaskViewInterface getEditmaskViewUI()
          Returns editmaskViewUI property.
 FieldModel getFieldModel()
          Gets the FieldModel of the current column.
protected  PropertyChangeSupport getPropertyChange()
          Gets the propertyChange field.
protected  VetoableChangeSupport getVetoPropertyChange()
          Gets the vetoPropertyChange field.
 boolean hasListeners(String propertyName)
          Returns true if there is any listener for the specfied property.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener form listener list.
 void removeVetoableChangeListener(VetoableChangeListener listener)
          Removes a VetoableChangeListener from the listener list.
 void setCellEditable(boolean editable)
          Sets the cells of the column are editable or not.
 void setCellEditor(TableCellEditor aTableCellEditor)
          Sets TableCellEditor of the column.
 void setCellRenderer(TableCellRenderer aTableCellRenderer)
          Sets TableCellRenderer of the column.
 void setColumnCellEditor(TableCellEditor aTableCellEditor)
          Sets the columnCellEditor of the current column.
 void setEditmaskAttributes(Attributes aEditmaskAttributes)
          Sets the editmaskAttributes property (com.ibm.etools.iseries.ui.Attributes) value.
 void setEditmaskViewUI(EditmaskViewInterface aEditmaskViewInterface)
          Sets the editmaskViewUI property value.
 void setFieldModel(FieldModel aFieldModel)
          Sets the field model of the column.
 
Methods inherited from class javax.swing.table.TableColumn
createDefaultHeaderRenderer, disableResizedPosting, enableResizedPosting, getHeaderRenderer, getHeaderValue, getIdentifier, getMaxWidth, getMinWidth, getModelIndex, getPreferredWidth, getPropertyChangeListeners, getResizable, getWidth, setHeaderRenderer, setHeaderValue, setIdentifier, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

propertyChange

protected transient PropertyChangeSupport propertyChange

vetoPropertyChange

protected transient VetoableChangeSupport vetoPropertyChange
Constructor Detail

JFormattedTableColumn

public JFormattedTableColumn()
Creates a new JFormattedTableColumn.


JFormattedTableColumn

public JFormattedTableColumn(int modelIndex)
Creates a new JFormattedTableColumn with the specified model index.

Parameters:
modelIndex - The index of the column in the data model.

JFormattedTableColumn

public JFormattedTableColumn(int modelIndex,
                             int width)
Creates a new JFormattedTableColumn with the specified model index and width.

Parameters:
modelIndex - The index of the column in the data model.
width - The width of the column.

JFormattedTableColumn

public JFormattedTableColumn(int modelIndex,
                             int width,
                             FieldModel fm)
Creates a new JFormattedTableColumn with the specified model index,width and FieldModel.

Parameters:
modelIndex - The index of the column in the data model.
width - The width of the column.
fm - The field model for formatting and validating.

JFormattedTableColumn

public JFormattedTableColumn(int modelIndex,
                             FieldModel fm)
Creates a new JFormattedTableColumn with the specified model index and field model.

Parameters:
modelIndex - The index of the column in the data model.
fm - The field model for formatting and validating.

JFormattedTableColumn

public JFormattedTableColumn(FieldModel fm)
Creates a new JFormattedTableColumn with the specified field model. This field model will override the field model of JFormattedTextFieldCellEditor, JFormattedComboBoxCellEditor or JFormattedLabelCellRenderer if they are used as the cell editor or renderer of the JFormattedTableColumn.

Parameters:
fm - The field model for formatting and validating of this column.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for all properties.

Overrides:
addPropertyChangeListener in class TableColumn
Parameters:
listener - the PropertyChangeListener to be added

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a VetoableChangeListener to the listener list for all constrained properties.

Parameters:
listener - the VetoableChangeListener to be added

clone

public Object clone()
Clones a JFormattedTableColumn.

Overrides:
clone in class Object
Returns:
com.ibm.etools.iseries.ui.JFormattedTableColumn

Copyright

public static String Copyright()
Copyright notice.

Returns:
java.lang.String

firePropertyChange

public void firePropertyChange(PropertyChangeEvent evt)
Fires an existing PropertyChangeEvent to any registered listeners.

Parameters:
evt - The PropertyChangeEvent to be fired.

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
Reports a bound property change.

Parameters:
propertyName - The name of the property to listen on.
oldValue - The old value of the property.
newValue - The new value of the property.

fireVetoableChange

public void fireVetoableChange(PropertyChangeEvent evt)
                        throws PropertyVetoException
Fires a vetoable property update to any registered listeners.

Parameters:
evt - The PropertyChangeEvent to be fired.
Throws:
PropertyVetoException

getCellEditable

public boolean getCellEditable()
Returns true/false if the cells of current table column are editable/noneditable.


getCellEditor

public TableCellEditor getCellEditor()
Gets the TableCellEditor component of the column.

Overrides:
getCellEditor in class TableColumn
Returns:
javax.swing.table.TableCellEditor
See Also:
TableColumn.getCellEditor()

getCellRenderer

public TableCellRenderer getCellRenderer()
Gets the TableCellRenderer component of the column.

Overrides:
getCellRenderer in class TableColumn
Returns:
javax.swing.table.TableCellRenderer
See Also:
TableColumn.getCellRenderer()

getColumnCellEditor

public TableCellEditor getColumnCellEditor()
Returns the columnCellEditor. The columnCellEditor is the equivalent of TableCellEditor of the column and help you specify the TableCellEditor easily inside Visual Composition Editor.

Returns:
javax.swing.TableCellEditor

getEditmaskAttributes

public Attributes getEditmaskAttributes()
Returns the editmaskAttributes

Returns:
com.ibm.etools.iseries.ui.Attributes

getEditmaskViewUI

public EditmaskViewInterface getEditmaskViewUI()
Returns editmaskViewUI property.

Returns:
com.ibm.etools.iseries.ui.EditmaskViewInterface

getFieldModel

public FieldModel getFieldModel()
Gets the FieldModel of the current column.

Specified by:
getFieldModel in interface JFormattedComponent
Returns:
com.ibm.etools.iseries.ui.FieldModel

getPropertyChange

protected PropertyChangeSupport getPropertyChange()
Gets the propertyChange field.


getVetoPropertyChange

protected VetoableChangeSupport getVetoPropertyChange()
Gets the vetoPropertyChange field.


hasListeners

public boolean hasListeners(String propertyName)
Returns true if there is any listener for the specfied property.

Parameters:
propertyName - The name of property.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener form listener list.

Overrides:
removePropertyChangeListener in class TableColumn
Parameters:
listener - the PropertyChangeListener to be removed.

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a VetoableChangeListener from the listener list. The VetoableChangeListener to be removed was registered for all properties.

Parameters:
listener - The VetoableChangeListener to be removed.

setCellEditable

public void setCellEditable(boolean editable)
Sets the cells of the column are editable or not.

Parameters:
editable - The new value for the property.

setCellEditor

public void setCellEditor(TableCellEditor aTableCellEditor)
Sets TableCellEditor of the column. It will call setColumnCellEditor(TableCellEditor).

Overrides:
setCellEditor in class TableColumn
Parameters:
aTableCellEditor - The cell editor to be set.
See Also:
TableColumn.setCellEditor(javax.swing.table.TableCellEditor)

setCellRenderer

public void setCellRenderer(TableCellRenderer aTableCellRenderer)
Sets TableCellRenderer of the column.

Overrides:
setCellRenderer in class TableColumn
Parameters:
aTableCellRenderer - The cell renderer to be set.
See Also:
TableColumn.setCellRenderer(javax.swing.table.TableCellRenderer)

setColumnCellEditor

public void setColumnCellEditor(TableCellEditor aTableCellEditor)
Sets the columnCellEditor of the current column. The columnCellEditor is an equivalent of TableCellEditor of the column. When you use JFormattedTableColumn inside Visual Composition Editor, you can easily specify TableCellEditor of the column by specifying columnCellEditor from the column's property sheet.

Parameters:
aTableCellEditor - The cell editor to be set for the column. If the editor is a JFormatted bean, the field model of the editor will be overrided by the field model of the column. Also, if the editor is a JFormattedTextFieldCellEditor, the editmaskAttributes of the editor will be overrided by the editmaskAttributes of the column.
See Also:
TableCellEditor

setEditmaskAttributes

public void setEditmaskAttributes(Attributes aEditmaskAttributes)
                           throws PropertyVetoException
Sets the editmaskAttributes property (com.ibm.etools.iseries.ui.Attributes) value. The editmaskAttributes is only valid if the TableCellEditor of this column is a JFormattedTextFieldCellEditor. It will override the editmaskAttributes property of the JFormattedTextFieldCellEditor. Please note that the parameter must be an instance of com.ibm.etools.iseries.ui.EditmaskAttributes; otherwise java.beans.PropertyVetoException will be thrown at run time.

Parameters:
aEditmaskAttributes - The editmaskAttribute to be set for the column.
Throws:
PropertyVetoException

setEditmaskViewUI

public void setEditmaskViewUI(EditmaskViewInterface aEditmaskViewInterface)
Sets the editmaskViewUI property value. The editmaskViewUI has to be set only if editmaskAttributes is set and is for editmask feature only. The editmaskViewUI is only valid if the TableCellEditor of this column is a JFormattedTextFieldCellEditor. It will override the editmaskViewUI property of the JFormattedTextFieldCellEditor.

Parameters:
aEditmaskViewInterface - The new value for the property.

setFieldModel

public void setFieldModel(FieldModel aFieldModel)
Sets the field model of the column. If the current column uses JFormattedTextFieldCellEditor, JFormattedComboBoxCellEditor as the cell editor, or JFormattedLabelCellRenderer as the cell renderer, this field model will override the field model of them.

Specified by:
setFieldModel in interface JFormattedComponent
Parameters:
aFieldModel - The field model for formatting and validating.
See Also:
JFormattedComponent.getFieldModel()

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.