ix.ip2
Class AgendaItemTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
ix.iface.ui.table.AbstractIXTableModel
ix.iface.ui.table.AbstractTreeTableModel
ix.ip2.AgendaItemTableModel
- All Implemented Interfaces:
- TableMouseListener, java.io.Serializable, javax.swing.table.TableModel
public class AgendaItemTableModel
- extends AbstractTreeTableModel
A TreeTableModel that can display Issue objects.
- See Also:
- Serialized Form
Fields inherited from class ix.iface.ui.table.AbstractTreeTableModel |
CLOSEDC, CLOSEDI, INDENT_STEP, LEAFC, LEAFI, nameColumn, nodeMap, nodes, OPENC, OPENI, treeIconColumn |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Method Summary |
void |
clearData()
Removes all data objects from the table's rows and notifies listeners. |
void |
fireActionSelected(AgendaItem item,
HandlerAction act)
|
void |
fireItemChanged(AgendaItemTableModel.TreeAgendaItem treeItem)
|
void |
fireItemDeleted(AgendaItem item)
|
void |
fireTableChanged()
|
void |
fireTableStructureChanged()
This should not be necessary and is dangerous, but it stops
the column widths from getting changed when rows are deleted. |
java.lang.Object |
getCellValueAt(java.lang.Object o,
int columnIndex)
Gets the cell value for normal cells (only one - the pattern). |
HandlerAction |
getHandlerAction(AgendaItem item)
|
java.lang.String |
getNameString(javax.swing.tree.TreeNode item)
Gets the name string of the object (row) |
protected java.lang.Object |
getTreeValueAt(IXTreeTableNode eNode)
Gets the value that indicates the tree-position (indented name). |
boolean |
isCellEditable(int row,
int col)
|
void |
itemAdded(AgendaItem item)
Only adds the node if the parents are empty (deal with sub-nodes in tree). |
void |
itemHandled(AgendaEvent ae,
AgendaItem item,
HandlerAction act)
|
void |
itemRemoved(AgendaItem i)
|
IXTreeTableNode |
makeIXTreeTableNode(java.lang.Object original)
|
void |
setColumnVars()
|
void |
setHandlerAction(AgendaItem item,
HandlerAction action)
|
void |
setPriorityValue(AgendaItem item,
java.lang.Object val,
int row,
int col)
|
void |
setPriorityValue(java.lang.Object value,
int row,
int col)
|
void |
setValueAt(java.lang.Object value,
int row,
int col)
|
boolean |
takesAction(int row)
|
boolean |
takesPriority(int row)
|
Methods inherited from class ix.iface.ui.table.AbstractTreeTableModel |
addData, addTreeNode, addTreeTableModelListener, cellClicked, clearTable, deriveColumnFields, expandNode, fireNodeStructureChanged, fireObjectChanged, fireTreeStructureChanged, forceExpandNode, getNodeRow, getObjectRow, getParentsBold, getRowNode, getRowObject, getTreeNode, getTreeNode, getTreeNodeType, getValueAt, isExpanding, isParentsBold, ixTTNListToString, makeIXTreeTableNode, removeChildData, removeChildren, removeData, removeDataNode, removeNodes, removeTreeNode, setColumnFields, setColumnNames, setColumnPlaces, setData, setData, setParentsBold, unexpandNode, updateData |
Methods inherited from class ix.iface.ui.table.AbstractIXTableModel |
addData, addMarkListener, clearMarks, defaultGetCellValueAt, defaultSetColumnFields, fireTableMarkAdded, fireTableMarkCleared, fireTableMarkedAll, fireTableMarkRemoved, getColumnClass, getColumnCount, getColumnName, getColumnNames, getData, getMarkedObjects, getMarkedRows, getRowCount, isMarkable, isMarked, isMarkedEmpty, markAll, markRow, removeMarkListener, replaceData, setColumnClasses, unmarkRow |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
table
protected AgendaTableViewer table
DESCRIPTION_COL
public int DESCRIPTION_COL
COMMENTS_COL
public int COMMENTS_COL
PRIORITY_COL
public int PRIORITY_COL
ACTION_COL
public int ACTION_COL
AgendaItemTableModel
public AgendaItemTableModel(AgendaTableViewer table)
setColumnVars
public void setColumnVars()
itemAdded
public void itemAdded(AgendaItem item)
- Only adds the node if the parents are empty (deal with sub-nodes in tree).
If there is a parent, make sure it is expanded so that new nodes are
shown.
Also add an itemListener to the item because now it is officially added to
the agenda.
itemRemoved
public void itemRemoved(AgendaItem i)
clearData
public void clearData()
- Description copied from class:
AbstractIXTableModel
- Removes all data objects from the table's rows and notifies listeners.
- Overrides:
clearData
in class AbstractTreeTableModel
getNameString
public java.lang.String getNameString(javax.swing.tree.TreeNode item)
- Gets the name string of the object (row)
- Specified by:
getNameString
in class AbstractTreeTableModel
- Returns:
- the string to use as a name for the object.
getTreeValueAt
protected java.lang.Object getTreeValueAt(IXTreeTableNode eNode)
- Description copied from class:
AbstractTreeTableModel
- Gets the value that indicates the tree-position (indented name).
- Overrides:
getTreeValueAt
in class AbstractTreeTableModel
- Returns:
- an object that can be rendered by the table.
getCellValueAt
public java.lang.Object getCellValueAt(java.lang.Object o,
int columnIndex)
- Gets the cell value for normal cells (only one - the pattern).
The name cell (description) is done in the method getTreeValueAt.
- Specified by:
getCellValueAt
in class AbstractTreeTableModel
- Returns:
- the value as an object, null for illegal columns.
isCellEditable
public boolean isCellEditable(int row,
int col)
- Specified by:
isCellEditable
in interface javax.swing.table.TableModel
- Overrides:
isCellEditable
in class AbstractTreeTableModel
takesPriority
public boolean takesPriority(int row)
takesAction
public boolean takesAction(int row)
setValueAt
public void setValueAt(java.lang.Object value,
int row,
int col)
- Specified by:
setValueAt
in interface javax.swing.table.TableModel
- Overrides:
setValueAt
in class AbstractIXTableModel
setPriorityValue
public void setPriorityValue(AgendaItem item,
java.lang.Object val,
int row,
int col)
setPriorityValue
public void setPriorityValue(java.lang.Object value,
int row,
int col)
itemHandled
public void itemHandled(AgendaEvent ae,
AgendaItem item,
HandlerAction act)
setHandlerAction
public void setHandlerAction(AgendaItem item,
HandlerAction action)
getHandlerAction
public HandlerAction getHandlerAction(AgendaItem item)
fireTableStructureChanged
public void fireTableStructureChanged()
- This should not be necessary and is dangerous, but it stops
the column widths from getting changed when rows are deleted.
- Overrides:
fireTableStructureChanged
in class javax.swing.table.AbstractTableModel
fireTableChanged
public void fireTableChanged()
fireItemChanged
public void fireItemChanged(AgendaItemTableModel.TreeAgendaItem treeItem)
fireActionSelected
public void fireActionSelected(AgendaItem item,
HandlerAction act)
fireItemDeleted
public void fireItemDeleted(AgendaItem item)
makeIXTreeTableNode
public IXTreeTableNode makeIXTreeTableNode(java.lang.Object original)
- Specified by:
makeIXTreeTableNode
in class AbstractTreeTableModel