|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.fopps.ui.TableController
TableController is a generic controller for tables. It listens to table events and notfies the registered item listeners.
After selection events the controller picks up the object in the significant column for each selected row and put it into the selection list. If this column contains a string, @see TableController#getSelectedObjects() returns an array of strings. Note There may be a column which represents the whole row data.
| Constructor Summary | |
TableController(EnhancedTable pTable)
|
|
| Method Summary | |
void |
addItemListener(java.awt.event.ItemListener pListener)
Adds a new item listener |
java.lang.Object |
getContainerObject()
|
int |
getObjectColumn()
|
java.lang.Object[] |
getSelectedObjects()
Returns the selected items or empty list if no items are selected. |
java.util.List |
getSelectedObjectsAsList()
Returns the selected items or empty list if no items are selected. |
EnhancedTable |
getTable()
|
ViewActionReceiver[] |
getViews()
Returns the corresponding view(s) of the controller |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
notifyListeners(java.awt.event.ItemEvent pEvent)
Notifies all item listeners |
void |
removeAllItemListener()
Removes all item listeners |
void |
removeItemListener(java.awt.event.ItemListener pListener)
Removes a item listener |
void |
setContainerObject(java.lang.Object containerObject)
|
void |
setObjectColumn(int objectColumn)
Sets the column which contains the item that should occur in the selection list. |
void |
tableChanged(javax.swing.event.TableModelEvent e)
This fine grain notification tells listeners the exact range of cells, rows, or columns that changed. |
void |
valueChanged(javax.swing.event.ListSelectionEvent e)
Called whenever the value of the selection changes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TableController(EnhancedTable pTable)
| Method Detail |
public EnhancedTable getTable()
public int getObjectColumn()
public void setObjectColumn(int objectColumn)
objectColumn - The column index which represents the whole rowpublic java.lang.Object getContainerObject()
public void setContainerObject(java.lang.Object containerObject)
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged in interface javax.swing.event.TableModelListenerpublic void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged in interface javax.swing.event.ListSelectionListenere - the event that characterizes the change.public java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectablepublic java.util.List getSelectedObjectsAsList()
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void addItemListener(java.awt.event.ItemListener pListener)
addItemListener in interface java.awt.ItemSelectablepListener - Listener to addpublic void removeItemListener(java.awt.event.ItemListener pListener)
removeItemListener in interface java.awt.ItemSelectablepListener - Listener to removepublic void removeAllItemListener()
public void notifyListeners(java.awt.event.ItemEvent pEvent)
public ViewActionReceiver[] getViews()
getViews in interface Controller
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||