Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Interface OME.View


public abstract interface View
extends Views
View encapsulates a graphical state for a model. The positions, expandednesses, visibilities, and selections are accessable through this interface.


Method Summary
ViewElement createElement()
          Adds an element with state cloned from the element named in setDefaultElement.
ViewLink createLink()
          Creates a link cloned from the default link.
void deleteElements()
          Deletes the selected elements, as per deleteElement.
void deleteElement(ViewElement ve)
          Deletes the element, after first deleting all of it's links and children.
void deleteLinks()
          Deletes the selected links.
void deleteLink(ViewLink vl)
          Deletes the link.
java.util.Collection getAllElements()
          Returns the ViewElements within this view.
java.util.Collection getAllLinks()
          Returns the ViewLinks within this view.
Canvas getCanvas()
          Get the GUI side of this Biew.
java.util.Collection getExpandableElements()
          Returns the expandable elements.
java.util.Collection getExpandedElements()
          Returns the expanded elements.
int getID()
          Returns the unique (within the model) integer Id for the view.
java.lang.String getName()
          Returns the name of this view.
java.util.Collection getSelectedElements()
          Returns the selected elements.
java.util.Collection getSelectedLinks()
          Returns the selected links.
java.util.Collection getVisibleElements()
          Returns the visible elements.
java.util.Collection getVisibleLinks()
          Returns visible links.
void setCanvas(Canvas c)
          Set the GUI side of this View.
void setDefaultElement(ViewElement e)
          Sets the default element to be used for cloning when creating new elements.
void setDefaultLink(ViewLink l)
          Sets the default link to be used for cloning when creating new links.
void setID(int id)
          Sets the unique identifier (within this model) for this view.
void setName(java.lang.String n)
          Sets the name of this view.
 

Method Detail

setName

public void setName(java.lang.String n)
Sets the name of this view.

getName

public java.lang.String getName()
Returns the name of this view. Views of a model should have unique names.

setCanvas

public void setCanvas(Canvas c)
Set the GUI side of this View.

getCanvas

public Canvas getCanvas()
Get the GUI side of this Biew.

getID

public int getID()
Returns the unique (within the model) integer Id for the view. This helps with serialization, preventing name mangling, and the special-character hazards that entails.

setID

public void setID(int id)
Sets the unique identifier (within this model) for this view.

getAllElements

public java.util.Collection getAllElements()
Returns the ViewElements within this view.

getAllLinks

public java.util.Collection getAllLinks()
Returns the ViewLinks within this view.

getSelectedElements

public java.util.Collection getSelectedElements()
Returns the selected elements.

getSelectedLinks

public java.util.Collection getSelectedLinks()
Returns the selected links.

getExpandedElements

public java.util.Collection getExpandedElements()
Returns the expanded elements.

getExpandableElements

public java.util.Collection getExpandableElements()
Returns the expandable elements.

getVisibleElements

public java.util.Collection getVisibleElements()
Returns the visible elements. This will omit elements that are hidden as well as elements that are not within the visible area of the view, eg: the visible rectangle for graph-views, or the number of lines in a tree-list view.

getVisibleLinks

public java.util.Collection getVisibleLinks()
Returns visible links. This will omit links that are hidden as well as links that are not within the visible area of the view, eg: the visible rectangle for graph-views, or the number of lines in a tree-list view.

createElement

public ViewElement createElement()
Adds an element with state cloned from the element named in setDefaultElement. This should be done in a consistent fashion, eg: the new objects name should be different from the default, and it should probably be hidden to start. If no default element has been set, then a reasonable, consistent element should be created.
See Also:
setDefaultElement(ViewElement)

deleteElement

public void deleteElement(ViewElement ve)
Deletes the element, after first deleting all of it's links and children.

deleteElements

public void deleteElements()
Deletes the selected elements, as per deleteElement.
See Also:
createElement()

createLink

public ViewLink createLink()
Creates a link cloned from the default link.
See Also:
View#setDefaultLink()

deleteLink

public void deleteLink(ViewLink vl)
Deletes the link.

deleteLinks

public void deleteLinks()
Deletes the selected links.

setDefaultElement

public void setDefaultElement(ViewElement e)
Sets the default element to be used for cloning when creating new elements. If this has not been done yet, or the previous default element was deleted, then new elements will be created based on an internal default. Changes made to the default element will be reflected only in new elements created after the change.

setDefaultLink

public void setDefaultLink(ViewLink l)
Sets the default link to be used for cloning when creating new links. If this has not been done yet, or the previous default link was deleted, then new links will be created based on an internal default. Changes made to the default link will only be reflected in new links created after the change.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD