public abstract class AbstractGanttChart extends JPanel implements IColumnModelListener, PropertyChangeListener, IPagingModelListener, KeyListener, ICommandStackListener
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractGanttChart.Banner
The banner is used to prompt the user that either no license has been
installed or that the currently used license is for development purposes
only.
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_ACTIVE_SPREADSHEET
Constant used for those property change events that get fired when the
currently active spreadsheet changes.
|
static String |
PROPERTY_CALENDAR_MODEL
Constant used for those property change events that get fired when the
calendar model changes.
|
static String |
PROPERTY_CALENDAR_VISIBLE
Constant used for those property change events that get fired when the
calendar layer gets set to be visible/invisible.
|
static String |
PROPERTY_COLUMN_MODEL
Constant used for those property change events that get fired when the
column model changes.
|
static String |
PROPERTY_COMMAND_STACK
Constant used for those property change events that get fired when the
command stack of the gantt chart gets set.
|
static String |
PROPERTY_CONTROLS_BG_COLOR
Constant used for those property change events that get fired when the
controls background color changes.
|
static String |
PROPERTY_CONTROLS_FG_COLOR
Constant used for those property change events that get fired when the
controls foreground color changes.
|
static String |
PROPERTY_CROSSHAIR_VISIBLE
Constant used for those property change events that get fired when the
crosshair layer gets set to be visible/invisible.
|
static String |
PROPERTY_GRID_LINE_MODE
Constant used for those property change events that get fired when the
grid mode changes (
GridLineMode ). |
static String |
PROPERTY_KEY_COLUMN_POSITION
Constant used for those property change events that get fired when the
Gantt chart's key column position changes.
|
static String |
PROPERTY_LABELS_VISIBLE
Constant used for those property change events that get fired when the
relationship layer gets set to be visible/invisible.
|
static String |
PROPERTY_LAYER_CONTAINER_ROW_HEADER_WIDTH
Constant used for those property change events that get fired when the
width of the layer container row header gets changed.
|
static String |
PROPERTY_MODEL
Constant used for those property change events that get fired when the
Gantt chart model changes.
|
static String |
PROPERTY_PAGING_MODEL
Constant used for those property change events that get fired when the
paging information changes.
|
static String |
PROPERTY_POLICY_PROVIDER
Constant used for those property change events that get fired when the
policy provider gets replaced.
|
static String |
PROPERTY_POPUP_VISIBLE
Constant used for those property change events that get fired when the
popup (popup layer) gets set to be visible/invisible.
|
static String |
PROPERTY_RELATIONS_VISIBLE
Constant used for those property change events that get fired when the
relationship layer gets set to be visible/invisible.
|
static String |
PROPERTY_ROW_LAYER_VISIBLE
Constant used for those property change events that get fired when the
row layer gets set to be visible/invisible.
|
static String |
PROPERTY_ROW_RESIZE_POSITION
Constant used for those property change events that get fired when the
position of the row resize changes.
|
static String |
PROPERTY_TIME_NOW_SCROLLING
Constant used for those property change events that get fired when the
automatic time now scrolling gets turned on / off.
|
static String |
PROPERTY_TIME_NOW_VISIBLE
Constant used for those property change events that get fired when the
vertical time now line gets set to be visible/invisible.
|
static String |
PROPERTY_TREE_TABLE_ROW_HEADER_WIDTH
Constant used for those property change events that get fired when the
width of the tree table row header gets changed.
|
static String |
PROPERTY_VERTICAL_LINES_ON_TOP
Constant used for those property change events that get fired when the
vertical lines get set to be on top or below the timeline objects.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Modifier | Constructor and Description |
---|---|
protected |
AbstractGanttChart()
Constructs a new Gantt chart with the two 'singleton' elements: a
timeline (includes dateline and eventline) and a colum header.
|
protected |
AbstractGanttChart(IColumnModel columnModel)
Constructs a new Gantt chart with the two 'singleton' elements: a
timeline (includes dateline and eventline) and a colum header.
|
protected |
AbstractGanttChart(IComponentFactory compFactory)
Constructs a new Gantt chart with the two 'singleton' elements: a
timeline (includes dateline and eventline) and a colum header.
|
protected |
AbstractGanttChart(IGanttChartModel model)
Constructs a new Gantt chart with the two 'singleton' elements: a
timeline (includes dateline and eventline) and a colum header.
|
protected |
AbstractGanttChart(IGanttChartModel model,
IColumnModel columnModel)
Constructs a new Gantt chart with the two 'singleton' elements: a
timeline (includes dateline and eventline) and a colum header.
|
protected |
AbstractGanttChart(IGanttChartModel model,
IColumnModel columnModel,
IComponentFactory compFactory)
Constructs a new Gantt chart with the two 'singleton' elements: a
timeline (includes dateline and eventline) and a colum header.
|
protected |
AbstractGanttChart(IGanttChartModel model,
IComponentFactory compFactory)
Constructs a new Gantt chart with the two 'singleton' elements: a
timeline (includes dateline and eventline) and a colum header.
|
Modifier and Type | Method and Description |
---|---|
void |
addAvailableColumn(TreeTableColumn column)
Adds a column to the Gantt chart that can be added to the column model
interactively by the user.
|
void |
addMessage(IMessage msg)
Adds a message for the user to the Gantt chart.
|
void |
addMessageListener(IMessageListener l)
Adds a message listener to the Gantt chart.
|
void |
addSortingListener(ISortingListener l)
Adds a tree table sorting listener to the table.
|
void |
addToolBarAction(Action action)
Adds an action to the Gantt chart, which will automatically be picked up
and shown by the toolbar.
|
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 |
clearMessages()
Removes all messages from the Gantt chart.
|
void |
clearToolBarActions()
Removes all toolbar actions from the Gantt chart.
|
void |
collapseAll()
Collapses all tree nodes in all tree tables.
|
void |
columnModelChanged(ColumnModelEvent e)
The listener's callback method that will be invoked when columns get
added, removed, inserted.
|
void |
commandExecute(ICommand cmd)
Executes the given command via the command stack.
|
void |
commandRedo()
Redoes the last command that was executed (if the command can be redone)
by calling
ICommandStack.redo(IProgressMonitor) . |
void |
commandStackChanged(CommandStackEvent e)
Gets called whenever the command stack changed.
|
void |
commandUndo()
Undoes the last command that was executed (if the command can be undone)
by calling
ICommandStack.undo(IProgressMonitor) . |
PrintGanttChart |
createPrintableGanttChart(PrintContext context)
Returns a printable Gantt Chart for the given print context.
|
void |
expandAll()
Expands all tree nodes in all tree tables.
|
protected void |
fireMessageAdded(IMessage msg)
Iterates over all message listeners that are currently attached to the
Gantt chart and calls the
messageAdded() event method. |
protected void |
fireMessageRemoved(IMessage msg)
Iterates over all message listeners that are currently attached to the
Gantt chart and calls the
messageRemoved() event method. |
protected void |
fireMessagesCleared()
Iterates over all message listeners that are currently attached to the
Gantt chart and calls the
messagesCleared() event method. |
protected void |
fireSortingEvent(SortingEvent evt)
Fires a sorting event when the user performed a sort on the Gantt chart.
|
ISpreadsheet |
getActiveSpreadsheet()
Returns the currently active spreadsheet (see
SpreadsheetLayer . |
List<TreeTableColumn> |
getAvailableColumns()
Returns the list of available columns.
|
ICalendarModel |
getCalendarModel()
Returns the calendar model associated with the Gantt chart.
|
TreeTableColumn |
getColumn(int index)
Returns the column at the given index.
|
int |
getColumnCount()
Returns the number of columns in the column model.
|
IColumnModel |
getColumnModel()
Returns the Gantt chart's column model.
|
ICommandInterceptor |
getCommandInterceptor(Class cl)
Returns a command interceptor implementation for the given command type.
|
ICommandStack |
getCommandStack()
Returns the command stack that is being used by the Gantt chart to
execute commands.
|
IComponentFactory |
getComponentFactory()
Returns the component factory used by the Gantt chart to create
components such as
Timeline , TreeTableHeader ,
TreeTable , LayerContainer , TreeTableRowHeader . |
Color |
getControlsBackground()
Returns the color used to paint the background of those controls that
'surround' the actual Gantt chart content (column header, row header,
dateline).
|
Color |
getControlsForeground()
Returns the color used to paint the foreground of those controls that
'surround' the actual Gantt chart content (column header, row header,
dateline).
|
Dateline |
getDateline()
Returns the dateline component, which is responsible for rendering the
time (days, minutes, seconds, ...).
|
IDatelineModel |
getDatelineModel()
Returns the dateline model.
|
Eventline |
getEventline()
Returns the Eventline component, which is responsible for rendering
events and activities that have a global character.
|
IGranularity |
getGranularity()
Returns the granularity used by the dateline.
|
abstract IGridComponent[] |
getGridComponents()
Returns all grid components managed by the Gantt chart container.
|
GridLineMode |
getGridLineMode()
Returns the grid mode used by the Gantt chart.
|
KeyColumn |
getKeyColumn()
Returns the key column used by the Gantt chart.
|
int |
getKeyColumnPosition()
Returns the key column position, which specifies how many regular columns
will be placed to the left of the key column.
|
int |
getLayerContainerRowHeaderWidth()
Returns the width used to calculate the preferred size of all layer
container row headers currently in use by the Gantt chart.
|
abstract LayerContainer[] |
getLayerContainers()
Returns all layer containers managed by the Gantt chart container.
|
abstract LayerContainerScrollPane[] |
getLayerContainerScrollPanes()
Returns all layer container scrollpanes managed by the Gantt chart
container.
|
Collection<IMessage> |
getMessages()
Returns a list of all messages that are currently attached to the Gantt
chart.
|
IGanttChartModel |
getModel()
Returns the Gantt chart's data model.
|
IPagingModel |
getPagingModel()
Returns the (optional) paging model.
|
IPolicyProvider |
getPolicyProvider()
Returns the policy provider used by the Gantt chart to lookup policy
implementations.
|
abstract PrintContext[] |
getPrintContexts()
Returns all print context supported by the Gantt chart.
|
PrintSetup |
getPrintSetup()
Returns the print setup object, which is used to configure the decorative
elements of a printout (header and footer).
|
IProgressMonitorFactory |
getProgressMonitorFactory()
Returns the progress monitor factory used by the Gantt chart to create
new instances of
IProgressMonitor . |
int |
getRowResizePosition()
Gets the position where the row resizing takes place.
|
ISelectorFactory |
getSelectorFactory()
Returns the selector factory used by the Gantt chart for creating
selectors in various places.
|
Timeline |
getTimeline()
Returns the Timeline component, which consists of the Dateline and the
Eventline.
|
ITimeSpan |
getTimeSpan()
Convenience method, which returns the total time span covered by the
Gantt chart.
|
Action[] |
getToolBarActions()
Returns all toolbar actions currently associated with the Gantt chart.
|
TreeTableHeader |
getTreeTableHeader()
Returns the tree table header component.
|
int |
getTreeTableRowHeaderWidth()
Returns the width used to calculate the preferred size of all tree table
row headers currently in use by the Gantt chart.
|
abstract TreeTable[] |
getTreeTables()
Returns all tree tables managed by the Gantt chart container.
|
abstract TreeTableScrollPane[] |
getTreeTableScrollPanes()
Returns all tree table scrollpanes managed by the Gantt chart container.
|
boolean |
isCalendarVisible()
Returns TRUE if the layer that is responsible for displaying calendar
information is currently visible.
|
boolean |
isCrosshairVisible()
Returns TRUE if the layer that is responsible for displaying the
crosshair is currently visible.
|
boolean |
isLabelsVisible()
Returns TRUE if the layer that is responsible for displaying object
labels is currently visible.
|
boolean |
isPopupVisible()
Returns TRUE if the layer that is responsible for displaying the popup is
currently visible.
|
boolean |
isRelationsVisible()
Returns TRUE if the layer that is responsible for displaying object
relationships (lines with arrows between timeline objects) is currently
visible.
|
boolean |
isRowLayerVisible()
Returns TRUE if the layer that is responsible for displaying the row
renderers is currently visible.
|
boolean |
isShowingCommandExceptions()
Returns TRUE if the exceptions thrown during the execution of a command
will be shown in the console.
|
boolean |
isTimeNowScrolling()
Determines whether automatic time now scrolling is turned on or off.
|
boolean |
isTimeNowVisible()
Returns TRUE if the vertical line that indicates time now is
currently visible.
|
boolean |
isVerticalLinesOnTop()
Returns TRUE if the vertical lines (the major and/or minor grid) will be
drawn on top of the timeline objects (the default is below).
|
void |
keyPressed(KeyEvent e) |
void |
keyReleased(KeyEvent e) |
void |
keyTyped(KeyEvent e) |
void |
optimizeColumnWidth()
Optimizes the column width of all columns without taking the cell editors
into account.
|
void |
optimizeColumnWidth(boolean includeEditors)
Optimizes the column width of all columns with or without taking the cell
editors into account.
|
void |
optimizeColumnWidth(int index)
Optimizes the column width of all columns without taking the cell editors
into account.
|
void |
optimizeColumnWidth(int index,
boolean includeEditors)
Optimizes the column width of all columns with or without taking the cell
editors into account.
|
void |
optimizeColumnWidth(TreeTableColumn column)
Optimizes the column width of the given column without taking the cell
editors into account.
|
void |
optimizeColumnWidth(TreeTableColumn column,
boolean includeEditors)
Optimizes the column width of the given column with or without taking the
cell editors into account.
|
void |
pageChanged(PagingEvent evt)
Listener callback method that will be invoked after the page model was
changed.
|
void |
pageWillChange(PagingEvent evt)
Listener callback method that will be invoked before the page model gets
changed.
|
void |
paint(Graphics g) |
protected void |
paintRowResizePosition(Graphics g)
Renders the visual feedback when the user resizes a row.
|
void |
print(boolean preview)
Prints the Gantt chart.
|
abstract void |
print(boolean preview,
ITimeSpan span)
Prints the Gantt chart.
|
void |
propertyChange(PropertyChangeEvent evt) |
void |
removeAvailableColumn(TreeTableColumn column)
Removes a column from the list of available columns.
|
void |
removeMessage(IMessage msg)
Removes a message from the Gantt chart.
|
void |
removeMessageListener(IMessageListener l)
Removes a message listener from the Gantt chart.
|
void |
removeSortingListener(ISortingListener l)
Removes a tree table sorting listener from the table.
|
void |
removeToolBarAction(Action action)
Removes a toolbar action from the Gantt chart.
|
abstract 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 |
setActiveSpreadsheet(ISpreadsheet activeSpreadsheet)
Sets the currently active spreadsheet, which will be used by the
SpreadsheetLayer to visualize spreadsheet-style information. |
void |
setAvailableColumns(Collection<TreeTableColumn<?>> columns)
Sets serveral columns as "available" columns, which means that these
columns will not be initially shown by the tree table.
|
void |
setCalendarModel(ICalendarModel model)
Sets the Gantt chart's calendarModel.
|
void |
setCalendarVisible(boolean visible)
Specifies whether the layer that is showing the calendar information will
be visible or not.
|
void |
setColumnModel(IColumnModel model)
Assigns a column model to the Gantt chart and attaches listeners to the
model itself, to the model's key column and to each of the model's
regular columns.
|
void |
setCommandInterceptor(Class<? extends ICommand> cl,
ICommandInterceptor interceptor)
Registers a command interceptor implementation for the given command
type.
|
void |
setCommandStack(ICommandStack stack)
Specifies a new command stack for the Gantt chart.
|
void |
setControlsBackground(Color color)
Changes the color used for the background of those controls that
'surround' the actual Gantt chart content (column header, row header,
dateline).
|
void |
setControlsForeground(Color color)
Changes the color used for the foreground of those controls that
'surround' the actual Gantt chart content (column header, row header,
dateline).
|
void |
setCrosshairVisible(boolean visible)
Specifies whether the layer that is showing the crosshair will be visible
or not.
|
void |
setEnabled(boolean enabled)
Overrides the default implementation to automatically also enable or
disable the dateline, the eventline, the timeline, the tree table header,
the tree tables, the layer containers.
|
void |
setGranularity(IGranularity granularity)
Sets a new granularity.
|
void |
setGridLineMode(GridLineMode mode)
Sets a new grid mode to be used for rendering the vertical lines inside
the layer containers.
|
void |
setKeyColumnPosition(int position)
Specifies at which position the key column will be placed inside the tree
table.
|
void |
setLabelsVisible(boolean visible)
Specifies whether the layer that is showing the timeline object labels
will be visible or not.
|
void |
setLayerContainerRowHeaderWidth(int width)
Sets the width used to calculate the preferred size of all layer
container row headers currently in use by the Gantt chart.
|
void |
setModel(IGanttChartModel model)
Specifies a model to be used by the Gantt chart as a data source.
|
void |
setPagingModel(IPagingModel model)
Sets the (optional) paging model.
|
void |
setPolicyProvider(IPolicyProvider provider)
Sets the policy provider used by the Gantt chart to lookup policy
implementations.
|
void |
setPopupVisible(boolean visible)
Specifies whether the layer that is showing the popups will be visible or
not.
|
void |
setPrintSetup(PrintSetup ps)
Specifies a new print setup object, which is used to configure the
decorative elements of a printout (header and footer).
|
void |
setProgressMonitorFactory(IProgressMonitorFactory factory)
Sets a new factory for progress monitors on the Gantt chart.
|
void |
setRelationsVisible(boolean visible)
Specifies whether the layer that is showing the relationships between
timeline objects will be visible or not.
|
void |
setRowLayerVisible(boolean visible)
Specifies whether the layer that is showing the rows will be visible or
not.
|
void |
setRowResizePosition(int position)
Sets the new position where the row resize operation takes place.
|
void |
setShowingCommandExceptions(boolean show)
Controls whether the stacktrace of an exception thrown by a command will
be displayed in the console.
|
void |
setTimeNowScrolling(boolean scrolling)
Enables / disables automatic time now scrolling, which ensures that layer
containers will scroll by themselves so that the time now location is
always visible.
|
void |
setTimeNowVisible(boolean visible)
If set to 'true' then a line will be drawn from the top of the panel to
the bottom indicating where the time 'now' is.
|
void |
setTimeSpan(ITimeSpan span)
Sets a new time span.
|
void |
setTreeTableRowHeaderWidth(int width)
Sets the width used to calculate the preferred size of all tree table row
headers currently in use by the Gantt chart.
|
void |
setVerticalLinesOnTop(boolean top)
Determines whether or not the limit lines are drawn above the diagram
entries or below them.
|
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 |
showMessage(String msg)
Shows a message in a dialog to the user.
|
void |
showMessage(String msg,
MessageTypeId id)
Shows a message in a dialog to the user.
|
void |
showMessage(String msg,
MessageTypeId id,
Object details)
Shows a message in a dialog to the user.
|
void |
showMessageContext(IMessage msg)
Shows the context of the given message.
|
void |
showMessages()
Brings up a dialog, which displays the user messages that are currently
attached to the Gantt chart.
|
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.
|
void |
sortTables(int[] modelIndices,
boolean[] sortDirections)
Invokes multi-column sorting on the tree tables in 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. |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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
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
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
public static final String PROPERTY_MODEL
setModel(IGanttChartModel)
,
Constant Field Valuespublic static final String PROPERTY_COLUMN_MODEL
setColumnModel(IColumnModel)
,
Constant Field Valuespublic static final String PROPERTY_CALENDAR_MODEL
setCalendarModel(ICalendarModel)
,
Constant Field Valuespublic static final String PROPERTY_POLICY_PROVIDER
setPolicyProvider(IPolicyProvider)
,
Constant Field Valuespublic static final String PROPERTY_COMMAND_STACK
setCommandStack(ICommandStack)
,
Constant Field Valuespublic static final String PROPERTY_TREE_TABLE_ROW_HEADER_WIDTH
setTreeTableRowHeaderWidth(int)
,
Constant Field Valuespublic static final String PROPERTY_LAYER_CONTAINER_ROW_HEADER_WIDTH
setLayerContainerRowHeaderWidth(int)
,
Constant Field Valuespublic static final String PROPERTY_GRID_LINE_MODE
GridLineMode
).setGridLineMode(GridLineMode)
,
Constant Field Valuespublic static final String PROPERTY_CONTROLS_BG_COLOR
setControlsBackground(Color)
,
Constant Field Valuespublic static final String PROPERTY_CONTROLS_FG_COLOR
setControlsForeground(Color)
,
Constant Field Valuespublic static final String PROPERTY_CALENDAR_VISIBLE
setCalendarVisible(boolean)
,
Constant Field Valuespublic static final String PROPERTY_CROSSHAIR_VISIBLE
setCrosshairVisible(boolean)
,
Constant Field Valuespublic static final String PROPERTY_KEY_COLUMN_POSITION
setKeyColumnPosition(int)
,
Constant Field Valuespublic static final String PROPERTY_LABELS_VISIBLE
setLabelsVisible(boolean)
,
Constant Field Valuespublic static final String PROPERTY_POPUP_VISIBLE
setPopupVisible(boolean)
,
Constant Field Valuespublic static final String PROPERTY_RELATIONS_VISIBLE
setRelationsVisible(boolean)
,
Constant Field Valuespublic static final String PROPERTY_ROW_LAYER_VISIBLE
setRowLayerVisible(boolean)
,
Constant Field Valuespublic static final String PROPERTY_TIME_NOW_VISIBLE
setTimeNowVisible(boolean)
,
Constant Field Valuespublic static final String PROPERTY_VERTICAL_LINES_ON_TOP
setVerticalLinesOnTop(boolean)
,
Constant Field Valuespublic static final String PROPERTY_TIME_NOW_SCROLLING
setTimeNowScrolling(boolean)
,
Constant Field Valuespublic static final String PROPERTY_PAGING_MODEL
setPagingModel(IPagingModel)
,
Constant Field Valuespublic static final String PROPERTY_ROW_RESIZE_POSITION
setRowResizePosition(int)
,
Constant Field Valuespublic static final String PROPERTY_ACTIVE_SPREADSHEET
setActiveSpreadsheet(ISpreadsheet)
,
Constant Field Valuesprotected AbstractGanttChart(IGanttChartModel model, IColumnModel columnModel, IComponentFactory compFactory)
DualGanttChart
).
The Gantt chart uses a component factory to delegate the creation of
these elements.model
- the data model used to populate the tree table, to query the
timeline objects, to retrieve the list of timeline layers,
etc...columnModel
- the module used by the tree table's column header to query for
a list of tree table columns and the key columncompFactory
- the factory used to create the elements of a Gantt chart
(timeline, dateline, eventline, column header row header, tree
table, layer container)protected AbstractGanttChart(IGanttChartModel model, IColumnModel columnModel)
DualGanttChart
).
The Gantt chart uses the default component factory implementation to
delegate the creation of these elements.model
- the data model used to populate the tree table, to query the
timeline objects, to retrieve the list of timeline layers,
etc...columnModel
- the module used by the tree table's column header to query for
a list of tree table columns and the key columnDefaultComponentFactory
protected AbstractGanttChart(IColumnModel columnModel)
DualGanttChart
).
The Gantt chart uses the default component factory implementation to
delegate the creation of these elements.columnModel
- the module used by the tree table's column header to query for
a list of tree table columns and the key columnDefaultComponentFactory
protected AbstractGanttChart(IGanttChartModel model, IComponentFactory compFactory)
DualGanttChart
).
The Gantt chart uses the default column model implementation.model
- the data model used to populate the tree table, to query the
timeline objects, to retrieve the list of timeline layers,
etc...compFactory
- the factory used to create the elements of a Gantt chart
(timeline, dateline, eventline, column header row header, tree
table, layer container)DefaultColumnModel
protected AbstractGanttChart(IComponentFactory compFactory)
DualGanttChart
).
The Gantt chart uses the default column model implementation.compFactory
- the factory used to create the elements of a Gantt chart
(timeline, dateline, eventline, column header row header, tree
table, layer container)DefaultColumnModel
protected AbstractGanttChart(IGanttChartModel model)
DualGanttChart
).
The Gantt chart uses the default implementations of a component factory
and a column model.model
- the data model used to populate the tree table, to query the
timeline objects, to retrieve the list of timeline layers,
etc...DefaultComponentFactory
,
DefaultColumnModel
protected AbstractGanttChart()
DualGanttChart
).
The Gantt chart uses the default Gantt chart model implementation as a
data source and the default component factory implementation to delegate
the creation of the timeline and the column header. The column model gets
provided by the default column model implementation. The time zone gets
set to be the JVM's default time zone.DefaultGanttChartModel
,
DefaultColumnModel
,
DefaultComponentFactory
,
TimeZone.getDefault()
public void setModel(IGanttChartModel model)
PROPERTY_MODEL
.model
- the new Gantt chart modelgetModel()
public IGanttChartModel getModel()
setModel(IGanttChartModel)
public void setTimeSpan(ITimeSpan span)
IDatelineModel.setTimeSpan(ITimeSpan)
. The dateline model
might throw a DatelineModelException
if the time span can not be
used. A message will be shown to the user informing him of the problem.span
- the span requested by the applicationpublic void setGranularity(IGranularity granularity)
IDatelineModel.setGranularity(IGranularity)
. The dateline
model might throw a DatelineModelException
if the granularity can
not be used. A message will be shown to the user informing him of the
problem.granularity
- the granularity requested by the applicationpublic IGranularity getGranularity()
IDatelineModel.getGranularity()
.public ITimeSpan getTimeSpan()
IDatelineModel.getTimeSpan()
public void setCommandStack(ICommandStack stack)
PROPERTY_COMMAND_STACK
.stack
- the command stackDefaultCommandStack
,
getCommandStack()
public ICommandStack getCommandStack()
DefaultCommandStack
.setCommandStack(ICommandStack)
,
DefaultCommandStack
public void setCommandInterceptor(Class<? extends ICommand> cl, ICommandInterceptor interceptor)
cl
- the command typeinterceptor
- the interceptor to use before actually executing the commandgetCommandInterceptor(Class)
,
ICommandInterceptor.intercept(AbstractGanttChart, ICommand)
public ICommandInterceptor getCommandInterceptor(Class cl)
cl
- the command typesetCommandInterceptor(Class, ICommandInterceptor)
,
ICommandInterceptor.intercept(AbstractGanttChart, ICommand)
public void commandExecute(ICommand cmd)
cmd
- the command to executeICommandStack
,
ICommandStackListener
,
IProgressMonitor
,
setProgressMonitorFactory(IProgressMonitorFactory)
public void commandUndo()
ICommandStack.undo(IProgressMonitor)
. The monitor
passed to the undo will be created by the Gantt chart's progress monitor
factory.ICommandStack.undo(IProgressMonitor)
,
ICommandStack.isUndoable()
,
IProgressMonitor
public void commandRedo()
ICommandStack.redo(IProgressMonitor)
. The monitor
passed to the redo will be created by the Gantt chart's progress monitor
factory.ICommandStack.redo(IProgressMonitor)
,
ICommandStack.isRedoable()
,
IProgressMonitor
public void setColumnModel(IColumnModel model)
PROPERTY_COLUMN_MODEL
.model
- the column modelgetColumnModel()
,
DefaultColumnModel
,
getKeyColumn()
,
getColumn(int)
public IColumnModel getColumnModel()
setColumnModel(IColumnModel)
,
getKeyColumn()
,
getColumn(int)
public TreeTableColumn getColumn(int index)
getKeyColumn()
instead.index
- the index of the column to returngetKeyColumn()
public int getColumnCount()
IColumnModel.getColumnCount()
.getColumn(int)
public void columnModelChanged(ColumnModelEvent e)
IColumnModelListener
columnModelChanged
in interface IColumnModelListener
e
- the event descriptionpublic TreeTableHeader getTreeTableHeader()
IComponentFactory.createTreeTableHeader(AbstractGanttChart)
public Timeline getTimeline()
IComponentFactory.createTimeline(AbstractGanttChart)
public Dateline getDateline()
IComponentFactory.createDateline(Timeline)
public IDatelineModel getDatelineModel()
Dateline.getModel()
.public Eventline getEventline()
IComponentFactory.createEventline(Timeline, Dateline)
public void addMessage(IMessage msg)
IMessageListener
that are
currently attached to the Gantt chart.msg
- the message that will be addedremoveMessage(IMessage)
,
addMessageListener(IMessageListener)
,
Message
,
TreePathMessage
,
TimelineObjectPathMessage
public void removeMessage(IMessage msg)
IMessageListener
that are currently
attached to the Gantt chart.msg
- the message that will be addedaddMessage(IMessage)
,
clearMessages()
,
addMessageListener(IMessageListener)
,
Message
,
TreePathMessage
,
TimelineObjectPathMessage
public void clearMessages()
IMessageListener
that are
currently attached to the Gantt chart.public Collection<IMessage> getMessages()
addMessage(IMessage)
,
addMessageListener(IMessageListener)
public void addMessageListener(IMessageListener l)
l
- the message listenerpublic void removeMessageListener(IMessageListener l)
l
- the message listenerprotected void fireMessageAdded(IMessage msg)
messageAdded()
event method.msg
- the message that was addedaddMessage(IMessage)
,
addMessageListener(IMessageListener)
protected void fireMessageRemoved(IMessage msg)
messageRemoved()
event method.msg
- the message that was removedremoveMessage(IMessage)
,
addMessageListener(IMessageListener)
protected void fireMessagesCleared()
messagesCleared()
event method.clearMessages()
,
addMessageListener(IMessageListener)
public void showMessages()
addMessage(IMessage)
,
MessageDialog
public void paint(Graphics g)
paint
in class JComponent
protected void paintRowResizePosition(Graphics g)
g
- the graphics context into which to drawpublic void print(boolean preview)
preview
- if TRUE a preview dialog will be shown first before printingprint(boolean, ITimeSpan)
public abstract void print(boolean preview, ITimeSpan span)
preview
- if TRUE a preview dialog will be shown first before printingspan
- the time span that needs to be printedpublic PrintGanttChart createPrintableGanttChart(PrintContext context)
context
- the print context for which to create an instance of
PrintGanttChart
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void showMessage(String msg)
msg
- the message to showpublic void showMessage(String msg, MessageTypeId id)
msg
- the message to show to the userid
- the message type (INFORMATION, WARNING, ERROR)public void showMessage(String msg, MessageTypeId id, Object details)
msg
- the message to show to the userid
- the message type (INFORMATION, WARNING, ERROR)details
- some additional information about the cause of the message
(for example an Exception
)public void showMessageContext(IMessage msg)
TreePathMessage
then the tree path will be opened. If the message
is a TimelineObjectPathMessage
then the matching timeline object
will be shown.msg
- the message for which to show the contextpublic void showAllObjects()
Dateline
in such a way that all timeline
objects (stored on the currently visible rows) become visible.public void showEarliestObjects()
Dateline
in such a way that the earliest timeline
objects (stored on the currently visible rows) become visible.public void showLatestObjects()
Dateline
in such a way that the latest timeline
objects (stored on the currently visible rows) become visible.public void showTimeNow(boolean center)
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 containershowTime(long, boolean)
public void showTime(long time, boolean center)
time
- the time to make visiblecenter
- 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 containershowTimeNow(boolean)
public abstract PrintContext[] getPrintContexts()
public abstract LayerContainerScrollPane[] getLayerContainerScrollPanes()
public abstract LayerContainer[] getLayerContainers()
public abstract TreeTableScrollPane[] getTreeTableScrollPanes()
public abstract TreeTable[] getTreeTables()
public abstract IGridComponent[] getGridComponents()
GridControl
instances.public void collapseAll()
public void expandAll()
public void alignStartTimes()
alignEndTimes()
public void alignEndTimes()
alignStartTimes()
public void addSortingListener(ISortingListener l)
l
- the tree table sorting listenerremoveSortingListener(ISortingListener)
public void removeSortingListener(ISortingListener l)
l
- the listener to removeaddSortingListener(ISortingListener)
protected void fireSortingEvent(SortingEvent evt)
evt
- the event that will be issuedSortingEvent
public void sortTables(int[] modelIndices, boolean[] sortDirections)
SortingEvent
to be sent to all observers, which
implement the ISortingListener
interface.modelIndices
- the model indices that are used to determine which column
values to compare for sorting (use
KeyColumn.MODEL_INDEX
to specify a sort based on the
key columnsortDirections
- if TRUE the sort direction will be ascendingpublic abstract void resetToPreferredSizes()
public void setProgressMonitorFactory(IProgressMonitorFactory factory)
factory
- the new progress monitor factorypublic IProgressMonitorFactory getProgressMonitorFactory()
IProgressMonitor
.public IComponentFactory getComponentFactory()
Timeline
, TreeTableHeader
,
TreeTable
, LayerContainer
, TreeTableRowHeader
.public ICalendarModel getCalendarModel()
TimeGranularityCalendarModel
public void setCalendarModel(ICalendarModel model)
model
- the new calendar modelTimeGranularityCalendarModel
public IPolicyProvider getPolicyProvider()
setPolicyProvider(IPolicyProvider)
public void setPolicyProvider(IPolicyProvider provider)
provider
- the Gantt chart's policy providerpublic int getTreeTableRowHeaderWidth()
public void setTreeTableRowHeaderWidth(int width)
PROPERTY_TREE_TABLE_ROW_HEADER_WIDTH
.width
- the width used for calculating the row headers preferred sizepublic int getLayerContainerRowHeaderWidth()
getTreeTableRowHeaderWidth()
public void setLayerContainerRowHeaderWidth(int width)
PROPERTY_LAYER_CONTAINER_ROW_HEADER_WIDTH
.width
- the width used for calculating the preferred size of all layer
container row headerssetTreeTableRowHeaderWidth(int)
public void setGridLineMode(GridLineMode mode)
PROPERTY_GRID_LINE_MODE
.mode
- the grid modepublic GridLineMode getGridLineMode()
setGridLineMode(GridLineMode)
public void setControlsBackground(Color color)
PROPERTY_CONTROLS_BG_COLOR
.color
- the controls colorgetControlsBackground()
public Color getControlsBackground()
setControlsBackground(Color)
public void setControlsForeground(Color color)
PROPERTY_CONTROLS_FG_COLOR
.color
- the controls colorgetControlsBackground()
public Color getControlsForeground()
setControlsForeground(Color)
public boolean isCalendarVisible()
setCalendarVisible(boolean)
,
CalendarLayer
public void setCalendarVisible(boolean visible)
PROPERTY_CALENDAR_VISIBLE
.visible
- if TRUE the layer will become visibleCalendarLayer
,
isCalendarVisible()
public int getKeyColumnPosition()
ColumnModelIterator
.public boolean isCrosshairVisible()
setCrosshairVisible(boolean)
,
CrosshairLayer
public boolean isLabelsVisible()
setLabelsVisible(boolean)
,
LabelLayer
public boolean isPopupVisible()
setPopupVisible(boolean)
,
PopupLayer
public boolean isRelationsVisible()
setRelationsVisible(boolean)
,
RelationshipLayer
public boolean isRowLayerVisible()
setRowLayerVisible(boolean)
,
RowLayer
public boolean isTimeNowVisible()
setTimeNowVisible(boolean)
public boolean isVerticalLinesOnTop()
setVerticalLinesOnTop(boolean)
public void setCrosshairVisible(boolean visible)
PROPERTY_CROSSHAIR_VISIBLE
.visible
- if TRUE the layer will become visibleCrosshairLayer
,
isCrosshairVisible()
public void setKeyColumnPosition(int position)
ColumnModelIterator
. Calling this method will
trigger a property change event where the property name equals
PROPERTY_KEY_COLUMN_POSITION
.bposition
- the new position for the key column (must be larger than 0).public void setLabelsVisible(boolean visible)
PROPERTY_LABELS_VISIBLE
.visible
- if TRUE the layer will become visibleLabelLayer
,
isLabelsVisible()
public void setPopupVisible(boolean visible)
PROPERTY_POPUP_VISIBLE
.visible
- if TRUE the layer will become visiblePopupLayer
,
isPopupVisible()
public void setRelationsVisible(boolean visible)
PROPERTY_RELATIONS_VISIBLE
.visible
- if TRUE the layer will become visibleRelationshipLayer
,
isRelationsVisible()
public void setRowLayerVisible(boolean visible)
PROPERTY_ROW_LAYER_VISIBLE
.visible
- if TRUE the layer will become visibleRowLayer
,
isRowLayerVisible()
public void setTimeNowVisible(boolean visible)
visible
- if TRUE the 'time now' cursor (line) will be visibleisTimeNowVisible()
,
TimeNowLayer
public void setVerticalLinesOnTop(boolean top)
top
- if TRUE the vertical (minor, major) grid lines will be drawn
on top of the timeline objectsisVerticalLinesOnTop()
public boolean isTimeNowScrolling()
setTimeNowScrolling(boolean)
public void setTimeNowScrolling(boolean scrolling)
scrolling
- if TRUE the time now will always remain visiblepublic IPagingModel getPagingModel()
PagingControlPanel
public void setPagingModel(IPagingModel model)
model
- the paging modelPagingControlPanel
public void pageWillChange(PagingEvent evt)
IPagingModelListener
pageWillChange
in interface IPagingModelListener
evt
- an event object that informs the listeners about the change
that is about to happenpublic void pageChanged(PagingEvent evt)
IPagingModelListener
pageChanged
in interface IPagingModelListener
evt
- an event object that informs the listeners about the change
that has happenedpublic void setAvailableColumns(Collection<TreeTableColumn<?>> columns)
columns
- the columns to set as the "available" columnspublic void addAvailableColumn(TreeTableColumn column)
column
- the column that will be added to the list of available columnsColumnChooser
,
ColumnChooserSelector
public void removeAvailableColumn(TreeTableColumn column)
column
- the column that will be removedpublic List<TreeTableColumn> getAvailableColumns()
ColumnChooser
,
ColumnChooserSelector
public KeyColumn getKeyColumn()
public int getRowResizePosition()
public void setRowResizePosition(int position)
position
- the new position where the row resize operation takes placepublic void addToolBarAction(Action action)
action
- the action to addGanttChartToolBar
,
removeToolBarAction(Action)
,
clearToolBarActions()
,
getToolBarActions()
public void removeToolBarAction(Action action)
action
- the action to addGanttChartToolBar
,
addToolBarAction(Action)
,
clearToolBarActions()
,
getToolBarActions()
public void clearToolBarActions()
GanttChartToolBar
,
addToolBarAction(Action)
,
removeToolBarAction(Action)
,
getToolBarActions()
public Action[] getToolBarActions()
GanttChartToolBar
,
addToolBarAction(Action)
,
removeToolBarAction(Action)
,
clearToolBarActions()
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void tearDown()
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 layersEventline.tearDown()
,
LayerContainer.tearDown()
,
AbstractLayer.tearDown()
public ISelectorFactory getSelectorFactory()
TimeGranularitySelectorFactory
singleton instance.TimeGranularitySelectorFactory.getInstance()
public void optimizeColumnWidth()
optimizeColumnWidth(boolean)
public void optimizeColumnWidth(boolean includeEditors)
includeEditors
- if TRUE the algorithm will take the preferred width of the
cell editor for each cell into accountpublic void optimizeColumnWidth(int index)
index
- the width of the column with the given index will be optimizedoptimizeColumnWidth(TreeTableColumn, boolean)
public void optimizeColumnWidth(int index, boolean includeEditors)
includeEditors
- if TRUE the algorithm will take the preferred width of the
cell editor for each cell into accountindex
- the width of the column with the given index will be optimizedpublic void optimizeColumnWidth(TreeTableColumn column)
column
- the column to optimizepublic void optimizeColumnWidth(TreeTableColumn column, boolean includeEditors)
includeEditors
- if TRUE the algorithm will take the preferred width of the
cell editor for each cell into accountcolumn
- the column to optimizepublic void setEnabled(boolean enabled)
setEnabled
in class JComponent
public void setShowingCommandExceptions(boolean show)
show
- if TRUE the exception will be shownpublic boolean isShowingCommandExceptions()
public void commandStackChanged(CommandStackEvent e)
ICommandStackListener
commandStackChanged
in interface ICommandStackListener
e
- the event issued by the command stackpublic void setPrintSetup(PrintSetup ps)
ps
- the new print setup to usepublic PrintSetup getPrintSetup()
public void setActiveSpreadsheet(ISpreadsheet activeSpreadsheet)
SpreadsheetLayer
to visualize spreadsheet-style information.activeSpreadsheet
- the currently active spreadsheetpublic ISpreadsheet getActiveSpreadsheet()
SpreadsheetLayer
.Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.