java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, NamedSBase
, SBase
, UniqueNamedSBase
, UniqueSId
, TreeNodeWithChangeSupport
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
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
RenderGroup() |
Creates an Group instance
|
RenderGroup(int level,
int version) |
Creates a Group instance with a level and version.
|
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.
|
RenderGroup(RenderGroup obj) |
Clone constructor
|
Modifier and Type | Method | 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
Transformation2D s in this RenderGroup . |
java.lang.String |
getElementName() |
Returns the XML element name of this object.
|
java.lang.String |
getEndHead() |
|
java.lang.String |
getFontFamily() |
|
java.lang.Short |
getFontSize() |
|
boolean |
getFontStyleItalic() |
Returns the value of fontStyleItalic
|
boolean |
getFontWeightBold() |
Returns the value of fontWeightBold
|
ListOf<Transformation2D> |
getListOfElements() |
Returns the listOfElements.
|
int |
getNumElements() |
Returns the number of
Transformation2D s in this RenderGroup . |
java.lang.String |
getStartHead() |
|
HTextAnchor |
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 |
isListOfElementsEmpty() |
|
boolean |
isSetEndHead() |
|
boolean |
isSetFontFamily() |
|
boolean |
isSetFontSize() |
|
boolean |
isSetFontStyleItalic() |
Returns whether fontStyleItalic is set
|
boolean |
isSetFontWeightBold() |
|
boolean |
isSetListOfElements() |
Returns
true , if listOfElements contains at least one element. |
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(java.lang.String 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 |
setListOfElements(ListOf<Transformation2D> listOfElements) |
Sets the given
ListOf<Transformation2D> . |
void |
setStartHead(java.lang.String startHead) |
Set the value of startHead
|
void |
setTextAnchor(HTextAnchor textAnchor) |
Set the value of textAnchor
|
void |
setVTextAnchor(VTextAnchor vTextAnchor) |
Set the value of vTextAnchor
|
java.lang.String |
toString() |
Returns a String representing this SBase with all the
attributes that are defined.
|
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
|
boolean |
unsetListOfElements() |
Returns
true , if listOfElements contain at least one element,
otherwise false . |
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. |
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isIdMandatory, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, 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
addStrokeDash, getStroke, getStrokeDash, getStrokeDashArray, getStrokeWidth, isSetStroke, isSetStrokeDashArray, isSetStrokeWidth, setStroke, setStrokeDashArray, setStrokeDashArray, setStrokeWidth, unsetStroke, unsetStrokeDashArray, unsetStrokeWidth
getFill, getFillRule, isSetFill, isSetFillRule, setFill, setFillRule, unsetFill, unsetFillRule
getId, getName, isIdMandatory, 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, getElementByMetaId, getElementBySId, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm
isSetTransform, setTransform
getTransform, unsetTransform
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 RenderGroup()
public RenderGroup(java.lang.String id)
id
- the idpublic RenderGroup(int level, int version)
level
- the SBML levelversion
- the SBMl versionpublic RenderGroup(java.lang.String id, int level, int version)
id
- the idlevel
- the SBML levelversion
- the SBMl versionpublic RenderGroup(java.lang.String id, java.lang.String name, int level, int version)
id
- the render group SIdname
- the namelevel
- the SBML levelversion
- the SBMl versionpublic RenderGroup(RenderGroup obj)
obj
- the RenderGroup
instance to clonepublic RenderGroup clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class GraphicalPrimitive2D
public void initDefaults()
Transformation
initDefaults
in class GraphicalPrimitive2D
public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class GraphicalPrimitive2D
SBase
instance.Object.hashCode()
public boolean equals(java.lang.Object obj)
SBase
public java.lang.String toString()
AbstractSBase
toString
in class AbstractSBase
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class AbstractSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractSBase
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractSBase
public java.lang.String getElementName()
SBase
getElementName
in interface SBase
getElementName
in class AbstractSBase
public java.lang.String getFontFamily()
public boolean isSetFontFamily()
public void setFontFamily(java.lang.String fontFamily)
fontFamily
- public boolean unsetFontFamily()
true
, if fontFamily was set before,
otherwise false
public java.lang.Short getFontSize()
public boolean isSetFontSize()
public void setFontSize(java.lang.Short fontSize)
fontSize
- public boolean unsetFontSize()
true
, if fontSize was set before,
otherwise false
public boolean getFontWeightBold()
public boolean isFontWeightBold()
public boolean isSetFontWeightBold()
public void setFontWeightBold(java.lang.Boolean fontWeightBold)
fontWeightBold
- public boolean unsetFontWeightBold()
true
, if fontWeightBold was set before,
otherwise false
public boolean getFontStyleItalic()
public boolean isFontStyleItalic()
public boolean isSetFontStyleItalic()
public void setFontStyleItalic(java.lang.Boolean fontStyleItalic)
fontStyleItalic
- public boolean unsetFontStyleItalic()
true
, if fontStyleItalic was set before,
otherwise false
public java.lang.String getStartHead()
public boolean isSetStartHead()
public void setStartHead(java.lang.String startHead)
startHead
- public boolean unsetStartHead()
true
, if startHead was set before,
otherwise false
public java.lang.String getEndHead()
public boolean isSetEndHead()
public void setEndHead(java.lang.String endHead)
endHead
- public boolean unsetEndHead()
true
, if endHead was set before,
otherwise false
public HTextAnchor getTextAnchor()
public boolean isSetTextAnchor()
public void setTextAnchor(HTextAnchor textAnchor)
textAnchor
- public boolean unsetTextAnchor()
true
, if textAnchor was set before,
otherwise false
public VTextAnchor getVTextAnchor()
public boolean isSetVTextAnchor()
public void setVTextAnchor(VTextAnchor vTextAnchor)
vTextAnchor
- public boolean unsetVTextAnchor()
true
, if vTextAnchor was set before,
otherwise false
public boolean isSetListOfElements()
true
, if listOfElements contains at least one element.true
, if listOfElements contains at least one element,
otherwise false
.public boolean isListOfElementsEmpty()
true
iff listOfCurveSegments is not null
, but empty
(relevant for validation)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(E)
)public boolean removeElement(Transformation2D field)
field
- the element to be removed from the list.List.remove(Object)
public Transformation2D removeElement(java.lang.String fieldId)
fieldId
- the id of the element to be removed from the list.null
.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)
fieldId
- the id of the Transformation2D
element to get.null
.public int getElementCount()
Transformation2D
s in this RenderGroup
.Transformation2D
s in this RenderGroup
.public int getNumElements()
Transformation2D
s in this RenderGroup
.Transformation2D
s in this RenderGroup
.getElementCount()
public void addChildElement(Transformation2D pChild)
pChild
- createEllipse()
,
createRectangle()
,
createPolygon()
,
createText()
,
createCurve()
,
createRenderGroup()
,
createImage()
public java.util.Map<java.lang.String,java.lang.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 GraphicalPrimitive2D
Map
containing the XML attributes of this object.public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.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 GraphicalPrimitive2D
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.