Class 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
  • 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

      public ObjectType getObjectType()
      Returns the object type of this pathway element.
      Specified by:
      getObjectType in interface Drawable
      Specified by:
      getObjectType in interface GraphLink.LinkableTo
      Specified by:
      getObjectType in class PathwayObject
      Returns:
      the object type.
    • getTextLabel

      public java.lang.String getTextLabel()
      Returns the text of of the label.
      Specified by:
      getTextLabel in class ShapedElement
      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 class ShapedElement
      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 class ShapedElement
    • copyValuesFrom

      public void copyValuesFrom​(Label src)
      Copies values from the given source pathway element.
      Parameters:
      src - the source pathway element.
    • copy

      public CopyElement copy()
      Copies this pathway element.
      Specified by:
      copy in class PathwayElement
      Returns:
      the copyElement for the new pathway element and this source pathway element.
    • getStaticPropertyKeys

      public java.util.Set<StaticProperty> getStaticPropertyKeys()
      Returns all static properties for this pathway object.
      Overrides:
      getStaticPropertyKeys in class ShapedElement
      Returns:
      result the set of static property for this pathway object.
    • getStaticProperty

      public java.lang.Object getStaticProperty​(StaticProperty key)
      Returns static property value for given key.
      Overrides:
      getStaticProperty in class ShapedElement
      Parameters:
      key - the key.
      Returns:
      the static property value.
    • setStaticProperty

      public 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. graphRef
      Overrides:
      setStaticProperty in class ShapedElement
      Parameters:
      key - the key.
      value - the static property value.