org.sbml.jsbml.ext.layout
public class Layout extends AbstractNamedSBase implements UniqueNamedSBase
Layout
class stores layout information for some or all elements of the
Model
as well as additional objects that need not be connected to the Model
.
The Layout
has two attributes: id and name. Additionally, a Dimensions
element specifies the size of the Layout
. The actual layout elements are contained
in several lists, namely: a ListOfCompartmentGlyph
s, a ListOfSpeciesGlyph
s,
a ListOfReactionGlyph
s, a ListOfTextGlyph
s, and a
ListOfAdditionalGraphicalObject
s. Each of these lists can only occur once, and, if present,
are not allowed to be empty.UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
Layout() |
Layout(int level,
int version) |
Layout(Layout layout) |
Layout(String id,
int level,
int version) |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalGraphicalObject(GraphicalObject object)
Adds an arbitrary additional
GraphicalObject . |
boolean |
addCompartmentGlyph(CompartmentGlyph compartmentGlyph)
Adds a new
CompartmentGlyph to the listOfCompartmentGlyphs . |
void |
addGeneralGlyph(GeneralGlyph object)
Adds a
GeneralGlyph object. |
void |
addGraphicalObject(GraphicalObject object)
Adds an arbitrary additional
GraphicalObject . |
void |
addReactionGlyph(ReactionGlyph reactionGlyph)
Adds a
ReactionGlyph to this layout |
void |
addSpeciesGlyph(SpeciesGlyph speciesGlyph) |
void |
addTextGlyph(TextGlyph TextGlyph) |
Layout |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
boolean |
containsGlyph(Compartment compartment) |
boolean |
containsGlyph(Reaction reaction) |
boolean |
containsGlyph(Species species) |
CompartmentGlyph |
createCompartmentGlyph(String id)
Creates and adds a new
CompartmentGlyph . |
CompartmentGlyph |
createCompartmentGlyph(String id,
String compartment)
Creates and adds a new
CompartmentGlyph . |
Dimensions |
createDimensions(double width,
double height,
double depth)
Creates, sets and returns
Dimensions based on the
given values. |
Dimensions |
createDimensions(String id,
double width,
double height,
double depth)
Creates, sets and returns
Dimensions based on the
given values. |
GeneralGlyph |
createGeneralGlyph(String id)
Creates and adds a new
GeneralGlyph . |
GeneralGlyph |
createGeneralGlyph(String id,
String reference)
Creates and adds a new
GeneralGlyph . |
ReactionGlyph |
createReactionGlyph(String id)
Creates and adds a new
ReactionGlyph . |
ReactionGlyph |
createReactionGlyph(String id,
String reaction)
Creates and adds a new
ReactionGlyph . |
SpeciesGlyph |
createSpeciesGlyph(String id)
Creates and adds a new
SpeciesGlyph with the given identifier. |
SpeciesGlyph |
createSpeciesGlyph(String id,
String species)
Creates and adds a new
SpeciesGlyph . |
TextGlyph |
createTextGlyph(String id)
Creates and adds a new
TextGlyph . |
TextGlyph |
createTextGlyph(String id,
String text)
Creates and adds a new
TextGlyph . |
boolean |
equals(Object object)
|
List<CompartmentGlyph> |
findCompartmentGlyphs(String compartmentID)
Searches all instances of
CompartmentGlyph within this Layout that
refer to the Compartment with the given id. |
List<ReactionGlyph> |
findReactionGlyphs(String reactionID)
Searches all instances of
ReactionGlyph within this Layout that
refer to the Reaction with the given id. |
List<SpeciesGlyph> |
findSpeciesGlyphs(String speciesID)
Searches all instances of
SpeciesGlyph within this Layout that
refer to the Species with the given id. |
List<TextGlyph> |
findTextGlyphs(String id)
Searches within the
listOfTextGlyphs for TextGlyph s whose
TextGlyph.getOriginOfText() points to the given id. |
GraphicalObject |
getAdditionalGraphicalObject(int i) |
int |
getAdditionalGraphicalObjectCount() |
TreeNode |
getChildAt(int index) |
int |
getChildCount() |
CompartmentGlyph |
getCompartmentGlyph(int i)
Gets an element from the listOfCompartmentGlyphs at the given index.
|
CompartmentGlyph |
getCompartmentGlyph(String id)
Gets an element from the listOfCompartmentGlyphs, with the given id.
|
int |
getCompartmentGlyphCount()
Returns the number of
CompartmentGlyph s of this Layout . |
Dimensions |
getDimensions() |
ListOf<GraphicalObject> |
getListOfAdditionalGraphicalObjects() |
ListOf<CompartmentGlyph> |
getListOfCompartmentGlyphs() |
ListOf<ReactionGlyph> |
getListOfReactionGlyphs() |
ListOf<SpeciesGlyph> |
getListOfSpeciesGlyphs() |
ListOf<TextGlyph> |
getListOfTextGlyphs() |
int |
getNumCompartmentGlyphs()
Returns the number of
CompartmentGlyph s of this Layout . |
int |
getNumReactionGlyphs()
Returns the number of
ReactionGlyph s of this Layout . |
int |
getNumSpeciesGlyphs()
Returns the number of
SpeciesGlyph s of this Layout . |
int |
getNumTextGlyphs()
|
ReactionGlyph |
getReactionGlyph(int i) |
ReactionGlyph |
getReactionGlyph(String id) |
int |
getReactionGlyphCount()
Returns the number of
ReactionGlyph s of this Layout . |
SpeciesGlyph |
getSpeciesGlyph(int i) |
SpeciesGlyph |
getSpeciesGlyph(String id) |
int |
getSpeciesGlyphCount()
Returns the number of
SpeciesGlyph s of this Layout . |
TextGlyph |
getTextGlyph(int i) |
TextGlyph |
getTextGlyph(String id) |
int |
getTextGlyphCount()
|
int |
hashCode()
Returns a hash code value for this
SBase instance. |
boolean |
isIdMandatory()
This method can be used to query if the identifier of this
NamedSBase is required to be defined (i.e., not null )
in the definition of SBML. |
boolean |
isSetAddGraphicalObjects() |
boolean |
isSetDimensions() |
boolean |
isSetListOfAdditionalGraphicalObjects() |
boolean |
isSetListOfCompartmentGlyphs() |
boolean |
isSetListOfReactionGlyphs() |
boolean |
isSetListOfSpeciesGlyphs() |
boolean |
isSetListOfTextGlyphs() |
boolean |
readAttribute(String attributeName,
String prefix,
String value)
Sets the given attribute in this
SBase . |
boolean |
removeCompartmentGlyph(CompartmentGlyph compartmentGlyph)
Removes an element from the listOfCompartmentGlyphs.
|
CompartmentGlyph |
removeCompartmentGlyph(int i)
Removes an element from the listOfCompartmentGlyphs at the given index.
|
CompartmentGlyph |
removeCompartmentGlyph(String compartmentGlyphId)
Removes an element from the listOfCompartmentGlyphs.
|
GeneralGlyph |
removeGeneralGlyph(GeneralGlyph toBeRemoved) |
GeneralGlyph |
removeGeneralGlyph(int i)
Removes an element from the
listOfAdditionalGraphicalObjects at
the given index. |
GeneralGlyph |
removeGeneralGlyph(String id) |
ReactionGlyph |
removeReactionGlyph(int i)
Removes an element from the
listOfReactionGlyphs at the given index. |
boolean |
removeReactionGlyph(ReactionGlyph reactionGlyph)
Removes an element from the listOfReactionGlyphs.
|
ReactionGlyph |
removeReactionGlyph(String reactionGlyphId)
Removes an element from the listOfReactionGlyphs.
|
boolean |
removeSingletons()
Removes all singleton
SpeciesGlyph s (no SpeciesReferenceGlyph
in ReactionGlyph ) and also removes their associated TextGlyph s |
SpeciesGlyph |
removeSpeciesGlyph(int i)
Removes an element from the listOfSpeciesGlyphs at the given index.
|
boolean |
removeSpeciesGlyph(SpeciesGlyph speciesGlyph)
Removes an element from the listOfSpeciesGlyphs.
|
SpeciesGlyph |
removeSpeciesGlyph(String speciesGlyphId)
Removes an element from the listOfSpeciesGlyphs.
|
TextGlyph |
removeTextGlyph(int i)
Removes an element from the listOfTextGlyphs at the given index.
|
TextGlyph |
removeTextGlyph(String textGlyphId)
Removes an element from the listOfTextGlyphs.
|
boolean |
removeTextGlyph(TextGlyph textGlyph)
Removes an element from the listOfTextGlyphs.
|
void |
setAddGraphicalObjects(ListOf<GraphicalObject> addGraphicalObjects)
This element is optional.
|
void |
setDimensions(Dimensions dimensions)
The dimensions element of type
Dimensions specifies the dimensions of this
layout. |
void |
setListOfAdditionalGraphicalObjects(ListOf<GraphicalObject> additionalGraphicalObjects)
This element is optional.
|
void |
setListOfCompartmentGlyphs(ListOf<CompartmentGlyph> compartmentGlyphs)
This element is optional.
|
void |
setListOfReactionGlyphs(ListOf<ReactionGlyph> reactionGlyphs)
This element is optional.
|
void |
setListOfSpeciesGlyphs(ListOf<SpeciesGlyph> speciesGlyphs)
This element is optional.
|
void |
setListOfTextGlyphs(ListOf<TextGlyph> textGlyphs)
This element is optional.
|
String |
toString()
Returns the name of the component, if it is available.
|
boolean |
unsetListOfAdditionalGraphicalObjects()
Removes the
listOfAdditionalGraphicalObjects from this Model and notifies
all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfCompartmentGlyphs()
Removes the
listOfCompartmentGlyphs from this Model and notifies
all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfReactionGlyphs()
Removes the
listOfReactionGlyphs from this Model and notifies
all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfSpeciesGlyphs()
Removes the
listOfSpeciesGlyphs from this Model and notifies
all registered instances of TreeNodeChangeListener . |
boolean |
unsetListOfTextGlyphs()
Removes the
listOfTextGlyphs from this Model and notifies
all registered instances of TreeNodeChangeListener . |
Map<String,String> |
writeXMLAttributes()
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
getId, getName, isSetId, isSetName, isValidId, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllowsChildren, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
getId, getName, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public Layout()
public Layout(int level, int version)
level
- version
- public Layout(Layout layout)
layout
- public Layout(String id, int level, int version)
id
- level
- version
- public void addAdditionalGraphicalObject(GraphicalObject object)
GraphicalObject
.object
- addGraphicalObject(GraphicalObject)
public boolean addCompartmentGlyph(CompartmentGlyph compartmentGlyph)
CompartmentGlyph
to the listOfCompartmentGlyphs
.
The listOfCompartmentGlyphs
is initialized if necessary.
compartmentGlyph
- the element to add to the listtrue
(as specified by Collection.add(E)
)public void addGeneralGlyph(GeneralGlyph object)
GeneralGlyph
object.object
- public void addGraphicalObject(GraphicalObject object)
GraphicalObject
.object
- public void addReactionGlyph(ReactionGlyph reactionGlyph)
ReactionGlyph
to this layoutreactionGlyph
- public void addSpeciesGlyph(SpeciesGlyph speciesGlyph)
speciesGlyph
- public void addTextGlyph(TextGlyph TextGlyph)
TextGlyph
- public Layout clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractSBase
public boolean containsGlyph(Compartment compartment)
compartment
- public boolean containsGlyph(Reaction reaction)
reaction
- public boolean containsGlyph(Species species)
species
- public CompartmentGlyph createCompartmentGlyph(String id)
CompartmentGlyph
.id
- the identifier of the CompartmentGlyph
to be created.CompartmentGlyph
.createCompartmentGlyph(String, String)
public CompartmentGlyph createCompartmentGlyph(String id, String compartment)
CompartmentGlyph
.id
- the identifier of the CompartmentGlyph
to be created.compartment
- Compartment
ID.CompartmentGlyph
.public Dimensions createDimensions(double width, double height, double depth)
Dimensions
based on the
given values.width
- height
- depth
- Dimensions
object.createDimensions(String, double, double, double)
public Dimensions createDimensions(String id, double width, double height, double depth)
Dimensions
based on the
given values.id
- the identifier of the Dimensions
to be created.width
- height
- depth
- Dimensions
object.public GeneralGlyph createGeneralGlyph(String id)
GeneralGlyph
.id
- the identifier of the GeneralGlyph
to be created.GeneralGlyph
.createGeneralGlyph(String, String)
public GeneralGlyph createGeneralGlyph(String id, String reference)
GeneralGlyph
.id
- the identifier of the GeneralGlyph
to be created.reference
- the identifier of an element in the model that this GeneralGlyph will represent.GeneralGlyph
.public ReactionGlyph createReactionGlyph(String id)
ReactionGlyph
.id
- the identifier of the ReactionGlyph
to be created.ReactionGlyph
.createReactionGlyph(String, String)
public ReactionGlyph createReactionGlyph(String id, String reaction)
ReactionGlyph
.id
- the identifier of the ReactionGlyph
to be created.reaction
- Reaction
ID.ReactionGlyph
.public SpeciesGlyph createSpeciesGlyph(String id)
SpeciesGlyph
with the given identifier.id
- the identifier for the SpeciesGlyph
to be created.SpeciesGlyph
.createSpeciesGlyph(String, String)
public SpeciesGlyph createSpeciesGlyph(String id, String species)
SpeciesGlyph
.id
- the identifier for the SpeciesGlyph
to be created.species
- Species
ID.SpeciesGlyph
.public TextGlyph createTextGlyph(String id)
TextGlyph
.id
- the identifier for the TextGlyph
to be created.TextGlyph
.createTextGlyph(String, String)
public TextGlyph createTextGlyph(String id, String text)
TextGlyph
.public List<CompartmentGlyph> findCompartmentGlyphs(String compartmentID)
CompartmentGlyph
within this Layout
that
refer to the Compartment
with the given id.compartmentID
- List
containing all identified elements. It can be
empty but not null
.public List<ReactionGlyph> findReactionGlyphs(String reactionID)
ReactionGlyph
within this Layout
that
refer to the Reaction
with the given id.reactionID
- List
containing all identified elements. It can be
empty but not null
.public List<SpeciesGlyph> findSpeciesGlyphs(String speciesID)
SpeciesGlyph
within this Layout
that
refer to the Species
with the given id.speciesID
- List
containing all identified elements. It can be
empty but not null
.public List<TextGlyph> findTextGlyphs(String id)
listOfTextGlyphs
for TextGlyph
s whose
TextGlyph.getOriginOfText()
points to the given id.public GraphicalObject getAdditionalGraphicalObject(int i)
i
- public int getAdditionalGraphicalObjectCount()
public TreeNode getChildAt(int index)
getChildAt
in interface TreeNode
getChildAt
in class AbstractSBase
public int getChildCount()
getChildCount
in interface TreeNode
getChildCount
in class AbstractSBase
public CompartmentGlyph getCompartmentGlyph(int i)
i
- the index of the CompartmentGlyph
element to get.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public CompartmentGlyph getCompartmentGlyph(String id)
id
- the id of the CompartmentGlyph
element to get.public int getCompartmentGlyphCount()
CompartmentGlyph
s of this Layout
.CompartmentGlyph
s of this Layout
.public Dimensions getDimensions()
public ListOf<GraphicalObject> getListOfAdditionalGraphicalObjects()
public ListOf<CompartmentGlyph> getListOfCompartmentGlyphs()
public ListOf<ReactionGlyph> getListOfReactionGlyphs()
public ListOf<SpeciesGlyph> getListOfSpeciesGlyphs()
public int getNumCompartmentGlyphs()
CompartmentGlyph
s of this Layout
.CompartmentGlyph
s of this Layout
.getCompartmentGlyphCount()
public int getNumReactionGlyphs()
ReactionGlyph
s of this Layout
.ReactionGlyph
s of this Layout
.getReactionGlyphCount()
public int getNumSpeciesGlyphs()
SpeciesGlyph
s of this Layout
.SpeciesGlyph
s of this Layout
.getSpeciesGlyphCount()
public int getNumTextGlyphs()
TextGlyph
s of this Layout
.getTextGlyphCount()
public ReactionGlyph getReactionGlyph(int i)
i
- public ReactionGlyph getReactionGlyph(String id)
id
- public int getReactionGlyphCount()
ReactionGlyph
s of this Layout
.ReactionGlyph
s of this Layout
.public SpeciesGlyph getSpeciesGlyph(int i)
i
- public SpeciesGlyph getSpeciesGlyph(String id)
id
- public int getSpeciesGlyphCount()
SpeciesGlyph
s of this Layout
.SpeciesGlyph
s of this Layout
.public TextGlyph getTextGlyph(int i)
i
- public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractNamedSBase
SBase
instance.Object.hashCode()
public boolean isIdMandatory()
NamedSBase
NamedSBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
true
if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public boolean isSetAddGraphicalObjects()
public boolean isSetDimensions()
public boolean isSetListOfAdditionalGraphicalObjects()
public boolean isSetListOfCompartmentGlyphs()
public boolean isSetListOfReactionGlyphs()
public boolean isSetListOfSpeciesGlyphs()
public boolean isSetListOfTextGlyphs()
public boolean readAttribute(String attributeName, String prefix, String value)
SBase
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
readAttribute
in interface SBase
readAttribute
in class AbstractNamedSBase
attributeName
- prefix
- value
- public boolean removeCompartmentGlyph(CompartmentGlyph compartmentGlyph)
compartmentGlyph
- the element to be removed from the list.List.remove(Object)
public CompartmentGlyph removeCompartmentGlyph(int i)
i
- the index where to remove the CompartmentGlyph
.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public CompartmentGlyph removeCompartmentGlyph(String compartmentGlyphId)
compartmentGlyphId
- the id of the element to be removed from the list.null
.public GeneralGlyph removeGeneralGlyph(GeneralGlyph toBeRemoved)
toBeRemoved
- null
otherwise.public GeneralGlyph removeGeneralGlyph(int i)
listOfAdditionalGraphicalObjects
at
the given index.i
- the index where to remove the GeneralGlyph
.IndexOutOfBoundsException
- if the listOf is not set or if the index
is out of bound (index < 0 || index > list.size).ClassCastException
- if the additional graphical object at the given
index is not an instance of GeneralGlyph
. Note that the element is
still removed, but an exception will be thrown. The element will not be
re-inserted.public GeneralGlyph removeGeneralGlyph(String id)
id
- ClassCastException
- if the additional graphical object with the
given id is not an instance of GeneralGlyph
. Note that the element
is still removed, but an exception will be thrown. The element will not be
re-inserted.public ReactionGlyph removeReactionGlyph(int i)
listOfReactionGlyphs
at the given index.i
- the index where to remove the ReactionGlyph
.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public boolean removeReactionGlyph(ReactionGlyph reactionGlyph)
reactionGlyph
- the element to be removed from the list.List.remove(Object)
public ReactionGlyph removeReactionGlyph(String reactionGlyphId)
reactionGlyphId
- the id of the element to be removed from the list.null
.public boolean removeSingletons()
SpeciesGlyph
s (no SpeciesReferenceGlyph
in ReactionGlyph
) and also removes their associated TextGlyph
spublic SpeciesGlyph removeSpeciesGlyph(int i)
i
- the index where to remove the SpeciesGlyph
.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public boolean removeSpeciesGlyph(SpeciesGlyph speciesGlyph)
speciesGlyph
- the element to be removed from the list.List.remove(Object)
public SpeciesGlyph removeSpeciesGlyph(String speciesGlyphId)
speciesGlyphId
- the id of the element to be removed from the list.null
.public TextGlyph removeTextGlyph(int i)
i
- the index where to remove the TextGlyph
.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public TextGlyph removeTextGlyph(String textGlyphId)
textGlyphId
- the id of the element to be removed from the list.null
.public boolean removeTextGlyph(TextGlyph textGlyph)
textGlyph
- the element to be removed from the list.List.remove(Object)
public void setAddGraphicalObjects(ListOf<GraphicalObject> addGraphicalObjects)
addGraphicalObjects
- public void setDimensions(Dimensions dimensions)
Dimensions
specifies the dimensions of this
layout. This element is required. It holds the dimensions of all layout elements
(care should be taken when using CubicBezier
s, that the described curve also
lies within the given dimensions).dimensions
- public void setListOfAdditionalGraphicalObjects(ListOf<GraphicalObject> additionalGraphicalObjects)
Model
. As there might be cases where the user wants to
include object types in the layout that do fall in any of the other categories
described below, we include a listOfAdditionalGraphicalObjects in each Layout
object. This list holds an arbitrary number of GraphicalObject
elements.
The GraphicalObject
only defines a bounding box in a specific place in the
Layout
without giving additional information about its contents.
The listOfAdditionalGraphicalObjects, when present, must contain one or more of the
following elements: GraphicalObject
or GeneralGlyph
. When using a
GraphicalObject
it is recommended that some form of meta-information is provided.
For additional relationships such as SBML events or rules, the GeneralGlyph
can
be used.additionalGraphicalObjects
- public void setListOfCompartmentGlyphs(ListOf<CompartmentGlyph> compartmentGlyphs)
Compartment
s of a Model
will need a corresponding CompartmentGlyph
.compartmentGlyphs
- public void setListOfReactionGlyphs(ListOf<ReactionGlyph> reactionGlyphs)
Reaction
s
of a Model
need a corresponding ReactionGlyph
.reactionGlyphs
- public void setListOfSpeciesGlyphs(ListOf<SpeciesGlyph> speciesGlyphs)
Species
of a Model
need a corresponding SpeciesGlyph
.speciesGlyphs
- public void setListOfTextGlyphs(ListOf<TextGlyph> textGlyphs)
textGlyphs
- public String toString()
AbstractNamedSBase
toString
in class AbstractNamedSBase
public boolean unsetListOfAdditionalGraphicalObjects()
listOfAdditionalGraphicalObjects
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfCompartmentGlyphs()
listOfCompartmentGlyphs
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfReactionGlyphs()
listOfReactionGlyphs
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfSpeciesGlyphs()
listOfSpeciesGlyphs
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public boolean unsetListOfTextGlyphs()
listOfTextGlyphs
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.public Map<String,String> writeXMLAttributes()
SBase
SBase
that
need to be written out in XML.
The attribute name is used as a key and the attribute value as value. If a prefix is needed for the attribute name, it need to be set directly in this map.
writeXMLAttributes
in interface SBase
writeXMLAttributes
in class AbstractNamedSBase
Map
containing the XML attributes of this object.