com.dlsc.flexgantt.swing

## Class DualGanttChart

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - javax.swing.JComponent
      - - javax.swing.JPanel
        - - com.dlsc.flexgantt.swing.AbstractGanttChart
          - - com.dlsc.flexgantt.swing.DualGanttChart

- All Implemented Interfaces:
    ICommandStackListener, IPagingModelListener, IColumnModelListener, KeyListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible
  Direct Known Subclasses:
    MacDualGanttChart, SimpleGranularityDualGanttChart

      public class DualGanttChart
      extends AbstractGanttChart

  A dual Gantt Chart is capable of displaying two charts at the same time while keeping the two left-hand sides and the two right-hand sides synchronized during horizontal scrolling operations. The two charts share the same column header for their tree tables and the same timeline for their layer containers. This class uses the notion of a primary and a secondary model / tree table / layer container. The primary model gets displayed on top of the secondary model. The secondary model can be shown or hidden programmatically or via user interaction.

  Since:
    1.0
  Version:
    $Revision: 1.24 $
  Author:
    Dirk Lemmermann
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.dlsc.flexgantt.swing.AbstractGanttChart

      `AbstractGanttChart.Banner`

    - ### Nested classes/interfaces inherited from class javax.swing.JPanel

      `JPanel.AccessibleJPanel`

    - ### 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PROPERTY_HORIZONTAL_SPLITTER_LOCATION` Constant used for the name of those property change events that get fired when the application changes the location of the horizontal splitter.
    `static String` | `PROPERTY_PRIMARY_PRINT_MANAGER` Constant used for the name of those property change events that get fired when the application changes the primary print manager property.
    `static String` | `PROPERTY_SECONDARY_MODEL` Constant used for dealing with property change events that get triggered when the secondary Gantt chart model gets changed.
    `static String` | `PROPERTY_SECONDARY_PRINT_MANAGER` Constant used for the name of those property change events that get fired when the application changes the secondary print manager property.
    `static String` | `PROPERTY_SECONDARY_VISIBLE` Constant used for dealing with property change events.
    `static String` | `PROPERTY_VERTICAL_SPLITTER_LOCATION` Constant used for the name of those property change events that get fired when the application changes the location of the vertical splitter.

    - ### Fields inherited from class com.dlsc.flexgantt.swing.AbstractGanttChart

      `PROPERTY_ACTIVE_SPREADSHEET, 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_LAYER_CONTAINER_ROW_HEADER_WIDTH, PROPERTY_MODEL, PROPERTY_PAGING_MODEL, PROPERTY_POLICY_PROVIDER, PROPERTY_POPUP_VISIBLE, PROPERTY_RELATIONS_VISIBLE, PROPERTY_ROW_LAYER_VISIBLE, PROPERTY_ROW_RESIZE_POSITION, PROPERTY_TIME_NOW_SCROLLING, PROPERTY_TIME_NOW_VISIBLE, PROPERTY_TREE_TABLE_ROW_HEADER_WIDTH, PROPERTY_VERTICAL_LINES_ON_TOP`

    - ### Fields inherited from class javax.swing.JComponent

      `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

      `accessibleContext, 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

    Constructors
    Constructor and Description
    `DualGanttChart()` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
    `DualGanttChart(IColumnModel columnModel)` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
    `DualGanttChart(IComponentFactory compFactory)` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
    `DualGanttChart(IGanttChartModel model)` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
    `DualGanttChart(IGanttChartModel primaryModel, IGanttChartModel secondaryModel)` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
    `DualGanttChart(IGanttChartModel primaryModel, IGanttChartModel secondaryModel, IColumnModel columnModel)` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
    `DualGanttChart(IGanttChartModel primaryModel, IGanttChartModel secondaryModel, IColumnModel columnModel, IComponentFactory compFactory)` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
    `DualGanttChart(IGanttChartModel primaryModel, IGanttChartModel secondaryModel, IComponentFactory compFactory)` Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected LayerContainerScrollPane` | `createLayerContainerScrollPane(boolean primary, TreeTableScrollPane tableScrollPane, LayerContainer lc)` Creates the right-hand side of a Gantt chart, a scrollpane that wraps a timeline (including dateline and eventline) and a layer container.
    `protected TreeTableScrollPane` | `createTreeTableScrollPane(boolean primary, IGanttChartModel model, TreeTable table)` Creates the left-hand side of a Gantt chart, a scrollpane that wraps a tree table, a column header and a row header.
    `protected int` | `getFixedHorizonalSplitterLocation(int location)` Returns a location for the horizontal splitter that obeys the following constraints: location is larger than the minimum height of the primary tree table scrollpane (equivalent to the height of the column header) location is smaller than the minimum height of the secondary layer container scrollpane (equivalent to height of horizontal scrollbar) Obeying these constraints ensures that the column header, the timeline and the horizontal scrollbars will always remain visible after the user performed a drag operation via the horizontal splitter.
    `protected int` | `getFixedVerticalSplitterLocation(int location)` Returns a location for the vertical splitter that obeys the following constraints: location is larger than the minimum width of the primary tree table scrollpane (equivalent to the width of the row header) location is smaller than the minimum width of the primary layer container scrollpane (equivalent to width of vertical scrollbar) Obeying these constraints ensures that the row header and the vertical scrollbars will always remain visible after the user performed a drag operation via the vertical splitter.
    `IGridComponent[]` | `getGridComponents()` Returns all grid components managed by the Gantt chart container.
    `JScrollBar` | `getHorizontalLayerContainerScrollBar()` Returns the horizontal scrollbar, which is used for the layer container scrollpane.
    `JComponent` | `getHorizontalSplitter()` Returns the component used to realize the horizontal splitter.
    `int` | `getHorizontalSplitterLocation()` Returns the location of the horizontal splitter, which separates the primary / upper Gantt chart from the secondary / lower Gantt chart.
    `JScrollBar` | `getHorizontalTreeTableScrollBar()` Returns the horizontal scrollbar, which is used for the tree table scrollpane.
    `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.
    `LayerContainer` | `getPrimaryLayerContainer()` Returns the primary layer container.
    `LayerContainerRowHeader` | `getPrimaryLayerContainerRowHeader()` Returns the row header that gets used in combination with the primary layer container.
    `LayerContainerScrollPane` | `getPrimaryLayerContainerScrollPane()` Returns the scrollpane for the primary layer container.
    `IPrintManager` | `getPrimaryPrintManager()` Returns the print manager used for printing the primary Gantt chart (the upper part).
    `TreeTable` | `getPrimaryTreeTable()` Returns the primary tree table.
    `TreeTableRowHeader` | `getPrimaryTreeTableRowHeader()` Returns the primary row header.
    `TreeTableScrollPane` | `getPrimaryTreeTableScrollPane()` Returns the scrollpane used for the primary tree table.
    `PrintContext[]` | `getPrintContexts()` Returns all print context supported by the Gantt chart.
    `LayerContainer` | `getSecondaryLayerContainer()` Returns the secondary layer container.
    `LayerContainerRowHeader` | `getSecondaryLayerContainerRowHeader()` Returns the row header that gets used in combination with the secondary layer container.
    `LayerContainerScrollPane` | `getSecondaryLayerContainerScrollPane()` Returns the secondary layer container scrollpane.
    `IGanttChartModel` | `getSecondaryModel()` Returns the secondary Gantt chart model.
    `IPrintManager` | `getSecondaryPrintManager()` Returns the print manager used for printing the secondary Gantt chart (the lower part).
    `PrintSetup` | `getSecondaryPrintSetup()` Returns the secondary print setup object, which is used to configure the decorative elements of a printout (header and footer).
    `TreeTable` | `getSecondaryTreeTable()` Returns the secondary tree table.
    `TreeTableRowHeader` | `getSecondaryTreeTableRowHeader()` Returns the secondary row header.
    `TreeTableScrollPane` | `getSecondaryTreeTableScrollPane()` Returns the secondary tree table scrollpane.
    `double` | `getSecondaryWeight()` Returns the weight that will be used to calculate the initial height of the secondary Gantt chart when it first becomes visible.
    `int` | `getSplitterSize()` Returns the width of the vertical splitter and the height of the horizontal splitter.
    `TreeTable[]` | `getTreeTables()` Returns all tree tables managed by the Gantt chart container.
    `TreeTableScrollPane[]` | `getTreeTableScrollPanes()` Returns all tree table scrollpanes managed by the Gantt chart container.
    `JComponent` | `getVerticalSplitter()` Returns the component used to realize the vertical splitter.
    `int` | `getVerticalSplitterLocation()` Returns the location of the vertical splitter, which separates the left-hand side from the right-hand side of the Gantt chart.
    `boolean` | `isSecondaryVisible()` Returns TRUE if the secondary Gantt chart is visible.
    `void` | `print(boolean preview)` Prints the Gantt chart.
    `void` | `print(boolean preview, ITimeSpan span)` Prints the Gantt chart.
    `void` | `printSecondaryModel(boolean preview)` Prints a Gantt chart based on the secondary model.
    `void` | `printSecondaryModel(boolean preview, ITimeSpan span)` Prints a Gantt chart based on the secondary model.
    `void` | `propertyChange(PropertyChangeEvent evt)`
    `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` | `setHorizontalSplitterLocation(int location)` Specifies the location of the horizontal splitter, which separates the primary / upper Gantt chart from the secondary / lower Gantt chart.
    `void` | `setModel(IGanttChartModel model)` Specifies a model to be used by the Gantt chart as a data source.
    `void` | `setPrimaryPrintManager(IPrintManager manager)` Sets the print manager to be used for the upper Gantt chart when the application invokes printing.
    `void` | `setSecondaryModel(IGanttChartModel model)` Specifies a new secondary Gantt chart model.
    `void` | `setSecondaryPrintManager(IPrintManager manager)` Sets the print manager to be used for the lower Gantt chart when the application invokes printing.
    `void` | `setSecondaryPrintSetup(PrintSetup ps)` Specifies a new secondary print setup object, which is used to configure the decorative elements of a printout (header and footer).
    `void` | `setSecondaryVisible(boolean visible)` Determines whether the secondary Gantt chart is visible or not.
    `void` | `setSecondaryWeight(double weight)` Sets the weight used to calculate the initial height of the secondary chart.
    `void` | `setSplitterSize(int size)` Sets the width of the vertical splitter and the height of the horizontal splitter.
    `void` | `setVerticalSplitterLocation(int location)` Specifies the location of the vertical splitter, which separates the left-hand side from the right-hand side of the Gantt chart.
    `void` | `tearDown()` Tears down the Gantt chart by calling `Eventline.tearDown()` and `LayerContainer.tearDown()` on all layer containers used within the Gantt chart (e.g. the `DualGanttChart` will call `tearDown()` on two layer containers.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.AbstractGanttChart

      `addAvailableColumn, addMessage, addMessageListener, addSortingListener, addToolBarAction, alignEndTimes, alignStartTimes, clearMessages, clearToolBarActions, collapseAll, columnModelChanged, commandExecute, commandRedo, commandStackChanged, commandUndo, createPrintableGanttChart, expandAll, fireMessageAdded, fireMessageRemoved, fireMessagesCleared, fireSortingEvent, getActiveSpreadsheet, getAvailableColumns, getCalendarModel, getColumn, getColumnCount, getColumnModel, getCommandInterceptor, getCommandStack, getComponentFactory, getControlsBackground, getControlsForeground, getDateline, getDatelineModel, getEventline, getGranularity, getGridLineMode, getKeyColumn, getKeyColumnPosition, getLayerContainerRowHeaderWidth, getMessages, getModel, getPagingModel, getPolicyProvider, getPrintSetup, getProgressMonitorFactory, getRowResizePosition, getSelectorFactory, getTimeline, getTimeSpan, getToolBarActions, getTreeTableHeader, getTreeTableRowHeaderWidth, isCalendarVisible, isCrosshairVisible, isLabelsVisible, isPopupVisible, isRelationsVisible, isRowLayerVisible, isShowingCommandExceptions, isTimeNowScrolling, isTimeNowVisible, isVerticalLinesOnTop, keyPressed, keyReleased, keyTyped, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, pageChanged, pageWillChange, paint, paintRowResizePosition, removeAvailableColumn, removeMessage, removeMessageListener, removeSortingListener, removeToolBarAction, setActiveSpreadsheet, setAvailableColumns, setCalendarModel, setCalendarVisible, setColumnModel, setCommandInterceptor, setCommandStack, setControlsBackground, setControlsForeground, setCrosshairVisible, setEnabled, setGranularity, setGridLineMode, setKeyColumnPosition, setLabelsVisible, setLayerContainerRowHeaderWidth, setPagingModel, setPolicyProvider, setPopupVisible, setPrintSetup, setProgressMonitorFactory, setRelationsVisible, setRowLayerVisible, setRowResizePosition, setShowingCommandExceptions, setTimeNowScrolling, setTimeNowVisible, setTimeSpan, setTreeTableRowHeaderWidth, setVerticalLinesOnTop, showAllObjects, showEarliestObjects, showLatestObjects, showMessage, showMessage, showMessage, showMessageContext, showMessages, showTime, showTimeNow, 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, getBaseline, getBaselineResizeBehavior, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, 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, 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, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### PROPERTY_SECONDARY_MODEL

          public static final String PROPERTY_SECONDARY_MODEL

      Constant used for dealing with property change events that get triggered when the secondary Gantt chart model gets changed.
      Since:
        1.0
      See Also:
        `setSecondaryModel(IGanttChartModel)`, `PropertyChangeEvent.getPropertyName()`, `Container.addPropertyChangeListener(java.beans.PropertyChangeListener)`, Constant Field Values

    - #### PROPERTY_SECONDARY_VISIBLE

          public static final String PROPERTY_SECONDARY_VISIBLE

      Constant used for dealing with property change events.
      Since:
        1.0
      See Also:
        `PropertyChangeEvent.getPropertyName()`, `Container.addPropertyChangeListener(java.beans.PropertyChangeListener)`, Constant Field Values

    - #### PROPERTY_PRIMARY_PRINT_MANAGER

          public static final String PROPERTY_PRIMARY_PRINT_MANAGER

      Constant used for the name of those property change events that get fired when the application changes the primary print manager property.
      Since:
        1.0
      See Also:
        Constant Field Values

    - #### PROPERTY_SECONDARY_PRINT_MANAGER

          public static final String PROPERTY_SECONDARY_PRINT_MANAGER

      Constant used for the name of those property change events that get fired when the application changes the secondary print manager property.
      Since:
        1.0
      See Also:
        Constant Field Values

    - #### PROPERTY_VERTICAL_SPLITTER_LOCATION

          public static final String PROPERTY_VERTICAL_SPLITTER_LOCATION

      Constant used for the name of those property change events that get fired when the application changes the location of the vertical splitter.
      Since:
        1.1.3
      See Also:
        Constant Field Values

    - #### PROPERTY_HORIZONTAL_SPLITTER_LOCATION

          public static final String PROPERTY_HORIZONTAL_SPLITTER_LOCATION

      Constant used for the name of those property change events that get fired when the application changes the location of the horizontal splitter.
      Since:
        1.1.3
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DualGanttChart

          public DualGanttChart(IGanttChartModel primaryModel,
                                IGanttChartModel secondaryModel,
                                IColumnModel columnModel,
                                IComponentFactory compFactory)

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model).
      Parameters:
        `primaryModel` - the first model that will be displayed in the upper user interface components (primary tree table, layer container)
        `secondaryModel` - the second model that will be displayed in the lower user interface components (secondary tree table, layer container)
        `columnModel` - the model used for the column header
        `compFactory` - a factory for creating the various user interface components that constitute a Gantt chart (table, layer container, column header, ...)
      Since:
        1.0

    - #### DualGanttChart

          public DualGanttChart(IGanttChartModel primaryModel,
                                IGanttChartModel secondaryModel,
                                IColumnModel columnModel)

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model). The component factory used by the Gantt chart is a `DefaultComponentFactory`.
      Parameters:
        `primaryModel` - the first model that will be displayed in the upper user interface components (primary tree table, layer container)
        `secondaryModel` - the second model that will be displayed in the lower user interface components (secondary tree table, layer container)
        `columnModel` - the model used for the column header
      Since:
        1.0

    - #### DualGanttChart

          public DualGanttChart(IGanttChartModel primaryModel,
                                IGanttChartModel secondaryModel,
                                IComponentFactory compFactory)

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model). The column model is an instance of `DefaultColumnModel`.
      Parameters:
        `primaryModel` - the first model that will be displayed in the upper user interface components (primary tree table, layer container)
        `secondaryModel` - the second model that will be displayed in the lower user interface components (secondary tree table, layer container)
        `compFactory` - a factory for creating the various user interface components that constitute a Gantt chart (table, layer container, column header, ...)
      Since:
        1.0

    - #### DualGanttChart

          public DualGanttChart(IGanttChartModel primaryModel,
                                IGanttChartModel secondaryModel)

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model). The component factory used by the Gantt chart is a `DefaultComponentFactory`. The column model is an instance of `DefaultColumnModel`.
      Parameters:
        `primaryModel` - the first model that will be displayed in the upper user interface components (primary tree table, layer container)
        `secondaryModel` - the second model that will be displayed in the lower user interface components (secondary tree table, layer container)
      Since:
        1.0

    - #### DualGanttChart

          public DualGanttChart(IGanttChartModel model)

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model). This constructor is special because the single model passed to it will be used for both, the upper and the lower chart. This basically allows the user to have two different views at the same chart (for example to compare two regions with each other or to ease drag and drop operations). The component factory used by the Gantt chart is a `DefaultComponentFactory`.
      Parameters:
        `model` - the model that will be displayed in the upper and the lower user interface components
      Since:
        1.0

    - #### DualGanttChart

          public DualGanttChart(IColumnModel columnModel)

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model). As no models are passed to the constructor two `DefaultGanttChartModel` instances will be created instead. The component factory used by the Gantt chart is a `DefaultComponentFactory`.
      Parameters:
        `columnModel` - the model used for the column header
      Since:
        1.0

    - #### DualGanttChart

          public DualGanttChart(IComponentFactory compFactory)

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model). As no models are passed to the constructor two `DefaultGanttChartModel` instances will be created instead. The Gantt chart's column model is an instance of `DefaultColumnModel`.
      Parameters:
        `compFactory` - a factory for creating the various user interface components that constitute a Gantt chart (table, layer container, column header, ...)
      Since:
        1.0

    - #### DualGanttChart

          public DualGanttChart()

      Constructs a new Gantt chart that is capable of displaying two models at the same time (a primary and a secondary model). As no models are passed to the constructor two `DefaultGanttChartModel` instances will be created instead. The component factory used by the Gantt chart is a `DefaultComponentFactory` and the column model is an instance of `DefaultColumnModel`.
      Since:
        1.0

  - ### Method Detail

    - #### getSecondaryModel

          public IGanttChartModel getSecondaryModel()

      Returns the secondary Gantt chart model. The data provided by this data source will be displayed in the lower tree table and layer container.
      Returns:
        the second Gantt chart model
      Since:
        1.0
      See Also:
        `setSecondaryModel(IGanttChartModel)`

    - #### setSecondaryModel

          public void setSecondaryModel(IGanttChartModel model)

      Specifies a new secondary Gantt chart model. The data provided by this data source will be displayed in the lower tree table and layer container. Calling this method will cause a property change event to be fired. The event name is equal to `PROPERTY_SECONDARY_MODEL`.
      Parameters:
        `model` - the new secondary model
      Since:
        1.0
      See Also:
        `getSecondaryModel()`

    - #### isSecondaryVisible

          public boolean isSecondaryVisible()

      Returns TRUE if the secondary Gantt chart is visible.
      Returns:
        TRUE if the secondary Gantt chart is visible
      Since:
        1.0
      See Also:
        `setSecondaryVisible(boolean)`

    - #### setSecondaryVisible

          public void setSecondaryVisible(boolean visible)

      Determines whether the secondary Gantt chart is visible or not. Calling this method will cause a property change event to be fired where the event name is equal to `PROPERTY_SECONDARY_VISIBLE`.
      Parameters:
        `visible` - determines visibility of the secondary Gantt chart
      Since:
        1.0
      See Also:
        `isSecondaryVisible()`

    - #### getSecondaryWeight

          public double getSecondaryWeight()

      Returns the weight that will be used to calculate the initial height of the secondary Gantt chart when it first becomes visible.
      Returns:
        the weight used for the height calculation of the secondary Gantt chart
      Since:
        1.0
      See Also:
        `setSecondaryWeight(double)`

    - #### setSecondaryWeight

          public void setSecondaryWeight(double weight)

      Sets the weight used to calculate the initial height of the secondary chart. The weight has to be a value within the interval [0,1]. The initial height will be calculated as `weight * height` where `height` is the height of the Dual Gantt chart container.
      Parameters:
        `weight` - the weight variable (must be within [0,1])
      Since:
        1.0
      See Also:
        `getSecondaryWeight()`

    - #### 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

    - #### 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

    - #### getPrimaryLayerContainer

          public LayerContainer getPrimaryLayerContainer()

      Returns the primary layer container.
      Returns:
        the primary layer container
      Since:
        1.0
      See Also:
        `getPrimaryLayerContainerScrollPane()`, `getSecondaryLayerContainer()`

    - #### getPrimaryLayerContainerRowHeader

          public LayerContainerRowHeader getPrimaryLayerContainerRowHeader()

      Returns the row header that gets used in combination with the primary layer container. It is shown to the left of the layer container inside the layer container scrollpane.
      Returns:
        the row header of the primary layer container scrollpane
      Since:
        1.0

    - #### getPrimaryLayerContainerScrollPane

          public LayerContainerScrollPane getPrimaryLayerContainerScrollPane()

      Returns the scrollpane for the primary layer container.
      Returns:
        the scrollpane used for the primary layer container
      Since:
        1.0
      See Also:
        `getPrimaryLayerContainer()`, `getSecondaryLayerContainerScrollPane()`

    - #### getPrimaryTreeTable

          public TreeTable getPrimaryTreeTable()

      Returns the primary tree table.
      Returns:
        the primary tree table
      Since:
        1.0
      See Also:
        `getPrimaryTreeTableScrollPane()`, `getSecondaryTreeTable()`

    - #### getPrimaryTreeTableScrollPane

          public TreeTableScrollPane getPrimaryTreeTableScrollPane()

      Returns the scrollpane used for the primary tree table.
      Returns:
        the scrollpane used for the primary tree table
      Since:
        1.0
      See Also:
        `getPrimaryTreeTable()`, `getSecondaryTreeTableScrollPane()`

    - #### getPrimaryTreeTableRowHeader

          public TreeTableRowHeader getPrimaryTreeTableRowHeader()

      Returns the primary row header.
      Returns:
        the primary row header
      Since:
        1.0
      See Also:
        `getSecondaryTreeTableRowHeader()`

    - #### getSecondaryLayerContainer

          public LayerContainer getSecondaryLayerContainer()

      Returns the secondary layer container.
      Returns:
        the secondary layer container
      Since:
        1.0
      See Also:
        `getSecondaryLayerContainerScrollPane()`, `getPrimaryLayerContainer()`

    - #### getSecondaryLayerContainerRowHeader

          public LayerContainerRowHeader getSecondaryLayerContainerRowHeader()

      Returns the row header that gets used in combination with the secondary layer container. It is shown to the left of the layer container inside the layer container scrollpane.
      Returns:
        the row header of the secondary layer container scrollpane
      Since:
        1.0

    - #### getSecondaryLayerContainerScrollPane

          public LayerContainerScrollPane getSecondaryLayerContainerScrollPane()

      Returns the secondary layer container scrollpane.
      Returns:
        the scrollpane used for the secondary layer container
      Since:
        1.0
      See Also:
        `getSecondaryLayerContainer()`, `getPrimaryLayerContainerScrollPane()`

    - #### getSecondaryTreeTable

          public TreeTable getSecondaryTreeTable()

      Returns the secondary tree table.
      Returns:
        the secondary tree table
      Since:
        1.0
      See Also:
        `getSecondaryTreeTableScrollPane()`, `getPrimaryTreeTable()`

    - #### getSecondaryTreeTableScrollPane

          public TreeTableScrollPane getSecondaryTreeTableScrollPane()

      Returns the secondary tree table scrollpane.
      Returns:
        the scrollpane used for the secondary tree trable
      Since:
        1.0
      See Also:
        `getSecondaryTreeTable()`, `getPrimaryTreeTableScrollPane()`

    - #### getSecondaryTreeTableRowHeader

          public TreeTableRowHeader getSecondaryTreeTableRowHeader()

      Returns the secondary row header.
      Returns:
        the secondary row header
      Since:
        1.0
      See Also:
        `getPrimaryTreeTableRowHeader()`

    - #### createTreeTableScrollPane

          protected TreeTableScrollPane createTreeTableScrollPane(boolean primary,
                                                                  IGanttChartModel model,
                                                                  TreeTable table)

      Creates the left-hand side of a Gantt chart, a scrollpane that wraps a tree table, a column header and a row header. The method will delegate the actual creation of the user interface components to a component factory (see `IComponentFactory`).
      Parameters:
        `primary` - specifies whether the tree table scrollpane will be used for the primary Gantt chart
        `model` - the data source
        `table` - the table for which to create a scrollpane
      Returns:
        a tree table scrollpane to be used as the left-hand side of a Gantt chart
      Since:
        1.0
      See Also:
        `createLayerContainerScrollPane(boolean, TreeTableScrollPane, LayerContainer)`

    - #### createLayerContainerScrollPane

          protected LayerContainerScrollPane createLayerContainerScrollPane(boolean primary,
                                                                            TreeTableScrollPane tableScrollPane,
                                                                            LayerContainer lc)

      Creates the right-hand side of a Gantt chart, a scrollpane that wraps a timeline (including dateline and eventline) and a layer container. The timeline will only be added if the layer container is used for the primary Gantt chart.
      Parameters:
        `primary` - specifies whether the layer container scrollpane will be used for the primary Gantt chart
        `tableScrollPane` - the scrollpane of the tree table to the left of the layer container scrollpane
        `lc` - the layer container for which to create a scrollpane
      Returns:
        a layer container scrollpane to be used as the right-hand side of a Gantt chart
      Since:
        1.0

    - #### getVerticalSplitterLocation

          public int getVerticalSplitterLocation()

      Returns the location of the vertical splitter, which separates the left-hand side from the right-hand side of the Gantt chart.
      Returns:
        the location of the vertical splitter
      Since:
        1.0
      See Also:
        `setVerticalSplitterLocation(int)`

    - #### setVerticalSplitterLocation

          public void setVerticalSplitterLocation(int location)

      Specifies the location of the vertical splitter, which separates the left-hand side from the right-hand side of the Gantt chart. The location must be larger than the minimum width of the tree table scrollpane (an exception will be thrown if the width is not sufficient). The minimum width is the width of the row header (which is defined in the Gantt chart configuration object. Calling this method will trigger an invalidation of the vertical splitter followed by a validation of the Dual Gantt chart container.
      Parameters:
        `location` - the splitter location
      Since:
        1.0
      See Also:
        `getVerticalSplitterLocation()`, `AbstractGanttChart.getTreeTableRowHeaderWidth()`

    - #### getHorizontalSplitterLocation

          public int getHorizontalSplitterLocation()

      Returns the location of the horizontal splitter, which separates the primary / upper Gantt chart from the secondary / lower Gantt chart.
      Returns:
        the horizontal splitter location
      Since:
        1.0
      See Also:
        `setHorizontalSplitterLocation(int)`

    - #### setHorizontalSplitterLocation

          public void setHorizontalSplitterLocation(int location)

      Specifies the location of the horizontal splitter, which separates the primary / upper Gantt chart from the secondary / lower Gantt chart. The location must be larger than the minimum height of the primary layer container scrollpane (an exception will be thrown if the height is not sufficient). The minimum height is the height of the timeline. Calling this method will trigger an invalidation of the horizontal splitter followed by a validation of the Dual Gantt chart container.
      Parameters:
        `location` -
      Since:
        1.0
      See Also:
        `getHorizontalSplitterLocation()`

    - #### 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`

    - #### getSplitterSize

          public int getSplitterSize()

      Returns the width of the vertical splitter and the height of the horizontal splitter.
      Returns:
        the size (height / width) of the horizontal and vertical splitter
      Since:
        1.0
      See Also:
        `setSplitterSize(int)`

    - #### setSplitterSize

          public void setSplitterSize(int size)

      Sets the width of the vertical splitter and the height of the horizontal splitter.
      Parameters:
        `size` - the size used for the width / height of the dividers
      Since:
        1.0
      See Also:
        `getSplitterSize()`

    - #### getVerticalSplitter

          public JComponent getVerticalSplitter()

      Returns the component used to realize the vertical splitter.
      Returns:
        the vertical splitter
      Since:
        1.0
      See Also:
        `getHorizontalSplitter()`

    - #### getHorizontalSplitter

          public JComponent getHorizontalSplitter()

      Returns the component used to realize the horizontal splitter.
      Returns:
        the horizontal splitter
      Since:
        1.0
      See Also:
        `getVerticalSplitter()`

    - #### 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

    - #### print

          public void print(boolean preview)

      Description copied from class: `AbstractGanttChart`
      Prints the Gantt chart.
      Overrides:
        `print` in class `AbstractGanttChart`
      Parameters:
        `preview` - if TRUE a preview dialog will be shown first before printing
      See Also:
        `AbstractGanttChart.print(boolean, ITimeSpan)`

    - #### 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

    - #### printSecondaryModel

          public void printSecondaryModel(boolean preview)

      Prints a Gantt chart based on the secondary model.
      Parameters:
        `preview` - if TRUE a preview dialog will be shown first before printing
      Since:
        1.0

    - #### printSecondaryModel

          public void printSecondaryModel(boolean preview,
                                          ITimeSpan span)

      Prints a Gantt chart based on the secondary model.
      Parameters:
        `preview` - if TRUE a preview dialog will be shown first before printing
        `span` - the time span to print
      Since:
        1.0

    - #### getFixedHorizonalSplitterLocation

          protected int getFixedHorizonalSplitterLocation(int location)

      Returns a location for the horizontal splitter that obeys the following constraints:
      - location is larger than the minimum height of the primary tree table scrollpane (equivalent to the height of the column header)
      - location is smaller than the minimum height of the secondary layer container scrollpane (equivalent to height of horizontal scrollbar)
      Obeying these constraints ensures that the column header, the timeline and the horizontal scrollbars will always remain visible after the user performed a drag operation via the horizontal splitter.
      Parameters:
        `location` - the raw location usually based on some mouse motion event
      Returns:
        a location for the horizontal splitter that ensures that important Gantt chart controls remain visible
      Since:
        1.0
      See Also:
        `getFixedVerticalSplitterLocation(int)`, `setVerticalSplitterLocation(int)`

    - #### getFixedVerticalSplitterLocation

          protected int getFixedVerticalSplitterLocation(int location)

      Returns a location for the vertical splitter that obeys the following constraints:
      - location is larger than the minimum width of the primary tree table scrollpane (equivalent to the width of the row header)
      - location is smaller than the minimum width of the primary layer container scrollpane (equivalent to width of vertical scrollbar)
      Obeying these constraints ensures that the row header and the vertical scrollbars will always remain visible after the user performed a drag operation via the vertical splitter.
      Parameters:
        `location` - the raw location usually based on some mouse motion event
      Returns:
        a location for the vertical splitter that ensures that important Gantt chart controls remain visible
      Since:
        1.0
      See Also:
        `getFixedHorizonalSplitterLocation(int)`, `setHorizontalSplitterLocation(int)`, `AbstractGanttChart.getTreeTableRowHeaderWidth()`

    - #### propertyChange

          public void propertyChange(PropertyChangeEvent evt)

      Specified by:
        `propertyChange` in interface `PropertyChangeListener`
      Overrides:
        `propertyChange` in class `AbstractGanttChart`

    - #### getPrimaryPrintManager

          public IPrintManager getPrimaryPrintManager()

      Returns the print manager used for printing the primary Gantt chart (the upper part).
      Returns:
        the primary print manager
      Since:
        1.0

    - #### setPrimaryPrintManager

          public void setPrimaryPrintManager(IPrintManager manager)

      Sets the print manager to be used for the upper Gantt chart when the application invokes printing.
      Parameters:
        `manager` - the print manager to use for printing the Gantt chart
      Since:
        1.0
      See Also:
        `TimeGranularityPrintManager`, `SimpleGranularityPrintManager`

    - #### getSecondaryPrintManager

          public IPrintManager getSecondaryPrintManager()

      Returns the print manager used for printing the secondary Gantt chart (the lower part).
      Returns:
        the secondary print manager
      Since:
        1.0

    - #### setSecondaryPrintManager

          public void setSecondaryPrintManager(IPrintManager manager)

      Sets the print manager to be used for the lower Gantt chart when the application invokes printing.
      Parameters:
        `manager` - the print manager to use for printing the Gantt chart
      Since:
        1.0
      See Also:
        `TimeGranularityPrintManager`, `SimpleGranularityPrintManager`

    - #### 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

    - #### 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

    - #### 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

    - #### setModel

          public void setModel(IGanttChartModel model)

      Description copied from class: `AbstractGanttChart`
      Specifies a model to be used by the Gantt chart as a data source. Calling this method will cause a property change event if the new model is different than the current model. The event name will be equal to `AbstractGanttChart.PROPERTY_MODEL`.
      Overrides:
        `setModel` in class `AbstractGanttChart`
      Parameters:
        `model` - the new Gantt chart model
      See Also:
        `AbstractGanttChart.getModel()`

    - #### getHorizontalLayerContainerScrollBar

          public JScrollBar getHorizontalLayerContainerScrollBar()

      Returns the horizontal scrollbar, which is used for the layer container scrollpane. The `DualGanttChart` uses a single horizontal scrollbar for both scrollpanes.
      Returns:
        the horizontal layer container scrollbar
      Since:
        2.0

    - #### getHorizontalTreeTableScrollBar

          public JScrollBar getHorizontalTreeTableScrollBar()

      Returns the horizontal scrollbar, which is used for the tree table scrollpane. The `DualGanttChart` uses a single horizontal scrollbar for both scrollpanes.
      Returns:
        the horizontal tree table scrollbar
      Since:
        2.0

    - #### setSecondaryPrintSetup

          public void setSecondaryPrintSetup(PrintSetup ps)

      Specifies a new secondary print setup object, which is used to configure the decorative elements of a printout (header and footer).
      Parameters:
        `ps` - the new print setup to use
      Since:
        2.1

    - #### getSecondaryPrintSetup

          public PrintSetup getSecondaryPrintSetup()

      Returns the secondary print setup object, which is used to configure the decorative elements of a printout (header and footer).
      Returns:
        the print setup to use
      Since:
        2.1

    - #### tearDown

          public void tearDown()

      Description copied from class: `AbstractGanttChart`
      Tears down the Gantt chart by calling `Eventline.tearDown()` and `LayerContainer.tearDown()` on all layer containers used within the Gantt chart (e.g. the `DualGanttChart` will call `tearDown()` on two layer containers. The layer container will then tear down all layers
      Overrides:
        `tearDown` in class `AbstractGanttChart`
      See Also:
        `Eventline.tearDown()`, `LayerContainer.tearDown()`, `AbstractLayer.tearDown()`

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.