|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgraph.layout.JGraphLayoutProgress
public class JGraphLayoutProgress
Describes the state of a long-running layout. The UI can listen to property changes to inform the user of the layout progress, and it can set the isStopped property to signal the layout to terminate.
Field Summary | |
---|---|
protected PropertyChangeSupport |
changeSupport
Property change support is delegated to this class. |
protected boolean |
isStopped
Specifies whether the layout was stopped in the user interface. |
static String |
ISSTOPPED_PROPERTY
Bound property name for isStopped . |
protected int |
maximum
Specifies the maximum progress, for example 100%. |
static String |
MAXIMUM_PROPERTY
Bound property name for maximum . |
protected int |
progress
Specifies the current progress. |
static String |
PROGRESS_PROPERTY
Bound property name for progress . |
Constructor Summary | |
---|---|
JGraphLayoutProgress()
Constructs a new layout progress with a maximum progress of 0. |
|
JGraphLayoutProgress(int maximum)
Constructs a new layout progress for the specified maximum progress. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener. |
PropertyChangeSupport |
getChangeSupport()
|
int |
getMaximum()
|
int |
getProgress()
|
boolean |
isStopped()
Stoppable layouts should check this within their inner-most loops and return immediately if this returns true. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener. |
void |
reset(int maximum)
Resets the progress to 0 and sets isStopped to false . |
void |
setChangeSupport(PropertyChangeSupport changeSupport)
|
void |
setMaximum(int maximum)
Sets the maximum progress of the layout. |
void |
setProgress(int progress)
Sets the current progress of the layout. |
void |
setStopped(boolean isStopped)
Signals the layout to stop running. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MAXIMUM_PROPERTY
maximum
.
public static final String PROGRESS_PROPERTY
progress
.
public static final String ISSTOPPED_PROPERTY
isStopped
.
protected PropertyChangeSupport changeSupport
protected int maximum
protected int progress
protected boolean isStopped
Constructor Detail |
---|
public JGraphLayoutProgress()
public JGraphLayoutProgress(int maximum)
maximum
- Method Detail |
---|
public void reset(int maximum)
false
.
public PropertyChangeSupport getChangeSupport()
public void setChangeSupport(PropertyChangeSupport changeSupport)
changeSupport
- The changeSupport to set.public boolean isStopped()
public void setStopped(boolean isStopped)
Fires a property change for the ISSTOPPED_PROPERTY.
isStopped
- Whether the layout should stop.public int getMaximum()
public void setMaximum(int maximum)
Fires a property change for the MAXIMUM_PROPERTY.
maximum
- The maximum to set.public int getProgress()
public void setProgress(int progress)
Fires a property change for the PROGRESS_PROPERTY.
progress
- The progress to set.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- public void removePropertyChangeListener(PropertyChangeListener listener)
listener
-
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |