Class AbstractSingleParameter

java.lang.Object
org.graffiti.plugin.parameter.AbstractSingleParameter
All Implemented Interfaces:
Displayable, Parameter, SingleParameter
Direct Known Subclasses:
AbstractLimitableParameter, BooleanParameter, ClusterColorParameter, ColorParameter, EdgeParameter, EnumParameter, JComponentParameter, NodeParameter, ObjectListParameter, ObjectParameter, SelectionParameter, SliderParameter, StringParameter

public abstract class AbstractSingleParameter
extends Object
implements SingleParameter
Implements functions that are common in all SingleParameters.
Version:
$Revision: 1.6 $
  • Constructor Details

    • AbstractSingleParameter

      public AbstractSingleParameter​(Object val, String name, String description)
      Constructs a new abstract single parameter class.
      Parameters:
      val - DOCUMENT ME!
      name - the name of the parameter.
      description - the description of the parameter.
    • AbstractSingleParameter

      public AbstractSingleParameter​(String name, String description)
      Constructs a new abstract single parameter class.
      Parameters:
      name - the name of the parameter.
      description - the description of the parameter.
  • Method Details

    • setDescription

      public void setDescription​(String description)
      Sets the description.
      Specified by:
      setDescription in interface Displayable
      Parameters:
      description -
    • getDescription

      public String getDescription()
      Returns the description of the parameter.
      Specified by:
      getDescription in interface Displayable
      Returns:
      the description of the parameter.
    • getImage

      public BufferedImage getImage()
      Returns the image representing the parameter.
      Specified by:
      getImage in interface Parameter
      Returns:
      the image representing the parameter.
    • getName

      public String getName()
      Returns the name of the parameter.
      Specified by:
      getName in interface Displayable
      Returns:
      the name of the parameter.
    • setValue

      public void setValue​(Object val) throws IllegalArgumentException
      Description copied from interface: Displayable
      Sets the encapsulated object.
      Specified by:
      setValue in interface Displayable
      Throws:
      IllegalArgumentException - thrown if val is not of the appropriate type.
    • getValue

      public Object getValue()
      Description copied from interface: Displayable
      Returns the encapsulated object.
      Specified by:
      getValue in interface Displayable
      Returns:
      Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXMLString

      public String toXMLString()
      Description copied from interface: Displayable
      Returns a well-formed XML string representing the Displayable. The Displayable should be reconstructable via this representation. Therefore it must at least include the type of Displayable (classname) and a representation of its value. PROBABLE FUTURE DESIGN: The Displayables themselves will provide a method to reconstruct their value from the XML representation they provided.
      Specified by:
      toXMLString in interface Displayable
      Returns:
      string holding an XML representation of this Displayable
    • getIcon

      public JComponent getIcon()
      Specified by:
      getIcon in interface Displayable
    • isLeftAligned

      public boolean isLeftAligned()
    • setLeftAligned

      public void setLeftAligned​(boolean left_aligned)