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.InfoRefNested 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.Stringhrefprivate java.lang.StringtextLabelFields 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 CopyElementcopy()Copies this pathway element.voidcopyValuesFrom(Label src)Copies values from the given source pathway element.java.lang.StringgetHref()Returns the hyperlink for this label.ObjectTypegetObjectType()Returns the object type of this pathway element.java.lang.ObjectgetStaticProperty(StaticProperty key)Returns static property value for given key.java.util.Set<StaticProperty>getStaticPropertyKeys()Returns all static properties for this pathway object.java.lang.StringgetTextLabel()Returns the text of of the label.voidsetHref(java.lang.String v)Sets the hyperlink for this Label.voidsetStaticProperty(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.voidsetTextLabel(java.lang.String v)Sets the text of this shaped pathway element.protected voidterminate()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, unsetGroupRefMethods 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, setPropertyExMethods inherited from class org.pathvisio.libgpml.model.PathwayObject
addListener, dontFireEvents, fireObjectModifiedEvent, getElementId, getListeners, getPathwayModel, hasPathwayModel, removeListener, setElementId, setGeneratedElementId, setPathwayModel, setPathwayModelTo, unsetPathwayModelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.pathvisio.libgpml.model.Drawable
getPathwayModelMethods 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:
getObjectTypein interfaceDrawable- Specified by:
getObjectTypein interfaceGraphLink.LinkableTo- Specified by:
getObjectTypein classPathwayObject- Returns:
- the object type.
-
getTextLabel
public java.lang.String getTextLabel()Returns the text of of the label.- Specified by:
getTextLabelin 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:
setTextLabelin 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:
terminatein classShapedElement
-
copyValuesFrom
Copies values from the given source pathway element.- Parameters:
src- the source pathway element.
-
copy
Copies this pathway element.- Specified by:
copyin classPathwayElement- Returns:
- the copyElement for the new pathway element and this source pathway element.
-
getStaticPropertyKeys
Returns all static properties for this pathway object.- Overrides:
getStaticPropertyKeysin classShapedElement- Returns:
- result the set of static property for this pathway object.
-
getStaticProperty
Returns static property value for given key.- Overrides:
getStaticPropertyin 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:
setStaticPropertyin classShapedElement- Parameters:
key- the key.value- the static property value.
-