org.sbml.jsbml.ext.render
public class RenderGroup extends GraphicalPrimitive2D implements UniqueNamedSBase
RenderGroup class from the SBML render extension is used to group graphical primitives together
to create composite representations from simple primitives.
The RenderGroup class is derived from GraphicalPrimitive2D and inherits all its methods and attributes.
In addition to those, the class defines attributes to specify text render properties (@see Text),
curve decorations (@see RenderCurve), an id and a list of child elements which can be any
graphical primitive or other groups.
The attributes of a group are inherited by all children of the group unless they specify the attribute themselves.
GraphicalPrimitive2D.FillRule| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
endHead |
private FontFamily |
fontFamily |
private java.lang.Short |
fontSize |
private java.lang.Boolean |
fontStyleItalic |
private java.lang.Boolean |
fontWeightBold |
private java.lang.String |
id |
private ListOf<Transformation2D> |
listOfElements |
private static long |
serialVersionUID
Generated serial version identifier
|
private java.lang.String |
startHead |
private TextAnchor |
textAnchor |
private VTextAnchor |
vTextAnchor |
fill, fillRulestroke, strokeDashArray, strokeWidthtransformignoredExtensions, ignoredXMLElementslistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
RenderGroup()
Creates an Group instance
|
RenderGroup(int level,
int version)
Creates a Group instance with a level and version.
|
RenderGroup(RenderGroup obj)
Clone constructor
|
RenderGroup(java.lang.String id)
Creates a Group instance with an id.
|
RenderGroup(java.lang.String id,
int level,
int version)
Creates a Group instance with an id, level, and version.
|
RenderGroup(java.lang.String id,
java.lang.String name,
int level,
int version)
Creates a Group instance with an id, name, level, and version.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildElement(Transformation2D pChild)
Adds the given element to the end of the list of children elements.
|
boolean |
addElement(Transformation2D field)
Adds a new
Transformation2D to the listOfElements. |
RenderGroup |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same properties
like this one. |
RenderCurve |
createCurve()
Creates a new
RenderCurve element, adds it to the ListOfElements list and returns it. |
Ellipse |
createEllipse()
Creates a new
Ellipse element, adds it to the ListOfElements list and returns it. |
Image |
createImage()
Creates a new
Image element, adds it to the ListOfElements list and returns it. |
Polygon |
createPolygon()
Creates a new
Polygon element, adds it to the ListOfElements list and returns it. |
Rectangle |
createRectangle()
Creates a new
Rectangle element, adds it to the ListOfElements list and returns it. |
RenderGroup |
createRenderGroup()
Creates a new
RenderGroup element, adds it to the ListOfElements list and returns it. |
Text |
createText()
Creates a new
Text element, adds it to the ListOfElements list and returns it. |
boolean |
equals(java.lang.Object obj)
|
boolean |
getAllowsChildren() |
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
Transformation2D |
getElement(int i)
Gets an element from the listOfElements at the given index.
|
Transformation2D |
getElement(java.lang.String fieldId)
Gets an element from the listOfElements, with the given id.
|
int |
getElementCount()
Returns the number of
Transformation2Ds in this RenderGroup. |
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
java.lang.String |
getEndHead() |
FontFamily |
getFontFamily() |
java.lang.Short |
getFontSize() |
boolean |
getFontStyleItalic()
Returns the value of fontStyleItalic
|
boolean |
getFontWeightBold()
Returns the value of fontWeightBold
|
java.lang.String |
getId() |
ListOf<Transformation2D> |
getListOfElements()
Returns the listOfElements.
|
java.lang.String |
getName() |
int |
getNumElements()
Returns the number of
Transformation2Ds in this RenderGroup. |
java.lang.String |
getStartHead() |
TextAnchor |
getTextAnchor() |
VTextAnchor |
getVTextAnchor() |
int |
hashCode()
Returns a hash code value for this
SBase instance. |
void |
initDefaults()
Initializes the default values using the namespace.
|
boolean |
isFontStyleItalic()
Returns the value of fontStyleItalic
|
boolean |
isFontWeightBold()
Returns the value of fontWeightBold
|
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 |
isSetEndHead() |
boolean |
isSetFontFamily() |
boolean |
isSetFontSize() |
boolean |
isSetFontStyleItalic()
Returns whether fontStyleItalic is set
|
boolean |
isSetFontWeightBold() |
boolean |
isSetId() |
boolean |
isSetListOfElements()
Returns
true, if listOfElements contains at least one element. |
boolean |
isSetName() |
boolean |
isSetStartHead() |
boolean |
isSetTextAnchor() |
boolean |
isSetVTextAnchor() |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase. |
Transformation2D |
removeElement(int i)
Removes an element from the listOfElements at the given index.
|
Transformation2D |
removeElement(java.lang.String fieldId)
Removes an element from the listOfElements.
|
boolean |
removeElement(Transformation2D field)
Removes an element from the listOfElements.
|
void |
setEndHead(java.lang.String endHead)
Set the value of endHead
|
void |
setFontFamily(FontFamily fontFamily)
Set the value of fontFamily
|
void |
setFontSize(java.lang.Short fontSize)
Set the value of fontSize
|
void |
setFontStyleItalic(java.lang.Boolean fontStyleItalic)
Set the value of fontStyleItalic
|
void |
setFontWeightBold(java.lang.Boolean fontWeightBold)
Set the value of fontWeightBold
|
void |
setId(java.lang.String id)
sets the id value with 'id'
|
void |
setListOfElements(ListOf<Transformation2D> listOfElements)
Sets the given
ListOf<Transformation2D>. |
void |
setName(java.lang.String name)
sets the name value with 'name'.
|
void |
setStartHead(java.lang.String startHead)
Set the value of startHead
|
void |
setTextAnchor(TextAnchor textAnchor)
Set the value of textAnchor
|
void |
setVTextAnchor(VTextAnchor vTextAnchor)
Set the value of vTextAnchor
|
java.lang.String |
toString() |
boolean |
unsetEndHead()
Unsets the variable endHead
|
boolean |
unsetFontFamily()
Unsets the variable fontFamily
|
boolean |
unsetFontSize()
Unsets the variable fontSize
|
boolean |
unsetFontStyleItalic()
Unsets the variable fontStyleItalic
|
boolean |
unsetFontWeightBold()
Unsets the variable fontWeightBold
|
void |
unsetId()
Unsets the variable id
|
boolean |
unsetListOfElements()
Returns
true, if listOfElements contain at least one element,
otherwise false. |
void |
unsetName()
sets the name value to
null. |
boolean |
unsetStartHead()
Unsets the variable startHead
|
boolean |
unsetTextAnchor()
Unsets the variable textAnchor
|
boolean |
unsetVTextAnchor()
Unsets the variable vTextAnchor
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
getFill, getFillRule, isSetFill, isSetFillRule, setFill, setFillRule, unsetFill, unsetFillRulegetStroke, getStrokeDashArray, getStrokeWidth, isSetStroke, isSetStrokeDashArray, isSetStrokeWidth, setStroke, setStrokeDashArray, setStrokeWidth, unsetStroke, unsetStrokeDashArray, unsetStrokeWidthgetTransform, isSetTransform, setTransform, unsetTransformaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setHistory, setLevel, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, 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, userObjectKeySetfinalize, getClass, notify, notifyAll, wait, wait, waitaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetprivate static final long serialVersionUID
private java.lang.String id
private FontFamily fontFamily
private java.lang.Short fontSize
private java.lang.Boolean fontWeightBold
private java.lang.Boolean fontStyleItalic
private TextAnchor textAnchor
private VTextAnchor vTextAnchor
private java.lang.String startHead
private java.lang.String endHead
private ListOf<Transformation2D> listOfElements
public RenderGroup()
public RenderGroup(java.lang.String id)
id - public RenderGroup(int level,
int version)
level - version - public RenderGroup(java.lang.String id,
int level,
int version)
id - level - version - public RenderGroup(java.lang.String id,
java.lang.String name,
int level,
int version)
id - name - level - version - public RenderGroup(RenderGroup obj)
public RenderGroup clone()
SBaseSBase with the same properties
like this one.clone in interface SBaseclone in class GraphicalPrimitive2Dpublic void initDefaults()
TransformationinitDefaults in class GraphicalPrimitive2Dpublic int hashCode()
SBaseSBase instance.hashCode in interface SBasehashCode in class GraphicalPrimitive2DSBase instance.Object.hashCode()public boolean equals(java.lang.Object obj)
SBasepublic java.lang.String toString()
toString in class Transformationpublic boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodegetAllowsChildren in class AbstractSBasepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodegetChildCount in class AbstractSBasepublic javax.swing.tree.TreeNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class AbstractSBasepublic java.lang.String getElementName()
SBasegetElementName in interface SBasegetElementName in class AbstractSBasepublic java.lang.String getId()
getId in interface NamedSBasepublic boolean isSetId()
isSetId in interface NamedSBasepublic void setId(java.lang.String id)
NamedSBasesetId in interface NamedSBasepublic void unsetId()
unsetId in interface NamedSBasepublic FontFamily getFontFamily()
public boolean isSetFontFamily()
public void setFontFamily(FontFamily fontFamily)
public boolean unsetFontFamily()
true, if fontFamily was set before,
otherwise falsepublic java.lang.Short getFontSize()
public boolean isSetFontSize()
public void setFontSize(java.lang.Short fontSize)
public boolean unsetFontSize()
true, if fontSize was set before,
otherwise falsepublic boolean getFontWeightBold()
public boolean isFontWeightBold()
public boolean isSetFontWeightBold()
public void setFontWeightBold(java.lang.Boolean fontWeightBold)
public boolean unsetFontWeightBold()
true, if fontWeightBold was set before,
otherwise falsepublic boolean getFontStyleItalic()
public boolean isFontStyleItalic()
public boolean isSetFontStyleItalic()
public void setFontStyleItalic(java.lang.Boolean fontStyleItalic)
public boolean unsetFontStyleItalic()
true, if fontStyleItalic was set before,
otherwise falsepublic java.lang.String getStartHead()
public boolean isSetStartHead()
public void setStartHead(java.lang.String startHead)
public boolean unsetStartHead()
true, if startHead was set before,
otherwise falsepublic java.lang.String getEndHead()
public boolean isSetEndHead()
public void setEndHead(java.lang.String endHead)
public boolean unsetEndHead()
true, if endHead was set before,
otherwise falsepublic TextAnchor getTextAnchor()
public boolean isSetTextAnchor()
public void setTextAnchor(TextAnchor textAnchor)
public boolean unsetTextAnchor()
true, if textAnchor was set before,
otherwise falsepublic VTextAnchor getVTextAnchor()
public boolean isSetVTextAnchor()
public void setVTextAnchor(VTextAnchor vTextAnchor)
public boolean unsetVTextAnchor()
true, if vTextAnchor was set before,
otherwise falsepublic boolean isSetListOfElements()
true, if listOfElements contains at least one element.true, if listOfElements contains at least one element,
otherwise false.public ListOf<Transformation2D> getListOfElements()
public void setListOfElements(ListOf<Transformation2D> listOfElements)
ListOf<Transformation2D>. If listOfElements
was defined before and contains some elements, they are all unset.listOfElements. - public boolean unsetListOfElements()
true, if listOfElements contain at least one element,
otherwise false.true, if listOfElements contain at least one element,
otherwise false.public boolean addElement(Transformation2D field)
Transformation2D to the listOfElements.
The listOfElements is initialized if necessary.
field - the element to add to the listCollection.add)public boolean removeElement(Transformation2D field)
field - the element to be removed from the list.List.remove(Object)public Transformation2D removeElement(java.lang.String fieldId)
id - the id of the element to be removed from the list.public Transformation2D removeElement(int i)
i - the index where to remove the Transformation2D.java.lang.IndexOutOfBoundsException - if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public RenderCurve createCurve()
RenderCurve element, adds it to the ListOfElements list and returns it.public Ellipse createEllipse()
Ellipse element, adds it to the ListOfElements list and returns it.public Image createImage()
Image element, adds it to the ListOfElements list and returns it.public Polygon createPolygon()
Polygon element, adds it to the ListOfElements list and returns it.public Rectangle createRectangle()
Rectangle element, adds it to the ListOfElements list and returns it.public RenderGroup createRenderGroup()
RenderGroup element, adds it to the ListOfElements list and returns it.public Text createText()
Text element, adds it to the ListOfElements list and returns it.public Transformation2D getElement(int i)
i - the index of the Transformation2D element to get.java.lang.IndexOutOfBoundsException - if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public Transformation2D getElement(java.lang.String fieldId)
id - the id of the Transformation2D element to get.public int getElementCount()
Transformation2Ds in this RenderGroup.Transformation2Ds in this RenderGroup.public int getNumElements()
Transformation2Ds in this RenderGroup.Transformation2Ds in this RenderGroup.public void addChildElement(Transformation2D pChild)
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBaseSBase 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 SBasewriteXMLAttributes in class GraphicalPrimitive2DMap containing the XML attributes of this object.public boolean readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
SBaseSBase.
If the given attribute name is not recognized, nothing is done and
false is returned.
readAttribute in interface SBasereadAttribute in class GraphicalPrimitive2DattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.public java.lang.String getName()
getName in interface NamedSBasepublic boolean isIdMandatory()
NamedSBaseNamedSBase is required to be defined (i.e., not null)
in the definition of SBML.isIdMandatory in interface NamedSBasetrue 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 isSetName()
isSetName in interface NamedSBasetrue if the name is not null.public void setName(java.lang.String name)
NamedSBasesetName in interface NamedSBasepublic void unsetName()
NamedSBasenull.unsetName in interface NamedSBase