|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes the methods that characterize a graphical state of a model. These characteristics include the positions,expandednesses, visibilities, and selections of the various objects in the model.
IMPORTANT: A view provides access for users to inspect as well as modify a model. At present the only implementing view is GraphicView. But future views could include ListView, TreeView etc.
Inner Class Summary | |
static class |
View.GraphicLocation
A particular kind of location that has a point in 2D space associated with it. |
static interface |
View.Location
This is to handle the general concept of WHERE in a view a particular object may live. |
Method Summary | |
void |
closeView(PluginMethod method)
Closes this view. |
ViewElement |
createElement(java.lang.Object type,
View.Location l)
Adds an element to the view AND the model. |
ViewLink |
createLink(java.lang.Object type,
ModelObject from,
ModelObject to)
Creates a link in the view AND the model. |
void |
deleteElement(ViewElement ve)
Deletes the element from the view AND the model, after first deleting all of it's links and children. |
void |
deleteLink(ViewLink vl)
Deletes the link from the view AND the model. |
void |
deleteObject(ViewObject vo)
Deletes the given object from the view and the model. |
void |
deleteSelectedElements()
Deletes the selected elements, as per deleteElement. |
void |
deleteSelectedLinks()
Deletes the selected links from the view AND the model. |
void |
deselectObject(ViewObject o)
Deselects the given object. |
void |
dirtyElement(ModelElement e)
Update (or create) the element with this model-element. |
void |
dirtyLink(ModelLink l)
Update (or create) the link with this model-element A dirty element is an element that has changed since the last serialization (ie it has been newly created, modified or deleted) and thus need to be redrawn. |
java.util.Collection |
getAllElements()
Returns the ViewElements within this view. |
java.util.Collection |
getAllLinks()
Returns the ViewLinks within this view. |
View.Location |
getDefaultLocation(ModelObject newobject)
Returns a Location that is reasonable for a the placement of a new element. |
java.util.Collection |
getExpandedElements()
Returns the expanded elements. |
java.util.Collection |
getHighlightedObjects()
Returns the ViewObjects that are highlighted |
int |
getID()
Returns the unique (within the model) integer Id for the view. |
java.awt.Image |
getImage(java.lang.Object type)
Returns the image that is associated with the given object (for this View). |
ImageTable |
getImageTable()
Returns an ImageTable that can be used to scale, rotate, and scribble on images. |
OMEModel |
getModel()
Returns the model for this view. |
java.lang.String |
getName()
Returns the name of this view. |
java.util.Collection |
getSaveFileAndDirectory()
Displays up a save dialogue and returns a collection whose first member is the file name and whose second member is the directory name (both of which are String s). |
java.lang.String |
getSavePathname()
Returns the absolute path where view (and thus model) should be saved. |
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 |
load(OME.ViewSerializer vs)
Recover said important stuff from the serializer. |
void |
promptContract(ViewElement e)
|
void |
promptExpand(ViewElement e)
|
void |
promptRename(ViewObject o)
Prompt the user to rename the given ViewObject in a View specific way. |
void |
promptResize(ViewObject o)
|
void |
promptStraighten(ViewObject o)
Prompt the user to resize the given ViewObject in a View specific way. |
void |
resize(ViewObject o,
java.lang.Double d)
|
void |
save(OME.ViewSerializer vs)
Save the important stuff to the serializer. |
void |
selectObject(ViewObject o)
Selects the given object. |
void |
setContract(boolean b)
|
void |
setExpand(boolean b)
|
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. |
void |
setStraighten(boolean b)
|
void |
showDialog(javax.swing.JDialog jd)
Displays the given JDialog to the user. |
void |
updateView()
Announce to this view that it has become "dirty", and needs to be updated. |
Method Detail |
public View.Location getDefaultLocation(ModelObject newobject)
newobject
- the object whose default location we want.public void setName(java.lang.String n)
public java.lang.String getName()
public OMEModel getModel()
public int getID()
public void setID(int id)
id
- the identifier to be set for this view.public java.util.Collection getAllElements()
public java.util.Collection getAllLinks()
public java.util.Collection getHighlightedObjects()
public java.util.Collection getSelectedElements()
public java.util.Collection getSelectedLinks()
public java.util.Collection getExpandedElements()
public java.util.Collection getVisibleElements()
public java.util.Collection getVisibleLinks()
public java.awt.Image getImage(java.lang.Object type)
public void promptRename(ViewObject o)
o
- the ViewObject
we wish to rename.public void promptStraighten(ViewObject o)
o
- the ViewObject
we wish to resize.public void setStraighten(boolean b)
public void promptExpand(ViewElement e)
public void promptContract(ViewElement e)
public void setExpand(boolean b)
public void setContract(boolean b)
public void promptResize(ViewObject o)
public void resize(ViewObject o, java.lang.Double d)
public void selectObject(ViewObject o)
o
- the ViewObject
we wish to selectpublic void deselectObject(ViewObject o)
the
- ViewObject
we wish to deselectpublic ViewElement createElement(java.lang.Object type, View.Location l) throws java.lang.Exception
type
- the type of object to be added.location
- the location at which the object should be added.public void deleteElement(ViewElement ve)
ve
- the ViewElement
to be deleted.public void deleteSelectedElements()
public ViewLink createLink(java.lang.Object type, ModelObject from, ModelObject to)
type
- the type of link to be created.from
- the ModelObject
that is the source of the created linkto
- the ModelObject
that is the destination of the created linkpublic void deleteLink(ViewLink vl)
vl
- the ViewLink
to be deleted.public void deleteSelectedLinks()
public void deleteObject(ViewObject vo)
vo
- the ViewObject
to be deleted.public void dirtyElement(ModelElement e)
e
- the ModelElement
that is to be marked as dirty.public void dirtyLink(ModelLink l)
l
- the ModelLink
that is to be marked as dirty.public java.lang.String getSavePathname()
public java.util.Collection getSaveFileAndDirectory()
String
s). Returns a null vector if no
file was supplied by the user.public void save(OME.ViewSerializer vs)
vs
- the ViewSerializer where we wish to save to.
public void load(OME.ViewSerializer vs)
vs
- the ViewSerializer
where we wish to load from.public void updateView()
public void showDialog(javax.swing.JDialog jd)
jd
- the JDialog
to be displayed.public ImageTable getImageTable()
public void closeView(PluginMethod method)
method
- I believe this can any Plugin Method that may aid in
saving the view (This comment should be updated!!!)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |