Class ObjectAndDescription

java.lang.Object
org.openjump.sextante.core.ObjectAndDescription
All Implemented Interfaces:
Comparable<Object>

public class ObjectAndDescription extends Object implements Comparable<Object>
Refactor of Sextante class es.unex.sextante.core.ObjectAndDescription from lib Sextante.jar. This class creates an object defined by the component description and the component . Ex: ObjectAndDescription oa = new ObjectAndDescription(name, component); where name=String and component could be JPanel, JTextArea, JTextPane, JLabel, JTable, HTMLPanel , PlotPanel
Author:
Giuseppe Aruta [2017-12-12] TODO should we constrain the Object attribute to be a JComponent or do we really need to have it opened to any Object ?
  • Constructor Details

    • ObjectAndDescription

      public ObjectAndDescription(String sDescription, Object object)
  • Method Details

    • getObject

      public Object getObject()
      gets the component (JPanel, JTextArea, JTextPane, JLabel, JTable, HTMLPanel , PlotPanel)
      Returns:
      the Object
    • setObject

      public void setObject(Object object)
      sets the component (JPanel, JTextArea, JTextPane, JLabel, JTable, HTMLPanel , PlotPanel)
    • getDescription

      public String getDescription()
      gets the description
      Returns:
      the description
    • setDescription

      public void setDescription(String sDescription)
      sets the description
    • toString

      public String toString()
      gets the description
      Overrides:
      toString in class Object
      Returns:
      the description
    • compareTo

      public int compareTo(Object arg0)
      Compare two ObjectAndDescription objects using their descriptions
      Specified by:
      compareTo in interface Comparable<Object>
    • equals

      public boolean equals(Object ob)
      Compare two ObjectAndDescription objects using their descriptions and their components
      Overrides:
      equals in class Object