|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.dlsc.flexgantt.swing.layer.LayerContainer
public class LayerContainer
The layer container is the main user interface component on the right-hand side of the Gantt chart. It stores and manages the various UI layers that were created based on the layer information retrieved from the Gantt chart model. It also manages spreadsheets and time span selections.
Nested Class Summary | |
---|---|
static class |
LayerContainer.RenderingDirection
An enumerator, which can be used to specify a rendering hint for the framework. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_ALTERNATING_BACKGROUND
A constant used for property change events that get fired when the alteranting background color gets replaced. |
static java.lang.String |
PROPERTY_BOOKMARK_MODEL
Constant used for those property change events that get fired when the bookmark information changes. |
static java.lang.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 java.lang.String |
PROPERTY_GRID_GRANULARITY
Constant used for those property change events that get fired when the grid granularity changes. |
static java.lang.String |
PROPERTY_POLICY_PROVIDER
A constant used for property change events that get fired when the policy provider gets replaced. |
static java.lang.String |
PROPERTY_SELECTION_MODEL
A constant used for property change events that get fired when the selection model gets replaced. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
LayerContainer(AbstractGanttChart ganttChart,
IGanttChartModel model,
TreeTable treeTable,
ILayerFactory layerFactory)
Constructs a new layer container. |
Method Summary | ||
---|---|---|
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(java.util.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 |
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(java.awt.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 |
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 |
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. |
|
java.util.Collection<ObjectBounds> |
getAllObjectBoundsAt(int x,
int y)
Searches for and returns all object bounds for the given coordinates. |
|
java.awt.Color |
getAlternatingBackground()
Returns the color used as an alternating background color for odd row numbers. |
|
java.awt.Insets |
getAutoscrollInsets()
|
|
java.awt.Color |
getBackground(int row)
Returns the background color for the given row. |
|
IBookmarkModel |
getBookmarkModel()
Returns the (optional) bookmark model. |
|
java.util.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. |
|
java.lang.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). |
|
ILayerFactory |
getLayerFactory()
Returns the factory that was used to create the various layer UIs. |
|
javax.swing.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... |
|
java.awt.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. |
|
IPolicyProvider |
getPolicyProvider()
Returns the layer container's policy provider. |
|
javax.swing.JPopupMenu |
getPopup()
Returns the currently or last used popup menu. |
|
java.awt.Dimension |
getPreferredSize()
|
|
java.util.Map<java.lang.Class,ITimelineObjectRenderer> |
getRendererMap()
Returns the map that is containing the mapping of timeline object classes to renderers. |
|
javax.swing.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). |
|
int |
getRowAt(int y)
Returns the row index at the given vertical location. |
|
java.util.List<TimelineObjectPath> |
getSelectedTimelineObjects()
Returns all timeline objects that are currently selected on the visible timeline layers. |
|
java.util.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. |
|
ITimelineObjectLayerSelectionModel |
getSelectionModel(ILayer layer)
Returns the selection model for the given layer. |
|
int |
getStartRow()
Returns the first visible row in the currently visible rectangle. |
|
|
getSystemLayer(java.lang.Class<T> layerType)
Returns the UI component for the given system layer. |
|
Timeline |
getTimeline()
Returns the timeline. |
|
ITimelineObjectEditor |
getTimelineObjectEditor(java.lang.Class cl)
Returns a timeline object editor for an object. |
|
TimelineObjectLayer |
getTimelineObjectLayer(ILayer layer)
Returns the timeline object layer for the given model layer. |
|
java.util.Collection<TimelineObjectLayer> |
getTimelineObjectLayers()
Returns a collection of all timeline object layers. |
|
ITimelineObjectRenderer |
getTimelineObjectRenderer(java.lang.Class cl)
Returns a timeline object renderer for an object. |
|
java.awt.Color |
getTimelineObjectStatusColor(java.lang.Object status)
Returns the color mapped to the given status object. |
|
javax.swing.Icon |
getTimelineObjectStatusIcon(java.lang.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 java.util.List<java.lang.Class<? extends AbstractSystemLayer>> |
getTypesOfLowerSystemLayers()
Returns those system layers that will be placed below the timeline object layers and the customer layers. |
|
protected java.util.List<java.lang.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 layers. |
|
void |
hideLayer(ILayer layer)
Hides the timeline object 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. via the lasso) will affect the selections made in the tree table. |
|
boolean |
isLayerVisible(ILayer layer)
Checks whether the given model layer has a visible user interface layer. |
|
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(java.awt.event.MouseEvent evt)
|
|
void |
mouseDragged(java.awt.event.MouseEvent evt)
|
|
void |
mouseEntered(java.awt.event.MouseEvent evt)
|
|
void |
mouseExited(java.awt.event.MouseEvent evt)
|
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
|
void |
mousePressed(java.awt.event.MouseEvent evt)
|
|
void |
mouseReleased(java.awt.event.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(java.awt.Graphics g)
|
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
|
void |
removeGridComponentListener(IGridComponentListener l)
Removes a listener from the grid component. |
|
void |
removeHighlightedObjects(java.util.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(java.awt.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 |
setIgnoringTreeTableSelection(boolean ignore)
Specifies whether selections made in the layer container (e.g. via the lasso) will affect the selections made in the tree table. |
|
void |
setLayerIcon(ILayer layer,
javax.swing.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 |
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 |
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(java.util.Map<java.lang.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 |
setSelectionModel(ILayerContainerSelectionModel model)
Replaces the current selection model with a new one. |
|
void |
setSelectionModel(ILayer layer,
ITimelineObjectLayerSelectionModel model)
Sets a selection model implementation for the given layer. |
|
void |
setTimelineObjectEditor(java.lang.Class objectType,
ITimelineObjectEditor editor)
Maps the implementation of a timeline object editor to a class definition. |
|
void |
setTimelineObjectRenderer(java.lang.Class objectType,
ITimelineObjectRenderer renderer)
Maps the implementation of a timeline object renderer to a class definition. |
|
void |
setTimelineObjectStatusColor(java.lang.Object status,
java.awt.Color color)
Maps a color to the given status object. |
|
void |
setTimelineObjectStatusIcon(java.lang.Object status,
javax.swing.Icon icon)
Maps an icon to the given status object. |
|
void |
showAllLayers()
Shows all timeline object 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 |
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 |
treeNodeKeyChanged(TreeTableModelEvent evt)
Callback method that gets invoked if the user edited the key value of a tree table node. |
|
void |
treeNodesChanged(javax.swing.event.TreeModelEvent e)
|
|
void |
treeNodesInserted(javax.swing.event.TreeModelEvent e)
|
|
void |
treeNodesRemoved(javax.swing.event.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(javax.swing.event.TreeModelEvent e)
|
|
void |
updateUI()
Calls JComponent.updateUI() and additionally initializes some
colors for the layer container. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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 |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_DRAGGING_ENABLED
public static final java.lang.String PROPERTY_POLICY_PROVIDER
public static final java.lang.String PROPERTY_SELECTION_MODEL
public static final java.lang.String PROPERTY_ALTERNATING_BACKGROUND
public static final java.lang.String PROPERTY_BOOKMARK_MODEL
setBookmarkModel(IBookmarkModel)
,
Constant Field Valuespublic static final java.lang.String PROPERTY_GRID_GRANULARITY
setBookmarkModel(IBookmarkModel)
,
Constant Field ValuesConstructor Detail |
---|
public 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 typesMethod Detail |
---|
public void calendarChanged(CalendarModelEvent evt)
ICalendarModelListener
calendarChanged
in interface ICalendarModelListener
evt
- the change event with more information on the source of the
changepublic 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 java.util.List<java.lang.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 java.util.List<java.lang.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 index
public <T extends AbstractSystemLayer> T getSystemLayer(java.lang.Class<T> layerType)
T
- the type of the system layerlayerType
- the system layer type
public ObjectBounds getObjectBoundsAt(int x, int y)
x
- the x-coordinatey
- the y-coordinate
public java.util.Collection<ObjectBounds> getAllObjectBoundsAt(int x, int y)
x
- the x-coordinatey
- the y-coordinate
getObjectBoundsAt(int, int)
public ObjectBounds getObjectBounds(TimelineObjectPath path)
path
- the path to locate the timeline object
public java.util.List<TimelineObjectPath> getSelectedTimelineObjects()
public java.util.List<TimelineObjectPath> getSelectedTimelineObjects(ILayer layer)
layer
- the layer for which to return the selected timeline objects
public TimelineObjectLayer getTimelineObjectLayer(ILayer layer)
layer
- the model layer
public java.util.Collection<TimelineObjectLayer> getTimelineObjectLayers()
public AbstractCustomLayer getCustomLayer(ILayer layer)
layer
- the model layer
ILayer.isCustomLayer()
public void updateUI()
JComponent.updateUI()
and additionally initializes some
colors for the layer container. The colors are based on colors retrieved
from the tree table.
updateUI
in class javax.swing.JPanel
JPanel.updateUI()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.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 java.awt.Color getBackground(int row)
row
- the row for which to return a background color
public int getRowAt(int y)
y
- the y-coordinate for which to return a row number
public ITimeSpan getTimeSpanUsed()
AbstractLayer.getTimeSpanUsed()
public int getStartRow()
TreeTable.getRowAt(int)
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void commandStackChanged(CommandStackEvent evt)
ICommandStackListener
commandStackChanged
in interface ICommandStackListener
evt
- the event issued by the command stackpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.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 visibility
public 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 index
getLayers()
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(java.awt.event.MouseEvent evt)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent evt)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent evt)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.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 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 java.awt.Color getAlternatingBackground()
setAlternatingBackground(Color)
,
TreeTable.getAlternatingBackground()
public void setAlternatingBackground(java.awt.Color color)
PROPERTY_ALTERNATING_BACKGROUND
.
color
- the background color for odd row numberspublic java.util.List<TreeTableNode> getClipNodes()
public boolean hasClipNodes()
public void setTimelineObjectStatusColor(java.lang.Object status, java.awt.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 java.awt.Color getTimelineObjectStatusColor(java.lang.Object status)
OverviewPalette
) to
render timeline objects differently based on their status.
status
- the status object to which a color gets mapped
public void setTimelineObjectStatusIcon(java.lang.Object status, javax.swing.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 javax.swing.Icon getTimelineObjectStatusIcon(java.lang.Object status)
OverviewPalette
) to
render timeline objects differently based on their status.
status
- the status object to which a color gets mapped
public 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 javax.swing.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 javax.swing.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(java.util.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(java.util.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
highlighting
public 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 void setTimelineObjectRenderer(java.lang.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(java.lang.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(java.lang.Class cl)
cl
- the object type in need of rendering
setTimelineObjectRenderer(Class, ITimelineObjectRenderer)
,
DefaultTimelineObjectRenderer
public ITimelineObjectEditor getTimelineObjectEditor(java.lang.Class cl)
cl
- the object type in need of editing
setTimelineObjectEditor(Class, ITimelineObjectEditor)
,
AbstractTimelineObjectEditor
public void setLayerIcon(ILayer layer, javax.swing.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 javax.swing.Icon getLayerIcon(ILayer layer)
layer
- the layer for which to return an icon
setLayerIcon(ILayer, Icon)
public ITimelineObjectLayerSelectionModel getSelectionModel(ILayer layer)
layer
- the layer for which to return a selection model
setSelectionModel(ILayer, ITimelineObjectLayerSelectionModel)
public void setSelectionModel(ILayer layer, ITimelineObjectLayerSelectionModel model)
layer
- the layer for which to set a selection modelmodel
- the selection model for the given layergetSelectionModel(ILayer)
public java.util.Map<java.lang.Class,ITimelineObjectRenderer> getRendererMap()
public void setRendererMap(java.util.Map<java.lang.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 java.lang.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 deleteSelectedTimelineObjects()
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(java.awt.Point cursorLocn)
autoscroll
in interface java.awt.dnd.Autoscroll
public java.awt.Insets getAutoscrollInsets()
getAutoscrollInsets
in interface java.awt.dnd.Autoscroll
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(javax.swing.event.TreeModelEvent e)
treeNodesChanged
in interface javax.swing.event.TreeModelListener
public void treeNodesInserted(javax.swing.event.TreeModelEvent e)
treeNodesInserted
in interface javax.swing.event.TreeModelListener
public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
treeNodesRemoved
in interface javax.swing.event.TreeModelListener
public void treeStructureChanged(javax.swing.event.TreeModelEvent e)
treeStructureChanged
in interface javax.swing.event.TreeModelListener
public boolean isIgnoringTreeTableSelection()
public void setIgnoringTreeTableSelection(boolean ignore)
ignore
- if TRUE the lasso ignores the tree table selection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |