SalesPoint v3.3 API

users.stdforms
Class UserTableFormSheet

java.lang.Object
  extended by sale.FormSheet
      extended by users.stdforms.UserTableFormSheet
All Implemented Interfaces:
Serializable

public class UserTableFormSheet
extends FormSheet

A FormSheet displaying the contents of a UserManager.

Since:
v3.0
Author:
Thomas Medack, Andreas Bartho
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class sale.FormSheet
FormSheet.FormButton
 
Field Summary
 
Fields inherited from class sale.FormSheet
BTNID_CANCEL, BTNID_OK, m_fCancelled
 
Constructor Summary
UserTableFormSheet(String sCaption, UserManager um, JComponent c, UIGate uigGate, Comparator<User> cmp, TableEntryDescriptor ted)
          Create a new UserTableFormSheet.
 
Method Summary
 TableColumnModel getColumnModel()
          Get the TableColumnModel of the JUserTable which is displayed.
 UIGate getGate()
          Get the Gate this FormSheet is currently being displayed at.
 User getSelectedRecord()
          Get the record currently selected.
 ListSelectionModel getSelectionModel()
          Get the ListSelectionModel of the JUserTable which is displayed.
 JTable getTable()
          Gets the table.
 Object getTableSource()
          Get the table's source.
 void setGate(UIGate uigGate)
          Set the gate at which to display the FormSheet.
 void setTableModel(AbstractTableModel tm)
          Changes the TableModel of a table.
 
Methods inherited from class sale.FormSheet
addButton, addButton, addContentCreator, attach, attach, attach, buttonIterator, buttonIterator, cancel, close, detachDisplay, detachProcess, detachSalesPoint, fillBtnPanel, getButton, getButtonsLock, getCaption, getComponent, getComponentLock, getDisplay, getDisplayLock, getProcess, getSalesPoint, isCancelled, ok, removeAllButtons, removeButton, setCaption, setComponent, setWaitResponse, toString, waitResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserTableFormSheet

public UserTableFormSheet(String sCaption,
                          UserManager um,
                          JComponent c,
                          UIGate uigGate,
                          Comparator<User> cmp,
                          TableEntryDescriptor ted)
Create a new UserTableFormSheet. The "FormSheet.waitResponse()" property will default to true.

Parameters:
sCaption - the FormSheet's caption.
um - the UserManager which will be displayed
c - a JComponent which can be optionally displayed with the JUserTable. The JComponent of the FormSheet will be a JPanel. The JPanels contains a JSplitPane. The first JComponent of the JPanel is the JUserTable and the second is this JComponent. If it is null, only the JUserTable will be displayed.
uigGate - the Gate at which the FormSheet is displayed.
cmp - a comparator defining the order in which to display the individual users. If null the Userrecords will be ordered by their names.
ted - a TableEntryDescriptor that can split the UserManager's entries into a table's cells. Must not be null.
Method Detail

getTable

public JTable getTable()
Gets the table.

Override:
Never

setTableModel

public void setTableModel(AbstractTableModel tm)
Changes the TableModel of a table.

Parameters:
tm - the new TableModel

getTableSource

public Object getTableSource()
Get the table's source.

Returns:
the UserManager from which the table was built. The class of the returned UserManager is Object to keep consistency with SingleTableFormSheet.
Override:
Never

setGate

public void setGate(UIGate uigGate)
Set the gate at which to display the FormSheet. This will also move the FormSheet to that gate, i.e. make the FormSheet the FormSheet of the given gate.

Parameters:
uigGate - the new Gate.
See Also:
UIGate.setFormSheet(sale.FormSheet)
Override:
Never

getGate

public UIGate getGate()
Get the Gate this FormSheet is currently being displayed at.

Override:
Never

getSelectedRecord

public User getSelectedRecord()
Get the record currently selected.

The actual class of the record depends on the concrete type of TableModel used. See the TableModel's getRecord() method for details.


getSelectionModel

public ListSelectionModel getSelectionModel()
Get the ListSelectionModel of the JUserTable which is displayed.


getColumnModel

public TableColumnModel getColumnModel()
Get the TableColumnModel of the JUserTable which is displayed.


SalesPoint v3.3 API