java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, FontRenderStyle
, Point3D
, SBase
, TreeNodeWithChangeSupport
public class Text extends GraphicalPrimitive1D implements FontRenderStyle, Point3D
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
Text() |
|
Text(int level,
int version) |
|
Text(Text obj) |
Modifier and Type | Method | Description |
---|---|---|
Text |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getFontFamily() |
|
RelAbsVector |
getFontSize() |
|
java.lang.String |
getText() |
|
HTextAnchor |
getTextAnchor() |
|
VTextAnchor |
getVTextAnchor() |
|
RelAbsVector |
getX() |
|
RelAbsVector |
getY() |
|
RelAbsVector |
getZ() |
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
Initializes the default values using the namespace.
|
boolean |
isFontStyleItalic() |
|
boolean |
isFontWeightBold() |
|
boolean |
isSetFontFamily() |
|
boolean |
isSetFontSize() |
|
boolean |
isSetFontStyleItalic() |
|
boolean |
isSetFontWeightBold() |
|
boolean |
isSetText() |
Checks whether the text-field has been set.
|
boolean |
isSetTextAnchor() |
|
boolean |
isSetVTextAnchor() |
|
boolean |
isSetX() |
|
boolean |
isSetY() |
|
boolean |
isSetZ() |
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
void |
setFontFamily(java.lang.String fontFamily) |
Set the value of fontFamily
|
void |
setFontFamily(FontFamily fontFamily) |
Set the value of fontFamily by using a
FontFamily type. |
void |
setFontSize(RelAbsVector fontSize) |
Set the value of fontSize
|
void |
setFontStyleItalic(boolean fontStyleItalic) |
Set the value of fontStyleItalic
|
void |
setFontWeightBold(boolean fontWeightBold) |
Set the value of fontWeightBold
|
void |
setText(java.lang.String text) |
Set the value of the
text field (and fire appropriate property-change event) |
void |
setTextAnchor(HTextAnchor textAnchor) |
Set the value of textAnchor
|
void |
setVTextAnchor(VTextAnchor vTextAnchor) |
Set the value of VTextAnchor
|
void |
setX(RelAbsVector x) |
Set the value of x
|
void |
setY(RelAbsVector y) |
Set the value of y
|
void |
setZ(RelAbsVector z) |
Set the value of z
|
java.lang.String |
toString() |
Returns a String representing this SBase with all the
attributes that are defined.
|
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 |
unsetText() |
Unsets the
text and fires appropriate change event |
boolean |
unsetTextAnchor() |
Unsets the variable textAnchor
|
boolean |
unsetVTextAnchor() |
Unsets the variable VTextAnchor
|
boolean |
unsetX() |
Unsets the variable x
|
boolean |
unsetY() |
Unsets the variable y
|
boolean |
unsetZ() |
Unsets the variable z
|
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, getAllowsChildren, getAnnotation, getAnnotationString, getChildAt, getChildCount, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, 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
removeTreeNodeChangeListener
isSetTransform, setTransform
getTransform, unsetTransform
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public Text()
public Text(int level, int version)
public Text(Text obj)
public Text clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class GraphicalPrimitive1D
public void initDefaults()
initDefaults
in class GraphicalPrimitive1D
public java.lang.String getFontFamily()
getFontFamily
in interface FontRenderStyle
public RelAbsVector getFontSize()
getFontSize
in interface FontRenderStyle
public java.lang.String getText()
public HTextAnchor getTextAnchor()
getTextAnchor
in interface FontRenderStyle
public VTextAnchor getVTextAnchor()
getVTextAnchor
in interface FontRenderStyle
public RelAbsVector getX()
public RelAbsVector getY()
public RelAbsVector getZ()
public boolean isFontStyleItalic()
isFontStyleItalic
in interface FontRenderStyle
public boolean isFontWeightBold()
isFontWeightBold
in interface FontRenderStyle
public boolean isSetFontFamily()
isSetFontFamily
in interface FontRenderStyle
public boolean isSetFontSize()
isSetFontSize
in interface FontRenderStyle
public boolean isSetFontStyleItalic()
isSetFontStyleItalic
in interface FontRenderStyle
public boolean isSetFontWeightBold()
isSetFontWeightBold
in interface FontRenderStyle
public boolean isSetText()
text
text
-field has been setpublic boolean isSetTextAnchor()
isSetTextAnchor
in interface FontRenderStyle
public boolean isSetVTextAnchor()
isSetVTextAnchor
in interface FontRenderStyle
public void setFontFamily(java.lang.String fontFamily)
FontRenderStyle
setFontFamily
in interface FontRenderStyle
public void setFontFamily(FontFamily fontFamily)
FontRenderStyle
FontFamily
type.setFontFamily
in interface FontRenderStyle
public void setFontSize(RelAbsVector fontSize)
FontRenderStyle
setFontSize
in interface FontRenderStyle
public void setFontStyleItalic(boolean fontStyleItalic)
FontRenderStyle
setFontStyleItalic
in interface FontRenderStyle
public void setFontWeightBold(boolean fontWeightBold)
FontRenderStyle
setFontWeightBold
in interface FontRenderStyle
public void setText(java.lang.String text)
text
field (and fire appropriate property-change event)text
- the new textpublic void setTextAnchor(HTextAnchor textAnchor)
FontRenderStyle
setTextAnchor
in interface FontRenderStyle
public void setVTextAnchor(VTextAnchor vTextAnchor)
FontRenderStyle
setVTextAnchor
in interface FontRenderStyle
public void setX(RelAbsVector x)
Point3D
public void setY(RelAbsVector y)
Point3D
public void setZ(RelAbsVector z)
Point3D
public boolean unsetFontFamily()
FontRenderStyle
unsetFontFamily
in interface FontRenderStyle
true
, if fontFamily was set before,
otherwise false
public boolean unsetFontSize()
FontRenderStyle
unsetFontSize
in interface FontRenderStyle
true
, if fontSize was set before,
otherwise false
public boolean unsetFontStyleItalic()
FontRenderStyle
unsetFontStyleItalic
in interface FontRenderStyle
true
, if fontStyleItalic was set before,
otherwise false
public boolean unsetFontWeightBold()
FontRenderStyle
unsetFontWeightBold
in interface FontRenderStyle
true
, if fontWeightBold was set before,
otherwise false
public boolean unsetText()
text
and fires appropriate change eventpublic boolean unsetTextAnchor()
FontRenderStyle
unsetTextAnchor
in interface FontRenderStyle
true
, if textAnchor was set before,
otherwise false
public boolean unsetVTextAnchor()
FontRenderStyle
unsetVTextAnchor
in interface FontRenderStyle
true
, if VTextAnchor was set before,
otherwise false
public boolean unsetX()
Point3D
public boolean unsetY()
Point3D
public boolean unsetZ()
Point3D
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 GraphicalPrimitive1D
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 GraphicalPrimitive1D
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class GraphicalPrimitive1D
SBase
instance.Object.hashCode()
public boolean equals(java.lang.Object obj)
SBase
public java.lang.String toString()
AbstractSBase
toString
in class AbstractSBase