| java.lang.Object java.util.EventObject org.eclipse.ui.SaveablesLifecycleEvent
SaveablesLifecycleEvent | public class SaveablesLifecycleEvent extends EventObject (Code) | | Event object describing a change to a set of Saveable objects.
since: 3.2 |
Field Summary | |
final public static int | DIRTY_CHANGED Event type constant specifying that the dirty state of the given saveables
has changed. | final public static int | POST_CLOSE Event type constant specifying that the given saveables have been closed. | final public static int | POST_OPEN Event type constant specifying that the given saveables have been opened. | final public static int | PRE_CLOSE Event type constant specifying that the given saveables are about to be
closed. |
Constructor Summary | |
public | SaveablesLifecycleEvent(Object source, int eventType, Saveable[] saveables, boolean force) Creates a new SaveablesLifecycleEvent.
Parameters: source - The source of the event. |
Method Summary | |
public int | getEventType() Returns the eventType, currently one of POST_OPEN, PRE_CLOSE, POST_CLOSE,
DIRTY_CHANGED. | public Saveable[] | getSaveables() Returns the affected saveables. | public boolean | isForce() Sets the force flag. | public boolean | isVeto() Returns the veto. | public void | setVeto(boolean veto) |
DIRTY_CHANGED | final public static int DIRTY_CHANGED(Code) | | Event type constant specifying that the dirty state of the given saveables
has changed.
|
POST_CLOSE | final public static int POST_CLOSE(Code) | | Event type constant specifying that the given saveables have been closed.
|
POST_OPEN | final public static int POST_OPEN(Code) | | Event type constant specifying that the given saveables have been opened.
|
PRE_CLOSE | final public static int PRE_CLOSE(Code) | | Event type constant specifying that the given saveables are about to be
closed. Listeners may veto the closing if isForce() is false.
|
SaveablesLifecycleEvent | public SaveablesLifecycleEvent(Object source, int eventType, Saveable[] saveables, boolean force)(Code) | | Creates a new SaveablesLifecycleEvent.
Parameters: source - The source of the event. If an ISaveablesSource notifiesabout changes to the saveables returned byISaveablesSource.getSaveables, the source must bethe ISaveablesSource object. Parameters: eventType - the event type, currently one of POST_OPEN, PRE_CLOSE,POST_CLOSE, DIRTY_CHANGED Parameters: saveables - The affected saveables Parameters: force - true if the event type is PRE_CLOSE and this is a closed forcethat cannot be canceled. |
getEventType | public int getEventType()(Code) | | Returns the eventType, currently one of POST_OPEN, PRE_CLOSE, POST_CLOSE,
DIRTY_CHANGED. Listeners should silently ignore unknown event types since
new event types might be added in the future.
the eventType |
getSaveables | public Saveable[] getSaveables()(Code) | | Returns the affected saveables.
the saveables |
isForce | public boolean isForce()(Code) | | Sets the force flag. This value is ignored for POST_OPEN, POST_CLOSE, and
DIRTY_CHANGED.
Returns the force. |
isVeto | public boolean isVeto()(Code) | | Returns the veto. This value is ignored for POST_OPEN,POST_CLOSE, and
DIRTY_CHANGED.
Returns the veto. |
setVeto | public void setVeto(boolean veto)(Code) | | Parameters: veto - The veto to set. |
|
|