Class ChartProgressEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class ChartProgressEvent
    extends java.util.EventObject
    An event that contains information about the drawing progress of a chart.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private JFreeChart chart
      The chart that generated the event.
      static int DRAWING_FINISHED
      Indicates drawing has finished.
      static int DRAWING_STARTED
      Indicates drawing has started.
      private int percent
      The percentage of completion.
      private int type
      The type of event.
      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      ChartProgressEvent​(java.lang.Object source, JFreeChart chart, int type, int percent)
      Creates a new chart change event.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      JFreeChart getChart()
      Returns the chart that generated the change event.
      int getPercent()
      Returns the percentage complete.
      int getType()
      Returns the event type.
      void setChart​(JFreeChart chart)
      Sets the chart that generated the change event.
      void setPercent​(int percent)
      Sets the percentage complete.
      void setType​(int type)
      Sets the event type.
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

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

      • DRAWING_STARTED

        public static final int DRAWING_STARTED
        Indicates drawing has started.
        See Also:
        Constant Field Values
      • DRAWING_FINISHED

        public static final int DRAWING_FINISHED
        Indicates drawing has finished.
        See Also:
        Constant Field Values
      • type

        private int type
        The type of event.
      • percent

        private int percent
        The percentage of completion.
      • chart

        private JFreeChart chart
        The chart that generated the event.
    • Constructor Detail

      • ChartProgressEvent

        public ChartProgressEvent​(java.lang.Object source,
                                  JFreeChart chart,
                                  int type,
                                  int percent)
        Creates a new chart change event.
        Parameters:
        source - the source of the event (could be the chart, a title, an axis etc.)
        chart - the chart that generated the event.
        type - the type of event.
        percent - the percentage of completion.
    • Method Detail

      • getChart

        public JFreeChart getChart()
        Returns the chart that generated the change event.
        Returns:
        The chart that generated the change event.
      • setChart

        public void setChart​(JFreeChart chart)
        Sets the chart that generated the change event.
        Parameters:
        chart - the chart that generated the event.
      • getType

        public int getType()
        Returns the event type.
        Returns:
        The event type.
      • setType

        public void setType​(int type)
        Sets the event type.
        Parameters:
        type - the event type.
      • getPercent

        public int getPercent()
        Returns the percentage complete.
        Returns:
        The percentage complete.
      • setPercent

        public void setPercent​(int percent)
        Sets the percentage complete.
        Parameters:
        percent - the percentage.