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.OMEElement

Subinterfaces:
ViewElement

public abstract interface OMEElement
OMEElement encapsulates those things that make something an element within the OME tool. OME supports expandable, hideable elements. they have type, a graphic, a name, links, and possibly children or parents.


Method Summary
void addChild(OMEElement ve)
          Adds a child to an expandable element.
java.util.Collection getChildren()
          Returns a collection of OMEElements.
int getID()
          Returns the unique (within the context) integer id of the element.
java.util.Collection getLinks()
          Returns a collection of OMELinks.
java.lang.String getName()
          Returns the name of the element.
OMEElement getParent()
          Returns the element's parent.
java.lang.Object getType()
          Returns the element's type.
boolean isExpandable()
          Whether element is expandable.
void setExpandable(boolean e)
          Changes whether this element is expandable.
void setID(int id)
          Sets the integer ID of the element.
void setName(java.lang.String name)
          Sets the name of the element.
void setParent(OMEElement ve)
          Changes or sets the parent of the element.
void setType(java.lang.Object type)
          Sets the elements's type.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the element.

setName

public void setName(java.lang.String name)
Sets the name of the element.

getType

public java.lang.Object getType()
Returns the element's type. The type can be used to find additional properties about the element within various contexts, eg, it's graphic,

setType

public void setType(java.lang.Object type)
Sets the elements's type.

getID

public int getID()
Returns the unique (within the context) integer id of the element. Since the name of an element is not guaranteed to be unique, we use this for serialization.

setID

public void setID(int id)
Sets the integer ID of the element.

getParent

public OMEElement getParent()
Returns the element's parent. If it does not have a parent, null is returned

setParent

public void setParent(OMEElement ve)
              throws java.lang.Exception
Changes or sets the parent of the element. If this is attempted on an expandable element an error will be thrown. Both this method, and the parent's addchild must be called to add a child to a parent.

addChild

public void addChild(OMEElement ve)
             throws java.lang.Exception
Adds a child to an expandable element. If attempted on a non-expandable element, an error will be thrown. Both this method and the child's setparent method must be called to add a child to a parent.

isExpandable

public boolean isExpandable()
Whether element is expandable.

setExpandable

public void setExpandable(boolean e)
                  throws java.lang.Exception
Changes whether this element is expandable. If this is attempted on an element with children, or a parent, then an error will be thrown if the new state does not allow children or a parent respectively.

getLinks

public java.util.Collection getLinks()
Returns a collection of OMELinks. Any and all of the elements links are returned. This collection is writable.

getChildren

public java.util.Collection getChildren()
Returns a collection of OMEElements. Any and all of the elements children are returned. This collection is writable.

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