public class IlvJGraphLayoutProgressBar extends JProgressBar implements GraphLayoutEventListener
This is a JProgressBar which is a layout event listener
on a graph layout instance to automatically display the progress of
the layout process. The method setGraphLayout(ilog.views.graphlayout.IlvGraphLayout) should be used
to connect the progress bar to the layout instance and to register it
as layout event listener.
If the layout algorithm supports the percentage complete feature, the progress bar is increasing and shows the real percentage of completion of the layout as text. If the layout algorithm does not support this feature, the progress bar shows only by a blinking effect that the layout algorithm is still running.
By default, a "wait cursor" is set on the top components containing
all the views of the grapher attached to the layout instance. (See
setWaitOnComponent(java.awt.Component) and setWaitCursorDuringLayout(boolean).)
JProgressBar.AccessibleJProgressBarJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategychangeEvent, changeListener, model, orientation, paintBorder, paintString, progressStringlistenerList, 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_ALIGNMENTBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WESTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
IlvJGraphLayoutProgressBar()
Creates a horizontal progress bar with the default orientation,
minimum and maximum.
|
IlvJGraphLayoutProgressBar(BoundedRangeModel newModel)
Creates a horizontal progress bar using the specified model.
|
IlvJGraphLayoutProgressBar(int orient)
Creates a progress bar with the specified orientation, which can be
either
JProgressBar.VERTICAL or
JProgressBar.HORIZONTAL and with the default minimum and
maximum. |
IlvJGraphLayoutProgressBar(int min,
int max)
Creates a horizontal progress bar with the default orientation and the
specified minimum and maximum.
|
IlvJGraphLayoutProgressBar(int orient,
int min,
int max)
Creates a progress bar using the specified orientation, minimum, and
maximum.
|
| Modifier and Type | Method and Description |
|---|---|
IlvGraphLayout |
getGraphLayout()
Returns the layout algorithm for which this progress bar must be used.
|
long |
getMinUpdateDelay()
Returns the minimum delay, in milliseconds, between two updates of the
progress bar.
|
Component |
getWaitOnComponent()
Returns the component on which the wait cursor can be displayed during
the layout process.
|
boolean |
isPaintImmediately()
Returns
true if the progress bar should be painted
immediately in each layout step. |
boolean |
isWaitCursorDuringLayout()
Returns
true if the display during the layout process of
a wait cursor on the component specified using the method
setWaitOnComponent is enabled. |
void |
layoutStepPerformed(GraphLayoutEvent event)
Action performed after each step or iteration of the layout algorithm.
|
void |
setGraphLayout(IlvGraphLayout layout)
Specifies the layout algorithm for which this progress bar must be
used.
|
void |
setMinUpdateDelay(long delay)
Specifies the minimum delay, in milliseconds, between two updates of
the progress bar.
|
void |
setPaintImmediately(boolean immediately)
Sets whether the progress bar should be painted immediately in each
layout step.
|
void |
setWaitCursorDuringLayout(boolean enable)
Enables or disables the display during the layout process of a wait
cursor on the component specified using the method
setWaitOnComponent. |
void |
setWaitOnComponent(Component component)
Specifies the component on which the wait cursor can be displayed
during the layout process.
|
addChangeListener, createChangeListener, fireStateChanged, getAccessibleContext, getChangeListeners, getMaximum, getMinimum, getModel, getOrientation, getPercentComplete, getString, getUI, getUIClassID, getValue, isBorderPainted, isIndeterminate, isStringPainted, paintBorder, paramString, removeChangeListener, setBorderPainted, setIndeterminate, setMaximum, setMinimum, setModel, setOrientation, setString, setStringPainted, setUI, setValue, 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, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, 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 IlvJGraphLayoutProgressBar()
public IlvJGraphLayoutProgressBar(int orient)
JProgressBar.VERTICAL or
JProgressBar.HORIZONTAL and with the default minimum and
maximum.public IlvJGraphLayoutProgressBar(int min,
int max)
public IlvJGraphLayoutProgressBar(int orient,
int min,
int max)
public IlvJGraphLayoutProgressBar(BoundedRangeModel newModel)
public void setWaitCursorDuringLayout(boolean enable)
setWaitOnComponent.
The default value is true.
isWaitCursorDuringLayout()public void setGraphLayout(IlvGraphLayout layout)
If the argument layout is null, the
progress bar instance is registered on the layout as a listener for
layout events. Otherwise, it is removed from the listeners for layout
events.
public IlvGraphLayout getGraphLayout()
public boolean isWaitCursorDuringLayout()
true if the display during the layout process of
a wait cursor on the component specified using the method
setWaitOnComponent is enabled. Returns
false otherwise. The default value is true.setWaitCursorDuringLayout(boolean)public void setWaitOnComponent(Component component)
Note that the wait cursor is never set if the method isWaitCursorDuringLayout() returns false.
public Component getWaitOnComponent()
public final void setMinUpdateDelay(long delay)
getMinUpdateDelay()public final long getMinUpdateDelay()
setMinUpdateDelay(long)public final void setPaintImmediately(boolean immediately)
true.
In a single-threaded application, this flag must be set to
true because otherwise the progress bar may not be
visible. In a multithreaded application, this flag can be set to
false because the drawing thread will take care of the
painting of the progress bar automatically.
The method paintImmediately is not called if the layout
runs in a thread that is not the AWT event dispatching thread.
isPaintImmediately()public final boolean isPaintImmediately()
true if the progress bar should be painted
immediately in each layout step.setPaintImmediately(boolean)public void layoutStepPerformed(GraphLayoutEvent event)
layoutStepPerformed in interface GraphLayoutEventListenerevent - The layout event that may contain information about the
behavior of the layout algorithmGraphLayoutEvent.getLayoutReport()© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.