T - the type of the Gantt chartpublic class GanttChartStatusBar<T extends AbstractGanttChart> extends StatusBar implements IMessageListener, PropertyChangeListener, IDatelineModelListener, MouseMotionListener, IMultiGanttChartContainerListener, IProgressMonitor, ILassoLayerListener, IDragLayerListener
StatusBar.addItem(javax.swing.JComponent). Groups of fields can be visually
separated by calling StatusBar.addSeparator().
The status bar implements the IProgressMonitor interface. It can be
used to display progress of an activity without blocking the user from
working with the Gantt chart. A blocking progress monitor gets provided by
when calling AbstractGanttChart.getProgressMonitorFactory() and
IProgressMonitorFactory.createProgressMonitor().
IStatusBarPolicy,
IStatusBarPolicy.isStatusBarFieldVisible(StatusBarField),
Serialized FormJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategylistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTUNKNOWNABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
GanttChartStatusBar(IMultiGanttChartContainer<T> container)
Constructs a new status bar for the given multi Gantt chart container.
|
GanttChartStatusBar(IMultiGanttChartContainer<T> container,
boolean separatorsVisible)
Constructs a new status bar for the given multi Gantt chart container.
|
GanttChartStatusBar(T gc)
Constructs a new status bar for the given Gantt chart.
|
GanttChartStatusBar(T gc,
boolean separatorsVisible)
Constructs a new status bar for the given Gantt chart.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginTask(String name,
int totalWork)
Notifies that the main task is beginning.
|
void |
containerChanged(MultiGanttChartContainerEvent evt)
Listener callback method that will be invoked when the state of the
container changes.
|
void |
datelineModelChanged(DatelineModelEvent e)
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 |
done()
Notifies that the work is done; that is, either the main task is
completed or the user canceled it.
|
void |
dragging(DragLayerEvent evt)
Listener callback method that will be invoked when the user starts,
executes or finishes drag and drop operations in the drag layer.
|
protected String |
format(ITimeSpan span)
Formats the given time span with the Gantt chart's status bar policy.
|
protected String |
format(long time)
Forms the given time point with the Gantt chart's status bar policy.
|
JLabel |
getActionSelectorLabel()
Returns the label used to display the actions (key strokes) defined on
the Gantt chart.
|
JLabel |
getCrosshairLabel()
Returns the label used to display the crosshair icon when popups are
currently enabled.
|
AbstractGanttChart |
getGanttChart()
Returns the Gantt chart to which the status bar belongs.
|
JLabel |
getGridLabel()
Returns the label used to display the grid icon when the grid (vertical
lines) are currently visible.
|
JLabel |
getMemoryLabel()
Returns the label used to display the current memory allocation.
|
JLabel |
getMessagesLabel()
Returns the label used to display the 'incoming messages' icon.
|
JLabel |
getPopupLabel()
Returns the label used to display the popup icon when popups are
currently enabled.
|
JLabel |
getTimeLabel()
Returns the label used to display a time point.
|
JLabel |
getTimeNowLabel()
Returns the label used to display the 'time now'.
|
JLabel |
getTimeZoneLabel()
Returns the label used to display the time zone represented by the model
of the
Dateline (see IDatelineModel.getTimeZone()). |
void |
internalWorked(double work)
Internal method to handle scaling correctly.
|
boolean |
isCanceled()
Returns whether cancelation of current operation has been requested.
|
void |
lassoChanged(LassoLayerEvent evt)
Listener callback method that will be invoked when the user performs
lasso operations in the lasso layer.
|
void |
messageAdded(IMessage msg)
Called when a message has been added.
|
void |
messageRemoved(IMessage msg)
Called when a message has been removed.
|
void |
messagesCleared()
Called when all messages have been removed.
|
void |
mouseDragged(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
propertyChange(PropertyChangeEvent evt) |
void |
setCanceled(boolean value)
Sets the cancel state to the given value.
|
protected void |
setStatusTime(long time)
Sets a time point to be displayed in the status bar.
|
protected void |
setStatusTime(long time,
IGridComponent gridComp)
Sets a time point to be displayed in the status bar after adjusting it to
the currently used grid settings of the given grid component.
|
protected void |
setStatusTimeSpan(ITimeSpan span)
Sets a time span to be displayed in the status bar.
|
void |
setTaskName(String name)
Sets the task name to the given value.
|
void |
subTask(String name)
Notifies that a subtask of the main task is beginning.
|
void |
tearDown()
Ensures that the thread used to monitor the memory usage will be stopped.
|
protected void |
updateStatusBar(T gc)
Updates the content of the status bar based on the status bar policy
retrieved from the given Gantt chart.
|
void |
worked(int work)
Notifies that a given number of work unit of the main task has been
completed.
|
addItem, addLayoutComponent, addSeparator, getItemPanel, getResizeIconLabel, getStatus, getStatusLabel, layoutContainer, minimumLayoutSize, paintComponent, preferredLayoutSize, removeAllItems, removeLayoutComponent, setStatusgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, 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, updateadd, 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, validateTreeaction, 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, transferFocusUpCyclepublic GanttChartStatusBar(T gc, boolean separatorsVisible)
gc - the Gantt chart for which the status bar will display
informationseparatorsVisible - if TRUE separators will be visible between the status bar
itemspublic GanttChartStatusBar(T gc)
gc - the Gantt chart for which the status bar will display
informationpublic GanttChartStatusBar(IMultiGanttChartContainer<T> container, boolean separatorsVisible)
container - the multi Gantt chart containerseparatorsVisible - if TRUE separators will be visible between the status bar
itemspublic GanttChartStatusBar(IMultiGanttChartContainer<T> container)
container - the multi Gantt chart containerprotected void updateStatusBar(T gc)
gc - the Gantt chart with which the status bar will be linkedIStatusBarPolicy.isStatusBarFieldVisible(StatusBarField)public void datelineModelWillChange(DatelineModelEvent evt)
IDatelineModelListenerdatelineModelWillChange in interface IDatelineModelListenerevt - the event that occured on the datelinepublic void datelineModelChanged(DatelineModelEvent e)
IDatelineModelListenerdatelineModelChanged in interface IDatelineModelListenere - the event that occured on the datelinepublic AbstractGanttChart getGanttChart()
public JLabel getGridLabel()
public JLabel getPopupLabel()
public JLabel getCrosshairLabel()
public JLabel getMemoryLabel()
public JLabel getMessagesLabel()
public JLabel getTimeLabel()
public JLabel getTimeNowLabel()
public JLabel getTimeZoneLabel()
Dateline (see IDatelineModel.getTimeZone()).protected String format(long time)
time - the time point to formatIStatusBarPolicy,
AbstractGanttChart.getPolicyProvider()protected String format(ITimeSpan span)
span - the time span to formatIStatusBarPolicy,
AbstractGanttChart.getPolicyProvider()public void messageAdded(IMessage msg)
IMessageListenermessageAdded in interface IMessageListenermsg - the added messagepublic void messageRemoved(IMessage msg)
IMessageListenermessageRemoved in interface IMessageListenermsg - the removed messagepublic void messagesCleared()
IMessageListenermessagesCleared in interface IMessageListenerpublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic JLabel getActionSelectorLabel()
public void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerprotected void setStatusTime(long time,
IGridComponent gridComp)
time - the time to displaygridComp - the grid componentprotected void setStatusTime(long time)
time - the time point to displayprotected void setStatusTimeSpan(ITimeSpan span)
span - the span to displaypublic void containerChanged(MultiGanttChartContainerEvent evt)
IMultiGanttChartContainerListenercontainerChanged in interface IMultiGanttChartContainerListenerevt - the container eventpublic void beginTask(String name, int totalWork)
IProgressMonitorbeginTask in interface IProgressMonitorname - the name (or description) of the main tasktotalWork - the total number of work units into which the main task is
been subdivided. If the value is UNKNOWN the
implementation is free to indicate progress in a way which
doesn't require the total number of work units in advance.public void done()
IProgressMonitordone in interface IProgressMonitorpublic void internalWorked(double work)
IProgressMonitorinternalWorked in interface IProgressMonitorwork - the amount of work donepublic boolean isCanceled()
IProgressMonitorisCanceled in interface IProgressMonitortrue if cancellation has been requested, and
false otherwiseIProgressMonitor.setCanceled(boolean)public void setCanceled(boolean value)
IProgressMonitorsetCanceled in interface IProgressMonitorvalue - true indicates that cancelation has been
requested (but not necessarily acknowledged);
false clears this flagIProgressMonitor.isCanceled()public void setTaskName(String name)
IProgressMonitorsetTaskName in interface IProgressMonitorname - the name (or description) of the main taskIProgressMonitor.beginTask(java.lang.String, int)public void subTask(String name)
IProgressMonitorsubTask in interface IProgressMonitorname - the name (or description) of the subtaskpublic void worked(int work)
IProgressMonitorworked in interface IProgressMonitorwork - the number of work units just completedpublic void lassoChanged(LassoLayerEvent evt)
ILassoLayerListenerlassoChanged in interface ILassoLayerListenerevt - the event describing the lasso operationpublic void dragging(DragLayerEvent evt)
IDragLayerListenerdragging in interface IDragLayerListenerevt - the event describing the drag operationpublic void tearDown()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.