Class ThermometerGraph.Segment

  • Enclosing class:
    ThermometerGraph

    public class ThermometerGraph.Segment
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Segment​(java.lang.String label, double portion, java.awt.Color color)
      Construct a graph segment with the given label, proportion and color
      Segment​(java.lang.String label, double portion, java.awt.Color color, java.lang.Object target)
      Construct a graph segment with the given label, proportion, color and target
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color getColor()  
      java.lang.String getLabel()  
      java.lang.Object getTarget()  
      double portion()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Segment

        public Segment​(java.lang.String label,
                       double portion,
                       java.awt.Color color)
        Construct a graph segment with the given label, proportion and color
      • Segment

        public Segment​(java.lang.String label,
                       double portion,
                       java.awt.Color color,
                       java.lang.Object target)
        Construct a graph segment with the given label, proportion, color and target
    • Method Detail

      • getTarget

        public java.lang.Object getTarget()
      • getColor

        public java.awt.Color getColor()
      • getLabel

        public java.lang.String getLabel()
      • portion

        public double portion()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object