com.dlsc.flexgantt.swing.treetable
Class TreeTableContainer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.dlsc.flexgantt.swing.AbstractGanttChart
                      extended by com.dlsc.flexgantt.swing.treetable.TreeTableContainer
All Implemented Interfaces:
IPagingModelListener, IColumnModelListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class TreeTableContainer
extends AbstractGanttChart

A somewhat limited Gantt chart implementation that is only capable of displaying a tree table. This container is required as the TreeTable was designed to only live within the context of a Gantt chart.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.dlsc.flexgantt.swing.AbstractGanttChart
PROPERTY_CALENDAR_MODEL, PROPERTY_CALENDAR_VISIBLE, PROPERTY_COLUMN_MODEL, PROPERTY_COMMAND_STACK, PROPERTY_CONTROLS_BG_COLOR, PROPERTY_CONTROLS_FG_COLOR, PROPERTY_CROSSHAIR_VISIBLE, PROPERTY_GRID_LINE_MODE, PROPERTY_KEY_COLUMN_POSITION, PROPERTY_LABELS_VISIBLE, PROPERTY_MODEL, PROPERTY_PAGING_MODEL, PROPERTY_POLICY_PROVIDER, PROPERTY_POPUP_VISIBLE, PROPERTY_RELATIONS_VISIBLE, PROPERTY_ROW_HEADER_WIDTH, PROPERTY_ROW_LAYER_VISIBLE, PROPERTY_ROW_RESIZE_POSITION, PROPERTY_TIME_NOW_SCROLLING, PROPERTY_TIME_NOW_VISIBLE, PROPERTY_VERTICAL_LINES_ON_TOP
 
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
TreeTableContainer()
          Constructs a new tree table container will use a DefaultColumnModel for the tree table / column header, a DefaultGanttChartModel as its data source and a DefaultComponentFactory to create the controls it requires.
TreeTableContainer(IColumnModel columnModel)
          Constructs a new tree table container that will use a DefaultGanttChartModel as a data source and a DefaultComponentFactory for creating the controls it needs.
TreeTableContainer(IComponentFactory compFactory)
          Constructs a new tree table container that will use a DefaultColumnModel for the tree table / column header and a DefaultGanttChartModel as its data source.
TreeTableContainer(IGanttChartModel model)
          Constructs a new tree table container that will use a DefaultColumnModel for the tree table / column header and a DefaultComponentFactory for creating the controls it needs.
TreeTableContainer(IGanttChartModel model, IColumnModel columnModel)
          Constructs a new tree table container that will use a DefaultComponentFactory to create the controls it needs.
TreeTableContainer(IGanttChartModel model, IColumnModel columnModel, IComponentFactory compFactory)
          Constructs a new tree table container.
TreeTableContainer(IGanttChartModel model, IComponentFactory compFactory)
          Constructs a new tree table container that will use a DefaultColumnModel for the tree table / column header.
 
Method Summary
 void alignEndTimes()
          Adjusts the end times of all currently selected and visible timeline objects so that they are all the same.
 void alignStartTimes()
          Adjusts the start times of all currently selected and visible timeline objects so that they are all the same.
 void collapseAll()
          Collapses all tree nodes in all tree tables.
 void expandAll()
          Expands all tree nodes in all tree tables.
 IGridComponent[] getGridComponents()
          Returns all grid components managed by the Gantt chart container.
 LayerContainer[] getLayerContainers()
          Returns all layer containers managed by the Gantt chart container.
 LayerContainerScrollPane[] getLayerContainerScrollPanes()
          Returns all layer container scrollpanes managed by the Gantt chart container.
 PrintContext[] getPrintContexts()
          Returns all print context supported by the Gantt chart.
 TreeTableRowHeader getRowHeader()
          The row header of the tree table.
 TreeTable getTreeTable()
          Returns the tree table.
 TreeTable[] getTreeTables()
          Returns all tree tables managed by the Gantt chart container.
 TreeTableScrollPane getTreeTableScrollPane()
          Returns the scrollpane that wraps the tree table, the row header and the column header.
 TreeTableScrollPane[] getTreeTableScrollPanes()
          Returns all tree table scrollpanes managed by the Gantt chart container.
 void print(boolean preview, ITimeSpan span)
          Prints the Gantt chart.
 void resetToPreferredSizes()
          Causes the Gantt chart to lay out its left- and right-hand side in such a way that the tree table on the left becomes fully visible.
 void showAllObjects()
          Scrolls and zooms the Dateline in such a way that all timeline objects (stored on the currently visible rows) become visible.
 void showEarliestObjects()
          Scrolls the Dateline in such a way that the earliest timeline objects (stored on the currently visible rows) become visible.
 void showLatestObjects()
          Scrolls the Dateline in such a way that the latest timeline objects (stored on the currently visible rows) become visible.
 void showMessageContext(IMessage msg)
          Shows the context of the given message.
 void showTime(long time, boolean center)
          Requests that the given time will be shown by the Gantt chart.
 void showTimeNow(boolean center)
          Requests that the time now will be shown by the Gantt chart.
 
Methods inherited from class com.dlsc.flexgantt.swing.AbstractGanttChart
addAvailableColumn, addMessage, addMessageListener, addSortingListener, addToolBarAction, clearMessages, clearToolBarActions, columnModelChanged, commandExecute, commandRedo, commandUndo, fireMessageAdded, fireMessageRemoved, fireMessagesCleared, fireSortingEvent, getAvailableColumns, getCalendarModel, getColumn, getColumnCount, getColumnModel, getCommandInterceptor, getCommandStack, getComponentFactory, getControlsBackground, getControlsForeground, getDateline, getDatelineModel, getEventline, getGridLineMode, getKeyColumn, getKeyColumnPosition, getMessages, getModel, getPagingModel, getPolicyProvider, getProgressMonitorFactory, getRowHeaderWidth, getRowResizePosition, getTimeline, getTimeSpan, getToolBarActions, getTreeTableHeader, initializeKeyStrokes, isCalendarVisible, isCrosshairVisible, isLabelsVisible, isPopupVisible, isRelationsVisible, isRowLayerVisible, isTimeNowScrolling, isTimeNowVisible, isVerticalLinesOnTop, pageChanged, pageWillChange, paint, paintRowResizePosition, print, propertyChange, removeAvailableColumn, removeMessage, removeMessageListener, removeSortingListener, removeToolBarAction, setCalendarModel, setCalendarVisible, setColumnModel, setCommandInterceptor, setCommandStack, setControlsBackground, setControlsForeground, setCrosshairVisible, setGranularity, setGridLineMode, setKeyColumnPosition, setLabelsVisible, setModel, setPagingModel, setPolicyProvider, setPopupVisible, setProgressMonitorFactory, setRelationsVisible, setRowHeaderWidth, setRowLayerVisible, setRowResizePosition, setTimeNowScrolling, setTimeNowVisible, setTimeSpan, setVerticalLinesOnTop, showMessage, showMessage, showMessage, showMessages, sortTables
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, doLayout, 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
 

Constructor Detail

TreeTableContainer

public TreeTableContainer(IGanttChartModel model,
                          IColumnModel columnModel,
                          IComponentFactory compFactory)
Constructs a new tree table container.

Parameters:
model - the model that will be used as a data source for the tree table and the layer container
columnModel - the data source for column information will be primarily used by the TreeTableHeader
compFactory - a factory for those UI components that are required by the tree table container
Since:
1.0

TreeTableContainer

public TreeTableContainer(IGanttChartModel model,
                          IColumnModel columnModel)
Constructs a new tree table container that will use a DefaultComponentFactory to create the controls it needs.

Parameters:
model - the model that will be used as a data source for the tree table and the layer container
columnModel - the data source for column information will be primarily used by the TreeTableHeader
Since:
1.0

TreeTableContainer

public TreeTableContainer(IGanttChartModel model,
                          IComponentFactory compFactory)
Constructs a new tree table container that will use a DefaultColumnModel for the tree table / column header.

Parameters:
model - the model that will be used as a data source for the tree table and the layer container
compFactory - a factory for those UI components that are required by the tree table container
Since:
1.0

TreeTableContainer

public TreeTableContainer(IGanttChartModel model)
Constructs a new tree table container that will use a DefaultColumnModel for the tree table / column header and a DefaultComponentFactory for creating the controls it needs.

Parameters:
model - the model that will be used as a data source for the tree table and the layer container
Since:
1.0

TreeTableContainer

public TreeTableContainer(IColumnModel columnModel)
Constructs a new tree table container that will use a DefaultGanttChartModel as a data source and a DefaultComponentFactory for creating the controls it needs.

Parameters:
columnModel - the data source for column information will be primarily used by the TreeTableHeader
Since:
1.0

TreeTableContainer

public TreeTableContainer(IComponentFactory compFactory)
Constructs a new tree table container that will use a DefaultColumnModel for the tree table / column header and a DefaultGanttChartModel as its data source.

Parameters:
compFactory - a factory for those UI components that are required by the tree table container
Since:
1.0

TreeTableContainer

public TreeTableContainer()
Constructs a new tree table container will use a DefaultColumnModel for the tree table / column header, a DefaultGanttChartModel as its data source and a DefaultComponentFactory to create the controls it requires.

Since:
1.0
Method Detail

getTreeTable

public TreeTable getTreeTable()
Returns the tree table.

Returns:
the tree table
Since:
1.0
See Also:
getTreeTableScrollPane()

getRowHeader

public TreeTableRowHeader getRowHeader()
The row header of the tree table. The header is responsible for rendering row numbers, selections, expand / collpase icons.

Returns:
the tree table's row header
Since:
1.0
See Also:
AbstractGanttChart.getTreeTableHeader()

getTreeTableScrollPane

public TreeTableScrollPane getTreeTableScrollPane()
Returns the scrollpane that wraps the tree table, the row header and the column header.

Returns:
the scrollpane of the tree table
Since:
1.0
See Also:
getTreeTable()

showEarliestObjects

public void showEarliestObjects()
Description copied from class: AbstractGanttChart
Scrolls the Dateline in such a way that the earliest timeline objects (stored on the currently visible rows) become visible.

Overrides:
showEarliestObjects in class AbstractGanttChart

showLatestObjects

public void showLatestObjects()
Description copied from class: AbstractGanttChart
Scrolls the Dateline in such a way that the latest timeline objects (stored on the currently visible rows) become visible.

Overrides:
showLatestObjects in class AbstractGanttChart

showAllObjects

public void showAllObjects()
Description copied from class: AbstractGanttChart
Scrolls and zooms the Dateline in such a way that all timeline objects (stored on the currently visible rows) become visible.

Overrides:
showAllObjects in class AbstractGanttChart

showTime

public void showTime(long time,
                     boolean center)
Description copied from class: AbstractGanttChart
Requests that the given time will be shown by the Gantt chart.

Overrides:
showTime in class AbstractGanttChart
Parameters:
time - the time to make visible
center - if TRUE the time now will be shown in the center / middle of the layer container, otherwise it will be on the left edge of the layer container
See Also:
AbstractGanttChart.showTimeNow(boolean)

showTimeNow

public void showTimeNow(boolean center)
Description copied from class: AbstractGanttChart
Requests that the time now will be shown by the Gantt chart.

Overrides:
showTimeNow in class AbstractGanttChart
Parameters:
center - if TRUE the time now will be shown in the center / middle of the layer container, otherwise it will be on the left edge of the layer container
See Also:
AbstractGanttChart.showTime(long, boolean)

print

public void print(boolean preview,
                  ITimeSpan span)
Description copied from class: AbstractGanttChart
Prints the Gantt chart.

Specified by:
print in class AbstractGanttChart
Parameters:
preview - if TRUE a preview dialog will be shown first before printing
span - the time span that needs to be printed

expandAll

public void expandAll()
Description copied from class: AbstractGanttChart
Expands all tree nodes in all tree tables.

Overrides:
expandAll in class AbstractGanttChart

collapseAll

public void collapseAll()
Description copied from class: AbstractGanttChart
Collapses all tree nodes in all tree tables.

Overrides:
collapseAll in class AbstractGanttChart

showMessageContext

public void showMessageContext(IMessage msg)
Description copied from class: AbstractGanttChart
Shows the context of the given message. If the message type is equal to TreePathMessage then the tree path will be opened. If the message is a TimelineObjectPathMessage then the matching timeline object will be shown.

Overrides:
showMessageContext in class AbstractGanttChart
Parameters:
msg - the message for which to show the context

resetToPreferredSizes

public void resetToPreferredSizes()
Description copied from class: AbstractGanttChart
Causes the Gantt chart to lay out its left- and right-hand side in such a way that the tree table on the left becomes fully visible.

Specified by:
resetToPreferredSizes in class AbstractGanttChart

alignEndTimes

public void alignEndTimes()
Description copied from class: AbstractGanttChart
Adjusts the end times of all currently selected and visible timeline objects so that they are all the same.

Overrides:
alignEndTimes in class AbstractGanttChart
See Also:
AbstractGanttChart.alignStartTimes()

alignStartTimes

public void alignStartTimes()
Description copied from class: AbstractGanttChart
Adjusts the start times of all currently selected and visible timeline objects so that they are all the same.

Overrides:
alignStartTimes in class AbstractGanttChart
See Also:
AbstractGanttChart.alignEndTimes()

getPrintContexts

public PrintContext[] getPrintContexts()
Description copied from class: AbstractGanttChart
Returns all print context supported by the Gantt chart. A standard Gantt chart will only return a single print context, a dual Gantt chart will return two contexts, ...

Specified by:
getPrintContexts in class AbstractGanttChart
Returns:
all print contexts supported by the Gantt chart

getLayerContainerScrollPanes

public LayerContainerScrollPane[] getLayerContainerScrollPanes()
Description copied from class: AbstractGanttChart
Returns all layer container scrollpanes managed by the Gantt chart container.

Specified by:
getLayerContainerScrollPanes in class AbstractGanttChart
Returns:
all layer container scrollpanes

getTreeTableScrollPanes

public TreeTableScrollPane[] getTreeTableScrollPanes()
Description copied from class: AbstractGanttChart
Returns all tree table scrollpanes managed by the Gantt chart container.

Specified by:
getTreeTableScrollPanes in class AbstractGanttChart
Returns:
all tree table scrollpanes

getGridComponents

public IGridComponent[] getGridComponents()
Description copied from class: AbstractGanttChart
Returns all grid components managed by the Gantt chart container. Layer containers and eventlines implement the grid component interface and can be controlled via GridControl instances.

Specified by:
getGridComponents in class AbstractGanttChart
Returns:
all grid components

getLayerContainers

public LayerContainer[] getLayerContainers()
Description copied from class: AbstractGanttChart
Returns all layer containers managed by the Gantt chart container.

Specified by:
getLayerContainers in class AbstractGanttChart
Returns:
all layer containers

getTreeTables

public TreeTable[] getTreeTables()
Description copied from class: AbstractGanttChart
Returns all tree tables managed by the Gantt chart container.

Specified by:
getTreeTables in class AbstractGanttChart
Returns:
all tree tables