net.simplace.pipe.formcomponents.choice.FWFormTableOption

Used by FWTableChoiceSubComponent to store selectable options and their attributes in a javax.swing.table.TableModel. This class works different FWFormOption: The reason why this class inherits FWFormOption is to maintain the instances in FWChoiceFormComponent without any special cases. There are two ways to construct a FWFormTableOption:
  1. Specifying XML-Element in constructor: In this case the table column values are extracted from element children:
  2. Specifying java.sql.ResultSet or java.sql.ResultSetMetaData in constructor: In this case the table column values are determined from element children:



public class FWFormTableOption extends FWFormOption {
// Public Constructors
public FWFormTableOption(String aId, String aText, Element aOptionElem);
public FWFormTableOption(String aId, String aText, ResultSetMetaData
aResultMetaData);
public FWFormTableOption(String aId, String aText, ResultSet aResultSet);
public FWFormTableOption(String aId, String aText, Vector aColNames, Vector
aColTypes);
public FWFormTableOption(String aId, String aText, Vector aColValues);

// Protected Instance Variables
protected boolean iIsHeader;
protected Vector iColValues;
protected Vector iColTypes;

// Public Instance Methods
public void setImage(ImageIcon aImage); // Overrides FWFormOption

Always throws java.lang.UnsupportedOperationException (unless aImage is not null) because net.simplace.pipe.formcomponents.choice.FWFormTableOption does not yet support images.
public boolean isHeader();

Returns whether the net.simplace.pipe.formcomponents.choice.FWFormTableOption represents the table header (TRUE) or a table row (FALSE).
public Vector getColumnValues();

Returns the column values or the column names (depending on net.simplace.pipe.formcomponents.choice.FWFormTableOption.isHeader().
public Vector getColumnTypes();

Returns the column types if {@link #isHeader() is true. For data rows it returns the specific data types of the individual data object (may differ from column class!).

// Protected Instance Methods
protected void init(Element aColDef);

Called by constructor to initializes net.simplace.pipe.formcomponents.choice.FWFormTableOption from XML-Element.
protected void init(ResultSetMetaData aResultMetaData);

Called by constructor to initializes net.simplace.pipe.formcomponents.choice.FWFormTableOption as table header from java.sql.ResultSetMetaData.
protected void init(ResultSet aResultSet);

Called by constructor to initializes net.simplace.pipe.formcomponents.choice.FWFormTableOption as table row from java.sql.ResultSet.
protected void init(Vector aColValues, Vector aColTypes);

Called by constructor to initializes net.simplace.pipe.formcomponents.choice.FWFormTableOption "from scratch". Whether table option represents header or row depends on parameter aColType. If it is not null a header option is created with specified types. Otherwise a row option is created (types are determines from values).


}



Hierarchy: java.lang.Object - FWFormOption - FWFormTableOption



Returned by: FWTableChoiceSubComponent.FWTableModel.getHeaderOption(), FWTableChoiceSubComponent.FWTableModel.getRowOption()



Type of: FWTableChoiceSubComponent.FWTableModel.iHeadOption