org.tastybug.bugwerk.bugtrail.widget.queue
Class TicketQueueStatisticsTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTable
                  extended by org.tastybug.bugwerk.bugtrail.widget.queue.TicketQueueStatisticsTable
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, TableColumnModelListener, TableModelListener, Scrollable, TicketChangeListener, TicketQueueChangeListener, QueueWorker

public class TicketQueueStatisticsTable
extends JTable
implements QueueWorker, TicketChangeListener

This JTable displays the number of all- / unreported tickets in the connected ticket queue.
Internally, the table is a QueueWorker, i.e. it listens for activity on the queue and refreshes the content upon necessity. The table is not editable.
Use it like this:

 TicketQueueStatisticsTable table = new TicketQueueStatisticsTable();
 table.connectQueue(Adapters.getAdapter("myProject").getTicketQueue());
 


Copyright 2006 Philipp Bartsch.
www.tastybug.com

Created on Feb 9, 2006

Author:
Philipp Bartsch, philipp.bartsch{at}tastybug{dot}com
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTable
JTable.AccessibleJTable, JTable.PrintMode
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Nested classes/interfaces inherited from interface org.tastybug.bugwerk.blueprint.event.TicketQueueChangeListener
TicketQueueChangeListener.TicketQueueEvent
 
Nested classes/interfaces inherited from interface org.tastybug.bugwerk.blueprint.event.TicketChangeListener
TicketChangeListener.IncidentEvent, TicketChangeListener.TicketChangeEvent
 
Field Summary
 
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
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TicketQueueStatisticsTable()
          Creates the table.
 
Method Summary
 void addQueueWorkerListener(QueueWorkerListener qwListener)
          Does nothing as you cannot listen to this queue worker.
 void connectQueue(TicketQueue queue)
          Registers the queue that is to be displayed; former queue will be dropped.
 void fireIncidentProcessedEvent(Incident arg0, boolean arg1, String arg2)
          Does nothing.
 void fireTicketProcessedEvent(Ticket arg0, boolean arg1, String arg2)
          Does nothing.
 QueueWorkerListener[] getQueueWorkerListeners()
          Returns an empty array.
 void performIncidentAddedEvent(TicketChangeListener.IncidentEvent event)
          Updates table model and UI.
 void performIncidentRemovedEvent(TicketChangeListener.IncidentEvent event)
          Updates table model and UI.
 void performTicketAddedEvent(TicketQueueChangeListener.TicketQueueEvent event)
          Updates table model and UI.
 void performTicketChangedEvent(TicketChangeListener.TicketChangeEvent event)
          Updates table model and UI.
 void performTicketRemovedEvent(TicketQueueChangeListener.TicketQueueEvent event)
          Updates table model and UI.
 void processQueue(boolean isUserDriven)
          Updates table model and UI.
 boolean removeQueueWorkerListener(QueueWorkerListener qwListener)
          Does nothing as you cannot listen to this queue worker.
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tastybug.bugwerk.bugtrap.base.worker.QueueWorker
getName
 

Constructor Detail

TicketQueueStatisticsTable

public TicketQueueStatisticsTable()
Creates the table. Renderer and model are embedded as soon as the target ticket queue is declared.

Method Detail

performTicketRemovedEvent

public void performTicketRemovedEvent(TicketQueueChangeListener.TicketQueueEvent event)
Updates table model and UI.

Specified by:
performTicketRemovedEvent in interface TicketQueueChangeListener
See Also:
TicketQueueChangeListener.performTicketRemovedEvent(org.tastybug.bugwerk.blueprint.event.TicketQueueChangeListener.TicketQueueEvent)

performTicketAddedEvent

public void performTicketAddedEvent(TicketQueueChangeListener.TicketQueueEvent event)
Updates table model and UI.

Specified by:
performTicketAddedEvent in interface TicketQueueChangeListener
See Also:
TicketQueueChangeListener.performTicketAddedEvent(org.tastybug.bugwerk.blueprint.event.TicketQueueChangeListener.TicketQueueEvent)

performIncidentRemovedEvent

public void performIncidentRemovedEvent(TicketChangeListener.IncidentEvent event)
Updates table model and UI.

Specified by:
performIncidentRemovedEvent in interface TicketChangeListener
See Also:
TicketChangeListener.performIncidentRemovedEvent(org.tastybug.bugwerk.blueprint.event.TicketChangeListener.IncidentEvent)

performIncidentAddedEvent

public void performIncidentAddedEvent(TicketChangeListener.IncidentEvent event)
Updates table model and UI.

Specified by:
performIncidentAddedEvent in interface TicketChangeListener
See Also:
TicketChangeListener.performIncidentAddedEvent(org.tastybug.bugwerk.blueprint.event.TicketChangeListener.IncidentEvent)

performTicketChangedEvent

public void performTicketChangedEvent(TicketChangeListener.TicketChangeEvent event)
Updates table model and UI.

Specified by:
performTicketChangedEvent in interface TicketChangeListener
See Also:
TicketChangeListener.performTicketChangedEvent(org.tastybug.bugwerk.blueprint.event.TicketChangeListener.TicketChangeEvent)

connectQueue

public void connectQueue(TicketQueue queue)
Registers the queue that is to be displayed; former queue will be dropped.

Specified by:
connectQueue in interface QueueWorker
See Also:
QueueWorker.connectQueue(org.tastybug.bugwerk.blueprint.model.TicketQueue)

addQueueWorkerListener

public void addQueueWorkerListener(QueueWorkerListener qwListener)
Does nothing as you cannot listen to this queue worker.

Specified by:
addQueueWorkerListener in interface QueueWorker
See Also:
QueueWorker.addQueueWorkerListener(org.tastybug.bugwerk.bugtrap.base.worker.QueueWorkerListener)

removeQueueWorkerListener

public boolean removeQueueWorkerListener(QueueWorkerListener qwListener)
Does nothing as you cannot listen to this queue worker.

Specified by:
removeQueueWorkerListener in interface QueueWorker
See Also:
QueueWorker.removeQueueWorkerListener(org.tastybug.bugwerk.bugtrap.base.worker.QueueWorkerListener)

getQueueWorkerListeners

public QueueWorkerListener[] getQueueWorkerListeners()
Returns an empty array.

Specified by:
getQueueWorkerListeners in interface QueueWorker
See Also:
QueueWorker.getQueueWorkerListeners()

processQueue

public void processQueue(boolean isUserDriven)
Updates table model and UI.

Specified by:
processQueue in interface QueueWorker
See Also:
QueueWorker.processQueue(boolean)

fireIncidentProcessedEvent

public void fireIncidentProcessedEvent(Incident arg0,
                                       boolean arg1,
                                       String arg2)
Does nothing.

Specified by:
fireIncidentProcessedEvent in interface QueueWorker
See Also:
QueueWorker.fireIncidentProcessedEvent(org.tastybug.bugwerk.blueprint.model.Incident, boolean, java.lang.String)

fireTicketProcessedEvent

public void fireTicketProcessedEvent(Ticket arg0,
                                     boolean arg1,
                                     String arg2)
Does nothing.

Specified by:
fireTicketProcessedEvent in interface QueueWorker
See Also:
QueueWorker.fireTicketProcessedEvent(org.tastybug.bugwerk.blueprint.model.Ticket, boolean, java.lang.String)


Copyright © 2006-2007 TastyBug Development. All Rights Reserved.