net.simplace.pipe.formcomponents.choice.FWTableChoiceSubComponent

This class is used to visualize a FWChoiceFormComponent of type "table". Each table row represents a choice value. The parameter "selectionColIdx" determines from which table column the choice value is taken (Default: 0 = first column). Like for FWListChoiceSubComponent multi selection is possible. In this case Restrictions:


public class FWTableChoiceSubComponent extends
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent implements
javax.swing.event.ListSelectionListener {
// Public Constructors
public FWTableChoiceSubComponent(Vector aOptions, boolean aMultiSelect,
boolean aRequired, boolean aIsEnabled, boolean aShowAll, FWObservable
aObservable, Map aFormComponentParameterMap, String aDefaultValueID,
String aChoiceFieldId);

// Protected Instance Variables
protected SortableJTable iTable;
protected FWTableChoiceSubComponent.FWTableModel iTableModel;
protected boolean iIsMultiSelect;
protected boolean iIsRequired;
protected boolean iShowAll;
protected int iSelectionColIdx;
protected String iWhereFormParam;
protected String iMultiselectSeperatorParam;
protected boolean iUseApostroph;
protected String iChoiceFieldId;

// Public Instance Methods
public Dimension getPreferredSize(); // Defines javax.swing.JComponent

Returns the preferred size for the sub component. If the table is smaller than the preferred scroll pane size, then the table's size is returned (+ table header size).
public String getValue(); // Defines
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent


Returns the current table selection. Depending on single or multi selection the functions returns a single cell value (
public List getSelectedValueList(); // Defines
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent


Returns all selected values as list. In single selection mode the list always contains only one element.
public void setValue(String aValues); // Defines
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent


Sets the table selection by value. Multiple values can be specified as comma-separated list of values. If no table row with a value to select (in selection column) can be identified, the specified value(s) are used as option ids to define a selection. Note: If multiple table rows contain the same value in the selection column, only the FIRST row is selected (even in multi selection mode!)
public void setSelectedIDs(String aIds);

Sets the table selection by option id. Multiple option ids can be specified as comma-separated list.
public void updateTable(Vector aFormOptionVector);

Updates the choice list
public void setEnabled(boolean aIsEnabled);
// Defines net.simplace.pipe.formcomponents.FWAbstractFormSubComponent


Allows to set the value of the implemented subcomponent
public void valueChanged(ListSelectionEvent e);
// From javax.swing.event.ListSelectionListener


Notifies the parent component whenever the value (selection) of this component changes


// Inner Classes
protected class FWTableChoiceSubComponent.FWTableModel extends
javax.swing.table.AbstractTableModel
}



Hierarchy: java.lang.Object - java.awt.Component (java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable) - java.awt.Container - javax.swing.JComponent (java.io.Serializable, javax.swing.TransferHandler.HasGetTransferHandler) - javax.swing.JPanel (javax.accessibility.Accessible) - net.simplace.pipe.formcomponents.FWAbstractFormSubComponent - FWTableChoiceSubComponent (javax.swing.event.ListSelectionListener)