Package org.pathvisio.libgpml.model
Class Label
java.lang.Object
org.pathvisio.libgpml.model.PathwayObject
org.pathvisio.libgpml.model.PathwayElement
org.pathvisio.libgpml.model.ShapedElement
org.pathvisio.libgpml.model.Label
- All Implemented Interfaces:
java.lang.Cloneable
,Drawable
,GraphLink.LinkableTo
,Groupable
,Referenceable
,Referenceable.Annotatable
,Referenceable.Citable
,Referenceable.Evidenceable
public class Label extends ShapedElement
This class stores all information relevant to a Label pathway element.
- Author:
- finterly
-
Nested Class Summary
Nested classes/interfaces inherited from class org.pathvisio.libgpml.model.PathwayElement
PathwayElement.AnnotationRef, PathwayElement.CitationRef, PathwayElement.Comment, PathwayElement.EvidenceRef, PathwayElement.InfoRef
Nested classes/interfaces inherited from interface org.pathvisio.libgpml.model.Referenceable
Referenceable.Annotatable, Referenceable.Citable, Referenceable.Evidenceable
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
href
private java.lang.String
textLabel
Fields inherited from class org.pathvisio.libgpml.model.PathwayObject
noFire, pathwayModel
-
Constructor Summary
Constructors Constructor Description Label(java.lang.String textLabel)
Instantiates a Label pathway element given all required parameters. -
Method Summary
Modifier and Type Method Description CopyElement
copy()
Copies this pathway element.void
copyValuesFrom(Label src)
Copies values from the given source pathway element.java.lang.String
getHref()
Returns the hyperlink for this label.ObjectType
getObjectType()
Returns the object type of this pathway element.java.lang.Object
getStaticProperty(StaticProperty key)
Returns static property value for given key.java.util.Set<StaticProperty>
getStaticPropertyKeys()
Returns all static properties for this pathway object.java.lang.String
getTextLabel()
Returns the text of of the label.void
setHref(java.lang.String v)
Sets the hyperlink for this Label.void
setStaticProperty(StaticProperty key, java.lang.Object value)
This works so that o.setNotes(x) is the equivalent of o.setProperty("Notes", x); Value may be null in some cases, e.g.void
setTextLabel(java.lang.String v)
Sets the text of this shaped pathway element.protected void
terminate()
Terminates this label and removes all links and references.Methods inherited from class org.pathvisio.libgpml.model.ShapedElement
copyValuesFrom, getBorderColor, getBorderStyle, getBorderWidth, getBounds, getCenterX, getCenterY, getFillColor, getFontDecoration, getFontName, getFontSize, getFontStrikethru, getFontStyle, getFontWeight, getGroupRef, getHAlign, getHeight, getLeft, getLinkableFroms, getRotatedBounds, getRotation, getShapeType, getTextColor, getTop, getVAlign, getWidth, getZOrder, hasGroupRef, setBorderColor, setBorderStyle, setBorderWidth, setCenterX, setCenterY, setFillColor, setFontDecoration, setFontName, setFontSize, setFontStrikethru, setFontStyle, setFontWeight, setGroupRefTo, setHAlign, setHeight, setLeft, setRotation, setShapeType, setTextColor, setTop, setVAlign, setWidth, setZOrder, toAbsoluteCoordinate, toRelativeCoordinate, unsetAllLinkableFroms, unsetGroupRef
Methods inherited from class org.pathvisio.libgpml.model.PathwayElement
addAnnotation, addAnnotation, addAnnotation, addCitation, addCitation, addCitation, addComment, addComment, addEvidence, addEvidence, addEvidence, copyReferencesFrom, copyValuesFrom, findComment, getAnnotationRefs, getCitationRefs, getComments, getDynamicProperties, getDynamicProperty, getDynamicPropertyKeys, getEvidenceRefs, getPropertyEx, getPropertyKeys, hasAnnotationRef, hasCitationRef, hasEvidenceRef, removeAnnotationRef, removeAnnotationRefs, removeCitationRef, removeCitationRefs, removeComment, removeEvidenceRef, removeEvidenceRefs, setComments, setDynamicProperty, setPropertyEx
Methods inherited from class org.pathvisio.libgpml.model.PathwayObject
addListener, dontFireEvents, fireObjectModifiedEvent, getElementId, getListeners, getPathwayModel, hasPathwayModel, removeListener, setElementId, setGeneratedElementId, setPathwayModel, setPathwayModelTo, unsetPathwayModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pathvisio.libgpml.model.Drawable
getPathwayModel
Methods inherited from interface org.pathvisio.libgpml.model.GraphLink.LinkableTo
getElementId
-
Field Details
-
textLabel
private java.lang.String textLabel -
href
private java.lang.String href
-
-
Constructor Details
-
Label
public Label(java.lang.String textLabel)Instantiates a Label pathway element given all required parameters.- Parameters:
textLabel
- the text of the label.
-
-
Method Details
-
getObjectType
Returns the object type of this pathway element.- Specified by:
getObjectType
in interfaceDrawable
- Specified by:
getObjectType
in interfaceGraphLink.LinkableTo
- Specified by:
getObjectType
in classPathwayObject
- Returns:
- the object type.
-
getTextLabel
public java.lang.String getTextLabel()Returns the text of of the label.- Specified by:
getTextLabel
in classShapedElement
- Returns:
- textLabel the text of of the label.
-
setTextLabel
public void setTextLabel(java.lang.String v)Sets the text of this shaped pathway element.- Specified by:
setTextLabel
in classShapedElement
- Parameters:
v
- the text to set.
-
getHref
public java.lang.String getHref()Returns the hyperlink for this label.- Returns:
- href the hyperlink reference to a url.
-
setHref
public void setHref(java.lang.String v)Sets the hyperlink for this Label.- Parameters:
v
- the hyperlink reference to a url.
-
terminate
protected void terminate()Terminates this label and removes all links and references.- Overrides:
terminate
in classShapedElement
-
copyValuesFrom
Copies values from the given source pathway element.- Parameters:
src
- the source pathway element.
-
copy
Copies this pathway element.- Specified by:
copy
in classPathwayElement
- Returns:
- the copyElement for the new pathway element and this source pathway element.
-
getStaticPropertyKeys
Returns all static properties for this pathway object.- Overrides:
getStaticPropertyKeys
in classShapedElement
- Returns:
- result the set of static property for this pathway object.
-
getStaticProperty
Returns static property value for given key.- Overrides:
getStaticProperty
in classShapedElement
- Parameters:
key
- the key.- Returns:
- the static property value.
-
setStaticProperty
This works so that o.setNotes(x) is the equivalent of o.setProperty("Notes", x); Value may be null in some cases, e.g. graphRef- Overrides:
setStaticProperty
in classShapedElement
- Parameters:
key
- the key.value
- the static property value.
-