|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JProgressBar
ilog.views.graphlayout.swing.IlvJGraphLayoutProgressBar
public class IlvJGraphLayoutProgressBar
A progress bar for the layout.
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).)
IlvGraphLayout.supportsPercentageComplete(),
IlvGraphLayout.addGraphLayoutEventListener(ilog.views.graphlayout.GraphLayoutEventListener),
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JProgressBar |
|---|
JProgressBar.AccessibleJProgressBar |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JProgressBar |
|---|
changeEvent, changeListener, model, orientation, paintBorder, paintString, progressString |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, 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 javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class javax.swing.JProgressBar |
|---|
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, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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)
| Method Detail |
|---|
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.
IlvGraphLayout.addGraphLayoutEventListener(ilog.views.graphlayout.GraphLayoutEventListener),
IlvGraphLayout.removeGraphLayoutEventListener(ilog.views.graphlayout.GraphLayoutEventListener),
getGraphLayout()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.
getWaitOnComponent(),
setWaitCursorDuringLayout(boolean)public Component getWaitOnComponent()
setWaitOnComponent(java.awt.Component),
setWaitCursorDuringLayout(boolean)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 must be set to true
because otherwise the progress bar may not be visible. In a multi-threaded
application, this can be set to false because the drawing
thread will take care of the painting of the progress bar automatically.
Notice that the method paintImmediatelly is not called if
the layout runs in a thread which 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||