public class LayerContainer extends JPanel implements MouseListener, MouseMotionListener, PropertyChangeListener, ICommandStackListener, IGanttChartModelListener, ILayerContainerSelectionModelListener, ICalendarModelListener, IDatelineModelListener, ILayerContainerListener, IGridComponent, Autoscroll, ITreeTableModelListener, TreeSelectionListener, TreeExpansionListener
Modifier and Type | Class and Description |
---|---|
static class |
LayerContainer.RenderingDirection
An enumerator, which can be used to specify a rendering hint for the
framework.
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_ALTERNATING_BACKGROUND
A constant used for property change events that get fired when the
alternating background color gets replaced.
|
static String |
PROPERTY_BOOKMARK_MODEL
Constant used for those property change events that get fired when the
bookmark information changes.
|
static String |
PROPERTY_DRAGGING_ENABLED
A constant used for property change events that get fired when the
dragging feature gets globally turned on or off.
|
static String |
PROPERTY_GRID_GRANULARITY
Constant used for those property change events that get fired when the
grid granularity changes.
|
static String |
PROPERTY_LINKING_ENABLED
A constant used for property change events that get fired when the
linking feature gets globally turned on or off.
|
static String |
PROPERTY_MODEL
A constant used for property change events that get fired when the model
changes.
|
static String |
PROPERTY_POLICY_PROVIDER
A constant used for property change events that get fired when the policy
provider gets replaced.
|
static String |
PROPERTY_SELECTION_MODEL
A constant used for property change events that get fired when the
selection model gets replaced.
|
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
Constructor and Description |
---|
LayerContainer(AbstractGanttChart ganttChart,
IGanttChartModel model,
TreeTable treeTable,
ILayerFactory layerFactory)
Constructs a new layer container.
|
Modifier and Type | Method and Description |
---|---|
void |
addGridComponentListener(IGridComponentListener l)
Adds a listener to the grid component.
|
void |
addHighlightedObject(TimelineObjectPath path)
Adds a single timeline object path to the set of highlighted objects.
|
void |
addHighlightedObjects(Collection<TimelineObjectPath> paths)
Adds a collection of timeline object paths where each timeline object
referenced will be added to the set of highlighted objects.
|
void |
addLayerContainerListener(ILayerContainerListener l)
Adds a listener to the layer container.
|
void |
addNotify()
Calls
JComponent.addNotify() and additionally initializes some
colors for the layer container. |
void |
alignEndTimes()
Aligns the end times of all currently selected (and visible) timeline
objects with each other.
|
void |
alignStartTimes()
Aligns the start times of all currently selected (and visible) timeline
objects with each other.
|
void |
autoscroll(Point cursorLocn) |
void |
calendarChanged(CalendarModelEvent evt)
Listener callback method that gets invoked whenever the calendar model
changes.
|
void |
clearHighlightedObjects()
Clears the set of highlighted objects.
|
void |
clearTimelineObjectSelection()
Clears all timeline object selections on all layers, independent of
whether the layer is currently visible or not.
|
void |
clearTimeSpanSelection()
Clears all time span selections.
|
void |
commandStackChanged(CommandStackEvent evt)
Gets called whenever the command stack changed.
|
void |
datelineModelChanged(DatelineModelEvent evt)
The listener's callback method that gets invoked when the model's time
span or time zone changes.
|
void |
datelineModelWillChange(DatelineModelEvent evt)
The listener's callback method that gets invoked when the model's time
span or time zone will change.
|
void |
deleteSelectedRelationships()
Deletes all currently selected relationships.This method delegates to
RelationshipLayer.deleteSelectedRelationships() ; |
void |
deleteSelectedTimelineObjects()
Deletes all currently selected timeline objects.
|
protected void |
fireGridChanged()
Informs all grid component listeners that the grid used by the eventline
has changed.
|
protected void |
fireLayerContainerChanged(LayerContainerEvent evt)
Fires a layer container event, which will be sent to all listeners
currently attached to the container.
|
void |
ganttChartChanged(GanttChartModelEvent e)
Callback method that gets invoked whenever change occures in the Gantt
chart model that is being observed by the listener.
|
Collection<ObjectBounds> |
getAllObjectBoundsAt(int x,
int y)
Searches for and returns all object bounds for the given coordinates.
|
Collection<ObjectBounds> |
getAllObjectBoundsAt(MouseEvent evt)
Searches for and returns all object bounds for the coordinates of the
given mouse event.
|
Color |
getAlternatingBackground()
Returns the color used as an alternating background color for odd row
numbers.
|
Insets |
getAutoscrollInsets() |
Color |
getBackground(int row)
Returns the background color for the given row.
|
IBookmarkModel |
getBookmarkModel()
Returns the (optional) bookmark model.
|
List<TreeTableNode> |
getClipNodes()
Returns a list of tree table nodes where each node is contained within
the current drawing clip.
|
int |
getClippingExtra()
Returns the number of pixels that will be added to the clipping rectangle
during repaint operations of the layer container.
|
AbstractCustomLayer |
getCustomLayer(ILayer layer)
Returns the customer layer for the given model layer.
|
Dateline |
getDateline()
Returns the dateline.
|
Eventline |
getEventline()
Returns the eventline.
|
AbstractGanttChart |
getGanttChart()
Returns the parent Gantt chart.
|
String |
getGridComponentName()
Returns the name of the grid component.
|
IGranularity |
getGridGranularity()
Returns the granularity used for a virtual grid that gets used during
drag & drop operations to make timeline objects snap to specific time
points rather than just the current drop location.
|
IGridPolicy |
getGridPolicy()
Returns the grid policy used by the grid component.
|
long |
getHighlightingDelay()
Returns the delay in milliseconds used by the highlighting thread which
makes the highlighted objects blink (default behaviour).
|
long |
getHighlightingDuration()
Returns the highlighting duration in milliseconds used by the
highlighting thread which makes the highlighted objects blink (default
behaviour).
|
ILayerFactory |
getLayerFactory()
Returns the factory that was used to create the various layer UIs.
|
Icon |
getLayerIcon(ILayer layer)
Returns an icon representation for the given layer.
|
int |
getLayerIndex(AbstractLayer layer)
Returns the index of the given layer within the list of layers that are
currently managed by the layer container.
|
int |
getLayerIndex(ILayer layer)
Returns the index of the given layer within the layer stack.
|
ILayer[] |
getLayers()
Returns the layer stack.
|
ILayerContainerMenuProvider |
getMenuProvider()
Returns a menu provider that can be used by the layer container to lookup
a popup menu for a specific context where the context is defined by the
tree path, timeline object paths, etc...
|
Dimension |
getMinimumSize() |
IGanttChartModel |
getModel()
Returns the Gantt chart model.
|
ObjectBounds |
getObjectBounds(TimelineObjectPath path)
Returns the object bounds for the given timeline object path.
|
ObjectBounds |
getObjectBoundsAt(int x,
int y)
Searches for and returns object bounds for the given coordinates.
|
ObjectBounds |
getObjectBoundsAt(int x,
int y,
int proximity)
Searches for and returns object bounds for the given coordinates.
|
ObjectBounds |
getObjectBoundsAt(MouseEvent evt)
Searches for and returns object bounds for the coordinates of the given
mouse event.
|
IPolicyProvider |
getPolicyProvider()
Returns the layer container's policy provider.
|
JPopupMenu |
getPopup()
Returns the currently or last used popup menu.
|
Dimension |
getPreferredSize() |
Map<Class,ITimelineObjectRenderer> |
getRendererMap()
Returns the map that is containing the mapping of timeline object classes
to renderers.
|
CellRendererPane |
getRendererPane()
Returns the shared renderer pane that can be used by the layer UIs to
draw objects via renderers.
|
LayerContainer.RenderingDirection |
getRenderingDirection()
Returns a hint whether the timeline objects will be rendered right to
left or left to right (default).
|
IResolutionProvider |
getResolutionProvider()
Returns the resolution provider used by the layer container.
|
int |
getRowAt(int y)
Returns the row index at the given vertical location.
|
List<TimelineObjectPath> |
getSelectedTimelineObjects()
Returns all timeline objects that are currently selected on the
visible timeline layers.
|
List<TimelineObjectPath> |
getSelectedTimelineObjects(ILayer layer)
Returns all timeline objects that are currently selected on the given
timeline layer (independent of whether or not the layer is visible).
|
ILayerContainerSelectionModel |
getSelectionModel()
Returns the selection model associated with the layer container.
|
ITimelineObjectSelectionModel |
getSelectionModel(ILayer layer)
Returns the selection model for the given layer.
|
int |
getStartRow()
Returns the first visible row in the currently visible rectangle.
|
<T extends AbstractSystemLayer> |
getSystemLayer(Class<T> layerType)
Returns the UI component for the given system layer.
|
Timeline |
getTimeline()
Returns the timeline.
|
ITimelineObjectEditor |
getTimelineObjectEditor(Class cl)
Returns a timeline object editor for an object.
|
TimelineObjectLayer |
getTimelineObjectLayer(ILayer layer)
Returns the timeline object layer for the given model layer.
|
Collection<TimelineObjectLayer> |
getTimelineObjectLayers()
Returns a collection of all timeline object layers.
|
ITimelineObjectRenderer |
getTimelineObjectRenderer(Class cl)
Returns a timeline object renderer for an object.
|
Color |
getTimelineObjectStatusColor(Object status)
Returns the color mapped to the given status object.
|
Icon |
getTimelineObjectStatusIcon(Object status)
Returns the icon mapped to the given status object.
|
ITimeSpan |
getTimeSpanUsed()
Returns the time span used by the layer container.
|
TreeTable |
getTreeTable()
Returns the tree table that is placed to the left of the layer container.
|
protected List<Class<? extends AbstractSystemLayer>> |
getTypesOfLowerSystemLayers()
Returns those system layers that will be placed below the timeline
object layers and the customer layers.
|
protected List<Class<? extends AbstractSystemLayer>> |
getTypesOfUpperSystemLayers()
Returns those system layers that will be placed above the timeline
object layers and the customer layers.
|
ILayer[] |
getVisibleLayers()
Returns the layer stack of those layers that are currently visible.
|
boolean |
hasClipNodes()
Determines whether or not the current drawing clip affected any tree
table nodes.
|
void |
hideAllLayers()
Hides all timeline object and custom layers.
|
void |
hideLayer(ILayer layer)
Hides the layer that belongs to the given model layer.
|
boolean |
isDraggingEnabled()
Returns TRUE if the layer container generally supports drag and drop
operations on timeline objects.
|
boolean |
isGridAutomatic()
Determines whether the component is using an automatic grid.
|
boolean |
isGridControlVisible()
Determines whether the UI component used to control the grid is currently
visible or not.
|
boolean |
isHighlighted(TimelineObjectPath path)
Determines if the timeline object specified by the given path is
currently a member of the set of highlighted objects.
|
boolean |
isHighlighting()
Determines whether timeline objects that are contained in the set of
highlighted objects shall render themselves highlighted or normal.
|
boolean |
isIgnoringTreeTableSelection()
Determines whether selections made in the layer container (e.g.
|
boolean |
isLayerVisible(ILayer layer)
Checks whether the given model layer has a visible user interface layer.
|
boolean |
isLinkingEnabled()
Returns TRUE if the layer container generally supports the linking of
timeline objects.
|
boolean |
isPopupShowing()
Determines whether a popup menu is currently in use.
|
boolean |
isPrimary()
Determines whether the layer container is the primary layer
container.
|
void |
layerContainerChanged(LayerContainerEvent evt)
The listener's callback method that gets invoked by the
LayerContainer when the container changes. |
void |
mouseClicked(MouseEvent evt) |
void |
mouseDragged(MouseEvent evt) |
void |
mouseEntered(MouseEvent evt) |
void |
mouseExited(MouseEvent evt) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent evt) |
void |
mouseReleased(MouseEvent evt) |
void |
moveBack(ILayer layer)
Moves the given layer backwards causing the layer's timeline objects to
be drawn at a later stage than before.
|
void |
moveForward(ILayer layer)
Moves the given layer forward causing the layer's timeline objects to be
drawn at an earlier stage than before.
|
void |
moveToBack(ILayer layer)
Moves the given layer to the back so that the layer will be drawn first
and all other layers will be drawn after it / on top of it.
|
void |
moveToFront(ILayer layer)
Moves the given layer to the front so that the layer will be drawn last
and all other layers will be drawn before it / below it.
|
void |
paintComponent(Graphics g) |
void |
propertyChange(PropertyChangeEvent evt) |
void |
removeGridComponentListener(IGridComponentListener l)
Removes a listener from the grid component.
|
void |
removeHighlightedObjects(Collection<TimelineObjectPath> paths)
Removes a collection of timeline object paths where each timeline object
referenced will be removed from the set of highlighted objects
|
void |
removeLayerContainerListener(ILayerContainerListener l)
Removes a listener from the container
|
void |
repaintRow(int row)
Repaints the given row only.
|
void |
selectAllTimelineObjects()
Selects all timeline objects on all layers, independent of whether the
layer is currently visible or not.
|
void |
setAlternatingBackground(Color color)
Sets the color used as an alternating background color for odd row
numbers.
|
void |
setBookmarkModel(IBookmarkModel model)
Sets the (optional) bookmark model.
|
void |
setClippingExtra(int extra)
Specifies the number of pixels that will be added to the clipping
rectangle during repaint operations of the layer container.
|
void |
setDraggingEnabled(boolean enabled)
Enabled / disables dragging globally.
|
void |
setGridAutomatic(boolean auto)
Specifies whether the component is using an automatic grid.
|
void |
setGridControlVisible(boolean b)
Specifies whether the grid control will be visible in the Gantt chart.
|
void |
setGridGranularity(IGranularity granularity)
Sets the granularity used for a virtual grid that gets used during drag &
drop operations to make timeline objects snap to specific time points
rather than just the current drop location.
|
void |
setHighlighting(boolean b)
Sets the highlight flag that will be passed to timeline object renderers
to tell them whether those timeline objects contained in the set of
highlighted objects are to be rendered highlighted or not.
|
void |
setHighlightingDelay(long delay)
Sets the delay in milliseconds used by the highlighting thread which
makes the highlighted objects blink (default behaviour).
|
void |
setHighlightingDuration(long duration)
Sets the highlighting duration in milliseconds used by the highlighting
thread which makes the highlighted objects blink (default behaviour).
|
void |
setIgnoringTreeTableSelection(boolean ignore)
Specifies whether selections made in the layer container (e.g.
|
void |
setLayerIcon(ILayer layer,
Icon icon)
Sets an icon that will be used to represent the given layer in various
user interface components, for example in the
LayerPalette . |
void |
setLinkingEnabled(boolean enabled)
Enabled / disables linking timeline objects globally.
|
void |
setMenuProvider(ILayerContainerMenuProvider provider)
Specifies a menu provider that can be used by the layer container to
lookup a popup menu for a specific context where the context is defined
by the tree path, timeline object paths, etc...
|
void |
setModel(IGanttChartModel model)
Sets a new Gantt chart model.
|
void |
setPolicyProvider(IPolicyProvider provider)
Changes the container's policy provider.
|
void |
setPrimary(boolean primary)
Specifies that the layer container is the primary layer container.
|
void |
setRendererMap(Map<Class,ITimelineObjectRenderer> map)
Sets an entire set of timeline object renderers at once.
|
void |
setRenderingDirection(LayerContainer.RenderingDirection direction)
Provides a hint whether the timeline objects will be rendered right to
left or left to right (default).
|
void |
setResolutionProvider(IResolutionProvider provider)
Sets the resolution provider used by the layer container.
|
void |
setSelectionModel(ILayerContainerSelectionModel model)
Replaces the current selection model with a new one.
|
void |
setSelectionModel(ILayer layer,
ITimelineObjectSelectionModel model)
Sets a selection model implementation for the given layer.
|
void |
setTimelineObjectEditor(Class objectType,
ITimelineObjectEditor editor)
Maps the implementation of a timeline object editor to a class
definition.
|
void |
setTimelineObjectRenderer(Class objectType,
ITimelineObjectRenderer renderer)
Maps the implementation of a timeline object renderer to a class
definition.
|
void |
setTimelineObjectStatusColor(Object status,
Color color)
Maps a color to the given status object.
|
void |
setTimelineObjectStatusIcon(Object status,
Icon icon)
Maps an icon to the given status object.
|
void |
showAllLayers()
Shows all timeline object and custom layers.
|
void |
showAllObjects()
Scrolls and zooms the
Dateline in such a way that allf 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 |
showLayer(ILayer layer)
Ensures that the given layer becomes visible.
|
void |
tearDown()
Tears down the container by invoking
AbstractLayer.tearDown() on
all layers used by the container, indepedent of whether they are
currently visible or not. |
void |
timeSpansAdded(TimeSpanSelectionEvent evt)
Callback method that gets invoked when time spans have been added to the
selection model.
|
void |
timeSpansRemoved(TimeSpanSelectionEvent evt)
Callback method that gets invoked when time spans have been removed from
the selection model.
|
void |
treeCollapsed(TreeExpansionEvent event) |
void |
treeExpanded(TreeExpansionEvent event) |
void |
treeNodeKeyChanged(TreeTableModelEvent evt)
Callback method that gets invoked if the user edited the key value of
a tree table node.
|
void |
treeNodesChanged(TreeModelEvent e) |
void |
treeNodesInserted(TreeModelEvent e) |
void |
treeNodesRemoved(TreeModelEvent e) |
void |
treeNodeValueChanged(TreeTableModelEvent evt)
Callback method that gets invoked if the user edited a column value of a
tree table node.
|
void |
treeStructureChanged(TreeModelEvent e) |
void |
valueChanged(TreeSelectionEvent e) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, getNextFocusableComponent, getPopupLocation, 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, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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_DRAGGING_ENABLED
public static final String PROPERTY_LINKING_ENABLED
public static final String PROPERTY_POLICY_PROVIDER
public static final String PROPERTY_SELECTION_MODEL
public static final String PROPERTY_ALTERNATING_BACKGROUND
public static final String PROPERTY_MODEL
public static final String PROPERTY_BOOKMARK_MODEL
setBookmarkModel(IBookmarkModel)
,
Constant Field Valuespublic static final String PROPERTY_GRID_GRANULARITY
setBookmarkModel(IBookmarkModel)
,
Constant Field Valuespublic LayerContainer(AbstractGanttChart ganttChart, IGanttChartModel model, TreeTable treeTable, ILayerFactory layerFactory)
ganttChart
- the parent containermodel
- the Gantt chart model visualized by the layer containertreeTable
- the tree table that belongs to the layer containerlayerFactory
- the factory used to create the different layer typespublic void calendarChanged(CalendarModelEvent evt)
ICalendarModelListener
calendarChanged
in interface ICalendarModelListener
evt
- the change event with more information on the source of the
changepublic void setModel(IGanttChartModel model)
model
- the new Gantt chart modelpublic void ganttChartChanged(GanttChartModelEvent e)
IGanttChartModelListener
ganttChartChanged
in interface IGanttChartModelListener
e
- the event object describing the change that took place in the
Gantt chart modelpublic ILayerFactory getLayerFactory()
protected List<Class<? extends AbstractSystemLayer>> getTypesOfUpperSystemLayers()
AbstractGanttChart.isVerticalLinesOnTop()
method controls whether
the GridLayer
will be added to the system layers that are on top
or the ones that are on the bottom.getTypesOfLowerSystemLayers()
protected List<Class<? extends AbstractSystemLayer>> getTypesOfLowerSystemLayers()
AbstractGanttChart.isVerticalLinesOnTop()
method controls whether
the GridLayer
will be added to the system layers that are on top
or the ones that are on the bottom.getTypesOfUpperSystemLayers()
public int getLayerIndex(AbstractLayer layer)
layer
- the layer for which to return the indexpublic <T extends AbstractSystemLayer> T getSystemLayer(Class<T> layerType)
T
- the type of the system layerlayerType
- the system layer typepublic ObjectBounds getObjectBoundsAt(int x, int y)
x
- the x-coordinatey
- the y-coordinatepublic ObjectBounds getObjectBoundsAt(int x, int y, int proximity)
x
- the x-coordinatey
- the y-coordinateproximity
- controls whether to find objects that are within the proximity
of the given location, objects that are "close enough"public ObjectBounds getObjectBoundsAt(MouseEvent evt)
evt
- the mouse eventpublic Collection<ObjectBounds> getAllObjectBoundsAt(int x, int y)
x
- the x-coordinatey
- the y-coordinategetObjectBoundsAt(int, int)
public Collection<ObjectBounds> getAllObjectBoundsAt(MouseEvent evt)
evt
- the mouse eventpublic ObjectBounds getObjectBounds(TimelineObjectPath path)
path
- the path to locate the timeline objectpublic List<TimelineObjectPath> getSelectedTimelineObjects()
public List<TimelineObjectPath> getSelectedTimelineObjects(ILayer layer)
layer
- the layer for which to return the selected timeline objectspublic TimelineObjectLayer getTimelineObjectLayer(ILayer layer)
layer
- the model layerpublic Collection<TimelineObjectLayer> getTimelineObjectLayers()
public AbstractCustomLayer getCustomLayer(ILayer layer)
layer
- the model layerILayer.isCustomLayer()
public void addNotify()
JComponent.addNotify()
and additionally initializes some
colors for the layer container. The colors are based on colors retrieved
from the tree table.addNotify
in class JComponent
JPanel.updateUI()
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public Timeline getTimeline()
AbstractGanttChart.getTimeline()
.getDateline()
,
getEventline()
public Dateline getDateline()
Timeline.getDateline()
.getTimeline()
,
getEventline()
public Eventline getEventline()
Timeline.getEventline()
.getTimeline()
,
getDateline()
public IGanttChartModel getModel()
public AbstractGanttChart getGanttChart()
public TreeTable getTreeTable()
public Color getBackground(int row)
row
- the row for which to return a background colorpublic int getRowAt(int y)
y
- the y-coordinate for which to return a row numberpublic ITimeSpan getTimeSpanUsed()
AbstractLayer.getTimeSpanUsed()
public int getStartRow()
TreeTable.getRowAt(int)
public void paintComponent(Graphics g)
paintComponent
in class JComponent
public void commandStackChanged(CommandStackEvent evt)
ICommandStackListener
commandStackChanged
in interface ICommandStackListener
evt
- the event issued by the command stackpublic void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public ILayer[] getLayers()
getVisibleLayers()
,
moveBack(ILayer)
,
moveForward(ILayer)
,
moveToBack(ILayer)
,
moveToFront(ILayer)
public ILayer[] getVisibleLayers()
getLayers()
public boolean isLayerVisible(ILayer layer)
layer
- the model layer to check for visibilitypublic void moveToBack(ILayer layer)
layer
- the layer that will be moved to the backmoveToFront(ILayer)
,
moveBack(ILayer)
,
moveForward(ILayer)
public void moveToFront(ILayer layer)
layer
- the layer that will be moved to the frontmoveToBack(ILayer)
,
moveBack(ILayer)
,
moveForward(ILayer)
public void moveBack(ILayer layer)
layer
- the layer that will be moved backwardsmoveForward(ILayer)
,
moveToBack(ILayer)
,
moveToFront(ILayer)
public void moveForward(ILayer layer)
layer
- the layer that will be moved backwardsmoveForward(ILayer)
,
moveToBack(ILayer)
,
moveToFront(ILayer)
public int getLayerIndex(ILayer layer)
layer
- the layer for which to return the indexgetLayers()
public void showLayer(ILayer layer)
layer
- the layer to showhideLayer(ILayer)
public void showAllLayers()
public void hideLayer(ILayer layer)
layer
- the layer to hideshowLayer(ILayer)
public void hideAllLayers()
public void alignStartTimes()
alignEndTimes()
public void alignEndTimes()
alignStartTimes()
public void mouseClicked(MouseEvent evt)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent evt)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent evt)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent evt)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent evt)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent evt)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public IPolicyProvider getPolicyProvider()
public void setPolicyProvider(IPolicyProvider provider)
PROPERTY_POLICY_PROVIDER
.provider
- the new policy providergetPolicyProvider()
public void setDraggingEnabled(boolean enabled)
PROPERTY_DRAGGING_ENABLED
.enabled
- enables / disables draggingisDraggingEnabled()
public boolean isDraggingEnabled()
setDraggingEnabled(boolean)
public void setLinkingEnabled(boolean enabled)
PROPERTY_LINKING_ENABLED
.enabled
- enables / disables linkingisLinkingEnabled()
public boolean isLinkingEnabled()
setLinkingEnabled(boolean)
public ILayerContainerSelectionModel getSelectionModel()
setSelectionModel(ILayerContainerSelectionModel)
,
DefaultLayerContainerSelectionModel
public void setSelectionModel(ILayerContainerSelectionModel model)
PROPERTY_SELECTION_MODEL
.model
- the new selection modelgetSelectionModel()
,
DefaultLayerContainerSelectionModel
public void timeSpansAdded(TimeSpanSelectionEvent evt)
ILayerContainerSelectionModelListener
timeSpansAdded
in interface ILayerContainerSelectionModelListener
evt
- an event describing the modification of the selection modelILayerContainerSelectionModelListener.timeSpansRemoved(TimeSpanSelectionEvent)
public void timeSpansRemoved(TimeSpanSelectionEvent evt)
ILayerContainerSelectionModelListener
timeSpansRemoved
in interface ILayerContainerSelectionModelListener
evt
- an event describing the modification of the selection modelILayerContainerSelectionModelListener.timeSpansAdded(TimeSpanSelectionEvent)
public ILayerContainerMenuProvider getMenuProvider()
public void setMenuProvider(ILayerContainerMenuProvider provider)
provider
- the provider that will be used by the layer container to find
a suitable popup menu for a specific contextpublic Color getAlternatingBackground()
setAlternatingBackground(Color)
,
TreeTable.getAlternatingBackground()
public void setAlternatingBackground(Color color)
PROPERTY_ALTERNATING_BACKGROUND
.color
- the background color for odd row numberspublic List<TreeTableNode> getClipNodes()
public boolean hasClipNodes()
public void setTimelineObjectStatusColor(Object status, Color color)
OverviewPalette
) to render
timeline objects differently based on their status.status
- the status object to which a color gets mappedcolor
- the color to use for the given statuspublic Color getTimelineObjectStatusColor(Object status)
OverviewPalette
) to
render timeline objects differently based on their status.status
- the status object to which a color gets mappedpublic void setTimelineObjectStatusIcon(Object status, Icon icon)
OverviewPalette
) to render timeline
objects differently based on their status.status
- the status object to which a color gets mappedicon
- the icon to use for the given statuspublic Icon getTimelineObjectStatusIcon(Object status)
OverviewPalette
) to render
timeline objects differently based on their status.status
- the status object to which a color gets mappedpublic void datelineModelWillChange(DatelineModelEvent evt)
IDatelineModelListener
datelineModelWillChange
in interface IDatelineModelListener
evt
- the event that occured on the datelinepublic void datelineModelChanged(DatelineModelEvent evt)
IDatelineModelListener
datelineModelChanged
in interface IDatelineModelListener
evt
- the event that occured on the datelinepublic CellRendererPane getRendererPane()
public void addLayerContainerListener(ILayerContainerListener l)
l
- the added listenerpublic void removeLayerContainerListener(ILayerContainerListener l)
l
- the removed listenerprotected void fireLayerContainerChanged(LayerContainerEvent evt)
evt
- the layer container eventpublic void layerContainerChanged(LayerContainerEvent evt)
ILayerContainerListener
LayerContainer
when the container changes.layerContainerChanged
in interface ILayerContainerListener
public JPopupMenu getPopup()
ILayerContainerMenuProvider
or by
calling JComponent.getComponentPopupMenu()
.public boolean isPopupShowing()
public void addHighlightedObject(TimelineObjectPath path)
path
- a timeline object path that will be added to the set of
highlighted objectsaddHighlightedObjects(Collection)
,
removeHighlightedObjects(Collection)
,
clearHighlightedObjects()
public void addHighlightedObjects(Collection<TimelineObjectPath> paths)
paths
- a collection of timeline object paths where each timeline
object referenced will be added to the set of highlighted
objectsremoveHighlightedObjects(Collection)
,
clearHighlightedObjects()
public void removeHighlightedObjects(Collection<TimelineObjectPath> paths)
paths
- a collection of timeline object paths where each timeline
object referenced will be removed from the set of highlighted
objectsaddHighlightedObjects(Collection)
,
clearHighlightedObjects()
public void clearHighlightedObjects()
addHighlightedObjects(Collection)
,
removeHighlightedObjects(Collection)
public boolean isHighlighted(TimelineObjectPath path)
path
- the path pointing to the timeline object to check for
highlightingpublic void setHighlighting(boolean b)
b
- if TRUE highlighting will be turned onisHighlighting()
,
addHighlightedObjects(Collection)
,
removeHighlightedObjects(Collection)
,
clearHighlightedObjects()
public boolean isHighlighting()
setHighlighting(boolean)
,
addHighlightedObjects(Collection)
,
removeHighlightedObjects(Collection)
,
clearHighlightedObjects()
public long getHighlightingDelay()
public void setHighlightingDelay(long delay)
delay
- the highlight thread delay (in milliseconds)public long getHighlightingDuration()
setHighlighting(boolean)
public void setHighlightingDuration(long duration)
duration
- the highlight thread delay (in milliseconds)setHighlighting(boolean)
public void setTimelineObjectRenderer(Class objectType, ITimelineObjectRenderer renderer)
objectType
- the type of those timeline objects that will be rendered with
the given rendererrenderer
- an implementation that will be used to renderer instances of
the given object typeDefaultTimelineObjectRenderer
,
getTimelineObjectRenderer(Class)
public void setTimelineObjectEditor(Class objectType, ITimelineObjectEditor editor)
objectType
- the type of those timeline objects that will be rendered with
the given renderereditor
- an implementation that will be used to edit instances of the
given object typeAbstractTimelineObjectEditor
,
getTimelineObjectEditor(Class)
public ITimelineObjectRenderer getTimelineObjectRenderer(Class cl)
cl
- the object type in need of renderingsetTimelineObjectRenderer(Class, ITimelineObjectRenderer)
,
DefaultTimelineObjectRenderer
public ITimelineObjectEditor getTimelineObjectEditor(Class cl)
cl
- the object type in need of editingsetTimelineObjectEditor(Class, ITimelineObjectEditor)
,
AbstractTimelineObjectEditor
public void setLayerIcon(ILayer layer, Icon icon)
LayerPalette
.layer
- the layer to which the icon will be mappedicon
- the icon that will be used to visualize the given layergetLayerIcon(ILayer)
public Icon getLayerIcon(ILayer layer)
layer
- the layer for which to return an iconsetLayerIcon(ILayer, Icon)
public ITimelineObjectSelectionModel getSelectionModel(ILayer layer)
layer
- the layer for which to return a selection modelsetSelectionModel(ILayer, ITimelineObjectSelectionModel)
public void setSelectionModel(ILayer layer, ITimelineObjectSelectionModel model)
layer
- the layer for which to set a selection modelmodel
- the selection model for the given layergetSelectionModel(ILayer)
public Map<Class,ITimelineObjectRenderer> getRendererMap()
public void setRendererMap(Map<Class,ITimelineObjectRenderer> map)
map
- the renderers map used by the layer container to lookup
renderers based on the type of a timeline objectpublic IBookmarkModel getBookmarkModel()
NavigationControlPanel
public void setBookmarkModel(IBookmarkModel model)
model
- the bookmark modelPagingControlPanel
public IGranularity getGridGranularity()
getGridGranularity
in interface IGridComponent
public void setGridGranularity(IGranularity granularity)
setGridGranularity
in interface IGridComponent
granularity
- the grid granularityIGridComponent.setGridAutomatic(boolean)
public void setGridAutomatic(boolean auto)
IGridComponent
setGridAutomatic
in interface IGridComponent
auto
- if TRUE the grid gets calculated automatically and not based
on the given grid granularitypublic boolean isGridAutomatic()
IGridComponent
isGridAutomatic
in interface IGridComponent
public void setGridControlVisible(boolean b)
b
- if TRUE the control will be shownIGridComponentListener.gridComponentChanged()
public boolean isGridControlVisible()
IGridComponent
isGridControlVisible
in interface IGridComponent
public String getGridComponentName()
IGridComponent
getGridComponentName
in interface IGridComponent
public IGridPolicy getGridPolicy()
IGridComponent
getGridPolicy
in interface IGridComponent
public boolean isPrimary()
public void setPrimary(boolean primary)
primary
- if TRUE the layer container is the primary onepublic 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 showAllObjects()
Dateline
in such a way that allf timeline
objects (stored on the currently visible rows) become visible.public void selectAllTimelineObjects()
public void clearTimelineObjectSelection()
public void clearTimeSpanSelection()
public void deleteSelectedTimelineObjects()
public void deleteSelectedRelationships()
RelationshipLayer.deleteSelectedRelationships()
;public void repaintRow(int row)
row
- the row that will be repaintedpublic void addGridComponentListener(IGridComponentListener l)
IGridComponent
addGridComponentListener
in interface IGridComponent
l
- the grid component listenerpublic void removeGridComponentListener(IGridComponentListener l)
IGridComponent
removeGridComponentListener
in interface IGridComponent
l
- the grid component listener that gets removedprotected void fireGridChanged()
public void setClippingExtra(int extra)
During scrolling it can happen that the visual appearance of the event needs rendering even though the time point represented by the event is not within the visible rectangle, yet. The extra pixels added to the clipping rectangle will ensure that the event will be rendered never the less. The number of extra pixels should be equal to at least half the width of the largest event representation (e.g. half the diamond with used by the default timeline object renderer). The default setting of this property is 25.
extra
- the number of extra pixels added to the clipping rectangle
during repaint operationspublic int getClippingExtra()
During scrolling it can happen that the visual appearance of the event needs rendering even though the time point represented by the event is not within the visible rectangle, yet. The extra pixels added to the clipping rectangle will ensure that the event will be rendered never the less. The number of extra pixels should be equal to at least half the width of the largest event representation (e.g. half the diamond with used by the default timeline object renderer). The default setting of this property is 25.
public void setRenderingDirection(LayerContainer.RenderingDirection direction)
direction
- a hint regarding the rendering directionIGanttChartModel.getTimelineObjectsIterator(Object, ILayer,
ITimeSpan)
public LayerContainer.RenderingDirection getRenderingDirection()
IGanttChartModel.getTimelineObjectsIterator(Object, ILayer,
ITimeSpan)
public void autoscroll(Point cursorLocn)
autoscroll
in interface Autoscroll
public Insets getAutoscrollInsets()
getAutoscrollInsets
in interface Autoscroll
public void treeCollapsed(TreeExpansionEvent event)
treeCollapsed
in interface TreeExpansionListener
public void treeExpanded(TreeExpansionEvent event)
treeExpanded
in interface TreeExpansionListener
public void treeNodeKeyChanged(TreeTableModelEvent evt)
ITreeTableModelListener
treeNodeKeyChanged
in interface ITreeTableModelListener
evt
- the event fired by the tree table modelITreeTableModelListener.treeNodeValueChanged(TreeTableModelEvent)
public void treeNodeValueChanged(TreeTableModelEvent evt)
ITreeTableModelListener
treeNodeValueChanged
in interface ITreeTableModelListener
evt
- the event fired by the tree table modelITreeTableModelListener.treeNodeKeyChanged(TreeTableModelEvent)
public void treeNodesChanged(TreeModelEvent e)
treeNodesChanged
in interface TreeModelListener
public void treeNodesInserted(TreeModelEvent e)
treeNodesInserted
in interface TreeModelListener
public void treeNodesRemoved(TreeModelEvent e)
treeNodesRemoved
in interface TreeModelListener
public void treeStructureChanged(TreeModelEvent e)
treeStructureChanged
in interface TreeModelListener
public boolean isIgnoringTreeTableSelection()
public void setIgnoringTreeTableSelection(boolean ignore)
ignore
- if TRUE the lasso ignores the tree table selectionpublic void tearDown()
AbstractLayer.tearDown()
on
all layers used by the container, indepedent of whether they are
currently visible or not. Layers need to implement their
tearDown()
method if they need to free resources.public void valueChanged(TreeSelectionEvent e)
valueChanged
in interface TreeSelectionListener
public IResolutionProvider getResolutionProvider()
IResolution
,
Violation
,
DefaultResolutionProvider
public void setResolutionProvider(IResolutionProvider provider)
provider
- a resolution providerIResolution
,
Violation
,
DefaultResolutionProvider
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.