|
JHotDraw 7rev733 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.DefaultBoundedRangeModel
org.jhotdraw.gui.DefaultActivityModel
public class DefaultActivityModel
Default implementation of ActivityModel.
| Field Summary | |
|---|---|
protected java.beans.PropertyChangeSupport |
propertySupport
|
| Fields inherited from class javax.swing.DefaultBoundedRangeModel |
|---|
changeEvent, listenerList |
| Fields inherited from interface org.jhotdraw.gui.ActivityModel |
|---|
CANCELABLE_PROPERTY, CANCELED_PROPERTY, CLOSED_PROPERTY, ERROR_PROPERTY, INDETERMINATE_PROPERTY, NOTE_PROPERTY, WARNING_PROPERTY |
| Constructor Summary | |
|---|---|
DefaultActivityModel(java.lang.Object owner,
java.lang.String title)
Creates a new indeterminate DefaultActivityModel. |
|
DefaultActivityModel(java.lang.Object owner,
java.lang.String title,
java.lang.String note,
boolean isIndeterminate)
Creates a new DefaultActivityModel. |
|
DefaultActivityModel(java.lang.Object owner,
java.lang.String title,
java.lang.String note,
int min,
int max)
Creates a new DefaultActivityModel. |
|
DefaultActivityModel(java.lang.Object owner,
java.lang.String title,
java.lang.String note,
int min,
int max,
boolean isIndeterminate)
Creates a new DefaultActivityModel. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener which can optionally be wrapped
into a WeakPropertyChangeListener. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener which can optionally be wrapped
into a WeakPropertyChangeListener. |
void |
cancel()
Cancels the operation. |
void |
close()
Indicate that the operation is closed. |
protected void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.lang.String |
getError()
Specifies the error message that is displayed along with the progress message. |
java.lang.String |
getNote()
Specifies the additional note that is displayed along with the progress message. |
java.lang.Object |
getOwner()
Gets the owner of the progress model. |
java.lang.String |
getTitle()
Returns the title of the progress model. |
java.lang.String |
getWarning()
Specifies the warning message that is displayed along with the progress message. |
boolean |
isCancelable()
Returns true if the operation can be canceled. |
boolean |
isCanceled()
Returns true if the user has hit the Cancel button in the progress dialog. |
boolean |
isClosed()
Returns true if the operation is completed. |
boolean |
isIndeterminate()
Returns true if the progress observer is set to indeterminate. |
void |
printf(java.lang.String format,
java.lang.Object... args)
Sets a formatted note. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener. |
void |
setCancelable(boolean newValue)
Set cancelable to false if the operation can not be canceled. |
void |
setDoCancel(java.lang.Runnable doCancel)
The specified Runnable is executed when the user presses the cancel button. |
void |
setError(java.lang.String newValue)
Specifies the additional error message that is displayed along with the progress message. |
void |
setIndeterminate(boolean newValue)
Sets the progress observer to indeterminate. |
void |
setNote(java.lang.String newValue)
Specifies the additional note that is displayed along with the progress message. |
void |
setWarning(java.lang.String newValue)
Specifies the additional warning message that is displayed along with the progress message. |
| Methods inherited from class javax.swing.DefaultBoundedRangeModel |
|---|
addChangeListener, fireStateChanged, getChangeListeners, getExtent, getListeners, getMaximum, getMinimum, getValue, getValueIsAdjusting, removeChangeListener, setExtent, setMaximum, setMinimum, setRangeProperties, setValue, setValueIsAdjusting, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.BoundedRangeModel |
|---|
addChangeListener, getExtent, getMaximum, getMinimum, getValue, getValueIsAdjusting, removeChangeListener, setExtent, setMaximum, setMinimum, setRangeProperties, setValue, setValueIsAdjusting |
| Field Detail |
|---|
protected java.beans.PropertyChangeSupport propertySupport
| Constructor Detail |
|---|
public DefaultActivityModel(java.lang.Object owner,
java.lang.String title,
java.lang.String note,
boolean isIndeterminate)
public DefaultActivityModel(java.lang.Object owner,
java.lang.String title,
java.lang.String note,
int min,
int max)
public DefaultActivityModel(java.lang.Object owner,
java.lang.String title,
java.lang.String note,
int min,
int max,
boolean isIndeterminate)
public DefaultActivityModel(java.lang.Object owner,
java.lang.String title)
| Method Detail |
|---|
public void setCancelable(boolean newValue)
setCancelable in interface ActivityModelpublic void setDoCancel(java.lang.Runnable doCancel)
setDoCancel in interface ActivityModelpublic void close()
close in interface ActivityModelpublic boolean isCanceled()
isCanceled in interface ActivityModelpublic boolean isClosed()
isClosed in interface ActivityModelpublic void cancel()
cancel in interface ActivityModelpublic void setNote(java.lang.String newValue)
setNote in interface ActivityModelnewValue - a String specifying the note to displaygetNote()public java.lang.String getNote()
getNote in interface ActivityModelsetNote(java.lang.String)public void setWarning(java.lang.String newValue)
ActivityModel
setWarning in interface ActivityModelnewValue - a String specifying the message to display, or null
if there is no warning.ActivityModel.getWarning()public java.lang.String getWarning()
ActivityModel
getWarning in interface ActivityModelpublic void setError(java.lang.String newValue)
ActivityModel
setError in interface ActivityModelnewValue - a String specifying the message to display, or null
if there is no error.ActivityModel.getWarning()public java.lang.String getError()
ActivityModel
getError in interface ActivityModelpublic void setIndeterminate(boolean newValue)
ActivityModel
setIndeterminate in interface ActivityModelpublic boolean isIndeterminate()
ActivityModel
isIndeterminate in interface ActivityModel
public void printf(java.lang.String format,
java.lang.Object... args)
ActivityModel
printf in interface ActivityModelpublic java.lang.Object getOwner()
ActivityModelView
or a Application.
getOwner in interface ActivityModelpublic java.lang.String getTitle()
ActivityModel
getTitle in interface ActivityModelpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener which can optionally be wrapped
into a WeakPropertyChangeListener.
addPropertyChangeListener in interface ActivityModellistener -
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
PropertyChangeListener which can optionally be wrapped
into a WeakPropertyChangeListener.
listener - public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener. If the listener was added
wrapped into a WeakPropertyChangeListener, the
WeakPropertyChangeListener is removed.
removePropertyChangeListener in interface ActivityModellistener -
protected void firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
protected void firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
protected void firePropertyChange(java.lang.String propertyName,
@Nullable
java.lang.Object oldValue,
@Nullable
java.lang.Object newValue)
public boolean isCancelable()
ActivityModel
isCancelable in interface ActivityModel
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||