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, fillRule
stroke, strokeDashArray, strokeWidth
transform
ignoredExtensions, ignoredXMLElements
listOfListeners, 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
Transformation2D s 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
Transformation2D s 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, unsetFillRule
getStroke, getStrokeDashArray, getStrokeWidth, isSetStroke, isSetStrokeDashArray, isSetStrokeWidth, setStroke, setStrokeDashArray, setStrokeWidth, unsetStroke, unsetStrokeDashArray, unsetStrokeWidth
getTransform, isSetTransform, setTransform, unsetTransform
addCVTerm, 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, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
addCVTerm, 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, 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
private 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()
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()
toString
in class Transformation
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 getId()
getId
in interface NamedSBase
public boolean isSetId()
isSetId
in interface NamedSBase
public void setId(java.lang.String id)
NamedSBase
setId
in interface NamedSBase
public void unsetId()
unsetId
in interface NamedSBase
public FontFamily getFontFamily()
public boolean isSetFontFamily()
public void setFontFamily(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)
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)
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)
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)
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)
public boolean unsetEndHead()
true
, if endHead was set before,
otherwise false
public TextAnchor getTextAnchor()
public boolean isSetTextAnchor()
public void setTextAnchor(TextAnchor textAnchor)
public boolean unsetTextAnchor()
true
, if textAnchor was set before,
otherwise false
public VTextAnchor getVTextAnchor()
public boolean isSetVTextAnchor()
public void setVTextAnchor(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 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()
Transformation2D
s in this RenderGroup
.Transformation2D
s in this RenderGroup
.public int getNumElements()
Transformation2D
s in this RenderGroup
.Transformation2D
s in this RenderGroup
.public void addChildElement(Transformation2D pChild)
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.public java.lang.String getName()
getName
in interface NamedSBase
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 isSetName()
isSetName
in interface NamedSBase
true
if the name is not null
.public void setName(java.lang.String name)
NamedSBase
setName
in interface NamedSBase
public void unsetName()
NamedSBase
null
.unsetName
in interface NamedSBase