|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Workspace
Interface for the main manager (workspace) of DESModels in IDES.
| Method Summary | ||
|---|---|---|
void |
addModel(DESModel model)
Adds the given DESModel to the set of models in the workspace. |
|
void |
addSubscriber(WorkspaceSubscriber subscriber)
Attaches the given subscriber to this publisher. |
|
void |
fireAboutToRearrangeWorkspace()
Sends notification to subscribers that the the layout of the workspace is about to change (e.g., a new model is about to become the active model). |
|
void |
fireRepaintRequired()
Sends a notification to subscribers that a repaint is required due to changes to the display options such as Zoom, or toggling show grid, LaTeX rendering, UniformNode size etc. |
|
DESModel |
getActiveModel()
Returns the model currently active in the workspace. |
|
java.lang.String |
getActiveModelName()
Returns the name of the model currently active in the workspace. |
|
UIDescriptor |
getActiveUID()
Returns the UIDescriptor with the UI elements for the currently
active model. |
|
DESModel |
getModel(java.lang.String name)
Finds a model open in the workspace by name. |
|
java.util.Iterator<DESModel> |
getModels()
Returns an iterator of all DESModels in this workspace. |
|
|
getModelsOfType(java.lang.Class<T> type)
Returns all models of the given type opened in the workspace. |
|
java.lang.String |
getName()
Returns the name of the workspace. |
|
java.util.Collection<Presentation> |
getPresentations()
Returns the set of presentations used as the UI for the currently active model. |
|
|
getPresentationsOfType(java.lang.Class<T> type)
Selects the presentation of the given type from the set of all presentations used as the UI for the currently active model. |
|
boolean |
hasModel(java.lang.String name)
Check if the workspace contains a model with the given name. |
|
boolean |
isDirty()
Returns if the workspace is dirty (it has been changed since the last save). |
|
boolean |
isEmpty()
Check if there are models open in the workspace. |
|
void |
removeModel(java.lang.String name)
Removes a model from the workspace. |
|
void |
removeSubscriber(WorkspaceSubscriber subscriber)
Removes the given subscriber to this publisher. |
|
void |
setActiveModel(java.lang.String name)
Sets the active model to the DESModel with the given name. |
|
void |
setActivePresentation(java.lang.String name)
Makes the specified presentation active in the user interface. |
|
void |
setDirty(boolean state)
Sets the dirty flag of the workspace (i.e., whether it has been changed since the last save). |
|
int |
size()
Get the number of models in the workspace |
|
| Method Detail |
|---|
void addModel(DESModel model)
model - the model to be addedDESModel getModel(java.lang.String name)
name - the name of the model
null otherwiseboolean hasModel(java.lang.String name)
name - the name of the model
true if the workspace contains a model with the
given name; false otherwisevoid removeModel(java.lang.String name)
name - the name of the model to removejava.lang.String getActiveModelName()
DESModel getActiveModel()
null
if there is no model in the workspaceUIDescriptor getActiveUID()
UIDescriptor with the UI elements for the currently
active model.
UIDescriptor with the UI elements for the currently
active model; or null if there is no model in the
workspacevoid setActiveModel(java.lang.String name)
DESModel with the given name. If the
workspace does not contain a model with the given name, the method does
nothing. If the name is null, no model becomes active.
name - the name of the model to become active; or null
if no model should become activevoid setActivePresentation(java.lang.String name)
name - the name of the presentation to be made activejava.util.Iterator<DESModel> getModels()
DESModels in this workspace.
DESModels in this workspaceboolean isDirty()
void setDirty(boolean state)
state - the new dirty flag of the workspacejava.lang.String getName()
boolean isEmpty()
true if there is at least one model in the
workspace; false otherwiseint size()
<T> java.util.Collection<T> getModelsOfType(java.lang.Class<T> type)
T - the type of modeltype - the class type of model
java.util.Collection<Presentation> getPresentations()
<T> java.util.Collection<T> getPresentationsOfType(java.lang.Class<T> type)
T - the type of presentation to be selectedtype - the class type of presentation to be selected
void addSubscriber(WorkspaceSubscriber subscriber)
subscriber - subscriber to be attachedvoid removeSubscriber(WorkspaceSubscriber subscriber)
subscriber - subscriber to be removedvoid fireRepaintRequired()
void fireAboutToRearrangeWorkspace()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||