org.sbml.jsbml.ext.layout
public class LayoutModelPlugin extends AbstractSBasePlugin
Layout
package extends the Model
class with the
addition of one child element: the listOfLayouts. A Model
may
contain at most one such list, but the list itself can hold many
different Layout
s.Modifier and Type | Field and Description |
---|---|
protected ListOf<Layout> |
listOfLayouts |
private static long |
serialVersionUID |
extendedSBase, packageVersion
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
LayoutModelPlugin(LayoutModelPlugin elm)
Creates a new instance
LayoutModelPlugin cloned from the given LayoutModelPlugin . |
LayoutModelPlugin(Model model)
Creates a new instance
LayoutModelPlugin associate it with the given Model . |
Modifier and Type | Method and Description |
---|---|
void |
add(Layout layout)
Adds the given
Layout to the listOfLayouts. |
void |
addLayout(Layout layout)
Adds the given
Layout to the listOfLayouts. |
LayoutModelPlugin |
clone()
Creates a new instance of
SBasePlugin from this SBasePlugin . |
Layout |
createLayout()
Creates a new
Layout and adds it to the current list of layouts. |
Layout |
createLayout(java.lang.String id)
Creates a new
Layout and adds it to the current list of layouts. |
private ListOf<Layout> |
createListOfLayout()
Creates a new
ListOf , adds it to this object as listOfLayouts
and returns a pointer to it. |
boolean |
equals(java.lang.Object obj) |
boolean |
getAllowsChildren() |
SBase |
getChildAt(int index) |
int |
getChildCount() |
java.lang.String |
getElementNamespace()
Returns the XML namespace (URI) of the package extension of this plugin object.
|
Layout |
getLayout(int i) |
int |
getLayoutCount()
Returns the number of
Layout s of this LayoutModelPlugin . |
ListOf<Layout> |
getListOfLayouts() |
Model |
getModel() |
int |
getNumLayouts()
Returns the number of
Layout s of this LayoutModelPlugin . |
java.lang.String |
getPackageName()
Returns the package name of this plugin object.
|
SBMLDocument |
getParent() |
SBMLDocument |
getParentSBMLObject()
Returns the parent
SBase object to which this plugin object connected. |
java.lang.String |
getPrefix()
Returns the prefix of the package extension of this plugin object.
|
java.lang.String |
getURI()
Gets the URI to which this element belongs to.
|
int |
hashCode() |
boolean |
isSetListOfLayouts() |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Reads and sets the attribute if it is know from this
SBasePlugin . |
void |
setListOfLayouts(ListOf<Layout> listOfLayouts)
The listOfLayouts element must contain at least one
Layout . |
java.lang.String |
toString() |
boolean |
unsetListOfLayouts()
Removes the
listOfLayouts from this Model and notifies
all registered instances of TreeNodeChangeListener . |
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a
Map containing the XML attributes of this object. |
fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getExtendedSBase, getLevel, getPackageVersion, getSBMLDocument, getVersion, isSetExtendedSBase, removeFromParent, setExtendedSBase
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
finalize, getClass, notify, notifyAll, wait, wait, wait
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
private static final long serialVersionUID
public LayoutModelPlugin(LayoutModelPlugin elm)
LayoutModelPlugin
cloned from the given LayoutModelPlugin
.elm
- the LayoutModelPlugin
we want to clone.public LayoutModelPlugin(Model model)
LayoutModelPlugin
associate it with the given Model
.model
- the Model
where this LayoutModelPlugin
belong.public void add(Layout layout)
Layout
to the listOfLayouts.
The listOfLayouts is initialized if necessary.
layout
- the Layout
instance to add.addLayout(Layout)
public void addLayout(Layout layout)
Layout
to the listOfLayouts.
The listOfLayouts is initialized if necessary.
layout
- the Layout
instance to add.public Layout createLayout()
Layout
and adds it to the current list of layouts.Layout
.public Layout createLayout(java.lang.String id)
Layout
and adds it to the current list of layouts.private ListOf<Layout> createListOfLayout()
ListOf
, adds it to this object as listOfLayouts
and returns a pointer to it.ListOf
object.public int hashCode()
hashCode
in interface SBasePlugin
hashCode
in class AbstractSBasePlugin
public boolean equals(java.lang.Object obj)
equals
in interface SBasePlugin
equals
in class AbstractSBasePlugin
public boolean getAllowsChildren()
public SBase getChildAt(int index)
public int getChildCount()
public Layout getLayout(int i)
i
- public int getLayoutCount()
Layout
s of this LayoutModelPlugin
.Layout
s of this LayoutModelPlugin
.public Model getModel()
public int getNumLayouts()
Layout
s of this LayoutModelPlugin
.Layout
s of this LayoutModelPlugin
.public SBMLDocument getParent()
getParent
in interface javax.swing.tree.TreeNode
getParent
in class AbstractTreeNode
public SBMLDocument getParentSBMLObject()
SBasePlugin
SBase
object to which this plugin object connected.getParentSBMLObject
in interface SBasePlugin
getParentSBMLObject
in class AbstractSBasePlugin
SBase
object to which this plugin object connected.public boolean isSetListOfLayouts()
public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBasePlugin
SBasePlugin
.attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public void setListOfLayouts(ListOf<Layout> listOfLayouts)
Layout
.listOfLayouts
- public java.lang.String toString()
toString
in class AbstractTreeNode
public boolean unsetListOfLayouts()
listOfLayouts
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBasePlugin
Map
containing the XML attributes of this object.writeXMLAttributes
in interface SBasePlugin
writeXMLAttributes
in class AbstractSBasePlugin
Map
containing the XML attributes of this object.public LayoutModelPlugin clone()
SBasePlugin
SBasePlugin
from this SBasePlugin
.clone
in interface SBasePlugin
clone
in class AbstractSBasePlugin
SBasePlugin
from this SBasePlugin
.public java.lang.String getElementNamespace()
SBasePlugin
public java.lang.String getPackageName()
SBasePlugin
public java.lang.String getPrefix()
SBasePlugin
public java.lang.String getURI()
SBasePlugin