ix.ip2
Class AgendaTableViewer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTable
                          |
                          +--ix.iface.ui.table.IXTable
                                |
                                +--ix.iface.ui.table.IXTreeTable
                                      |
                                      +--ix.ip2.AgendaTableViewer
All Implemented Interfaces:
javax.accessibility.Accessible, ix.ip2.event.AgendaListener, AgendaViewer, javax.swing.event.CellEditorListener, java.util.EventListener, java.awt.image.ImageObserver, javax.swing.event.ListSelectionListener, java.awt.MenuContainer, java.awt.event.MouseListener, javax.swing.Scrollable, java.io.Serializable, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener
Direct Known Subclasses:
ActivityTableViewer, IssueTableViewer

public abstract class AgendaTableViewer
extends IXTreeTable
implements AgendaViewer, ix.ip2.event.AgendaListener

A table viewer for an agenda (set of agenda items). The items are managed by an AgendaManager (usually an Agenda).

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JTable
javax.swing.JTable.AccessibleJTable, javax.swing.JTable.BooleanEditor, javax.swing.JTable.BooleanRenderer, javax.swing.JTable.DateRenderer, javax.swing.JTable.DoubleRenderer, javax.swing.JTable.GenericEditor, javax.swing.JTable.IconRenderer, javax.swing.JTable.NumberEditor, javax.swing.JTable.NumberRenderer
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.ActionStandin, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardState
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
(package private)  AgendaManager agendaManager
           
protected  Ip2 ip2
           
(package private)  ItemEditor itemEditor
           
(package private)  AgendaItemTableModel model
           
 
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
 
Fields inherited from class javax.swing.JComponent
_bounds, accessibleContext, listenerList, paintingChild, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AgendaTableViewer(Ip2 ip2)
          Constructs a viewer for the indicated agent.
 
Method Summary
 void actionSelected(AgendaItem item, java.lang.String actionName)
           
 void addItem(AgendaItem i)
           
 void addItem(Priority priority, java.lang.String text)
           
 void addItem(java.lang.String text)
          Useful methods for adding test items.
 void clearTable()
          Clears what's displayed without resetting anything else.
 void editingCanceled(javax.swing.event.ChangeEvent e)
           
 void editingStopped(javax.swing.event.ChangeEvent e)
           
 void ensureItemEditor()
           
 void expandItem(AgendaItem i, Refinement instructions)
           
 HandlerAction findHandlerAction(AgendaItem item, java.lang.String shortDescription)
          Undoes a clearTable(), taking into acount any changes in open/closed status.
 void getNewItemFromUser()
           
 void handleItem(AgendaItem item, HandlerAction action)
           
 void itemAdded(ix.ip2.event.AgendaEvent event, AgendaItem i)
           
 void itemAdded(AgendaItem i)
          Called when an itemhas been added, adds the item to the table.
 void itemHandled(ix.ip2.event.AgendaEvent ae, AgendaItem item, HandlerAction act)
           
 void itemRemoved(ix.ip2.event.AgendaEvent event, AgendaItem i)
           
 AgendaItem makeItem(LList pattern)
           
protected abstract  ItemEditor makeItemEditor()
           
 void newBindings(ix.ip2.event.AgendaEvent event, java.util.Map bindings)
           
 void newHandlerAction(AgendaItem item, HandlerAction act)
           
 void reset()
          Sets the viewer back to something approximating its initial state.
 void saveExpansion(Refinement data)
           
 void setAgendaManager(AgendaManager agendaManager)
           
 void setItemEditor(ItemEditor itemEditor)
           
protected  void setShadowingAction(AgendaItem item, java.lang.String shortDescription, HandlerAction action)
           
(package private)  boolean shouldReplaceAction(AgendaItem item, java.lang.String actDescription)
           
 
Methods inherited from class ix.iface.ui.table.IXTable
addTableMouseListener, adjustWidths, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, removeTableMouseListener, setModel
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, compWriteObjectNotify, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getTableHeader, getToolTipText, getUI, getUIClassID, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isFocusTraversable, isManagingFocus, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setTableHeader, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged
 
Methods inherited from class javax.swing.JComponent
_paintImmediately, , addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, alwaysOnTop, checkIfChildObscuredBySibling, componentInputMapChanged, computeVisibleRect, computeVisibleRect, contains, createToolTip, disable, enable, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseMotionEvent, putClientProperty, rectangleIsObscured, rectangleIsObscuredBySibling, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFocusOwner, setLayout, transferFocus, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, constructComponentName, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resetGC, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ip2

protected Ip2 ip2

agendaManager

AgendaManager agendaManager

itemEditor

ItemEditor itemEditor

model

AgendaItemTableModel model
Constructor Detail

AgendaTableViewer

public AgendaTableViewer(Ip2 ip2)
Constructs a viewer for the indicated agent.
Method Detail

setItemEditor

public void setItemEditor(ItemEditor itemEditor)

ensureItemEditor

public void ensureItemEditor()

makeItemEditor

protected abstract ItemEditor makeItemEditor()

reset

public void reset()
Sets the viewer back to something approximating its initial state.
Specified by:
reset in interface AgendaViewer

clearTable

public void clearTable()
Clears what's displayed without resetting anything else. NOTE: the model clears its rows and nodes and notifies listeners.

findHandlerAction

public HandlerAction findHandlerAction(AgendaItem item,
                                       java.lang.String shortDescription)
Undoes a clearTable(), taking into acount any changes in open/closed status.

setShadowingAction

protected void setShadowingAction(AgendaItem item,
                                  java.lang.String shortDescription,
                                  HandlerAction action)

actionSelected

public void actionSelected(AgendaItem item,
                           java.lang.String actionName)

handleItem

public void handleItem(AgendaItem item,
                       HandlerAction action)

newHandlerAction

public void newHandlerAction(AgendaItem item,
                             HandlerAction act)

shouldReplaceAction

boolean shouldReplaceAction(AgendaItem item,
                            java.lang.String actDescription)

getNewItemFromUser

public void getNewItemFromUser()
Specified by:
getNewItemFromUser in interface AgendaViewer

makeItem

public AgendaItem makeItem(LList pattern)
Specified by:
makeItem in interface AgendaViewer

addItem

public void addItem(AgendaItem i)
Specified by:
addItem in interface AgendaViewer

saveExpansion

public void saveExpansion(Refinement data)
Specified by:
saveExpansion in interface AgendaViewer

expandItem

public void expandItem(AgendaItem i,
                       Refinement instructions)
Specified by:
expandItem in interface AgendaViewer

addItem

public void addItem(java.lang.String text)
Useful methods for adding test items. They assume that the text can be parsed w/o error. Note that the ItemEditor does not call these methods -- they are called only "internally", specifically for test items.

addItem

public void addItem(Priority priority,
                    java.lang.String text)

setAgendaManager

public void setAgendaManager(AgendaManager agendaManager)
Specified by:
setAgendaManager in interface AgendaViewer

itemAdded

public void itemAdded(ix.ip2.event.AgendaEvent event,
                      AgendaItem i)
Specified by:
itemAdded in interface ix.ip2.event.AgendaListener

itemAdded

public void itemAdded(AgendaItem i)
Called when an itemhas been added, adds the item to the table. An AgendaViewer thing - also used by AgendaListener method.

itemRemoved

public void itemRemoved(ix.ip2.event.AgendaEvent event,
                        AgendaItem i)
Specified by:
itemRemoved in interface ix.ip2.event.AgendaListener

itemHandled

public void itemHandled(ix.ip2.event.AgendaEvent ae,
                        AgendaItem item,
                        HandlerAction act)
Specified by:
itemHandled in interface ix.ip2.event.AgendaListener

newBindings

public void newBindings(ix.ip2.event.AgendaEvent event,
                        java.util.Map bindings)
Specified by:
newBindings in interface ix.ip2.event.AgendaListener

editingCanceled

public void editingCanceled(javax.swing.event.ChangeEvent e)
Overrides:
editingCanceled in class javax.swing.JTable

editingStopped

public void editingStopped(javax.swing.event.ChangeEvent e)
Overrides:
editingStopped in class javax.swing.JTable