public class JGraphLayoutProgress
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.beans.PropertyChangeSupport |
changeSupport
Property change support is delegated to this class.
|
protected boolean |
isStopped
Specifies whether the layout was stopped in the user interface.
|
static java.lang.String |
ISSTOPPED_PROPERTY
Bound property name for
isStopped . |
protected int |
maximum
Specifies the maximum progress, for example 100%.
|
static java.lang.String |
MAXIMUM_PROPERTY
Bound property name for
maximum . |
protected int |
progress
Specifies the current progress.
|
static java.lang.String |
PROGRESS_PROPERTY
Bound property name for
progress . |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change listener.
|
java.beans.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(java.beans.PropertyChangeListener listener)
Removes a property change listener.
|
void |
reset(int maximum)
Resets the progress to 0 and sets isStopped to
false . |
void |
setChangeSupport(java.beans.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.
|
public static final java.lang.String MAXIMUM_PROPERTY
maximum
.public static final java.lang.String PROGRESS_PROPERTY
progress
.public static final java.lang.String ISSTOPPED_PROPERTY
isStopped
.protected java.beans.PropertyChangeSupport changeSupport
protected int maximum
protected int progress
protected boolean isStopped
public JGraphLayoutProgress()
public JGraphLayoutProgress(int maximum)
maximum
- public void reset(int maximum)
false
.public java.beans.PropertyChangeSupport getChangeSupport()
public void setChangeSupport(java.beans.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(java.beans.PropertyChangeListener listener)
listener
- public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.