weka.knowledgeflow.steps

## Class StripChart

- java.lang.Object
- - weka.knowledgeflow.steps.BaseStep
  - - weka.knowledgeflow.steps.StripChart

- All Implemented Interfaces:
    java.io.Serializable, BaseStepExtender, Step

      @KFStep(name="StripChart",
              category="Visualization",
              toolTipText="Plot streaming data",
              iconPath="weka/gui/knowledgeflow/icons/StripChart.gif")
      public class StripChart
      extends BaseStep

  A step that can display a viewer showing a right-to-left scrolling chart for streaming data
  Version:
    $Revision: $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `StripChart.PlotNotificationListener` StripChartInteractiveView implements this in order to receive data points.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StripChart()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPlotNotificationListener(StripChart.PlotNotificationListener listener)` Add a plot notification listener
    `java.util.List<java.lang.String>` | `getIncomingConnectionTypes()` Get a list of incoming connection types that this step can accept.
    `java.util.Map<java.lang.String,java.lang.String>` | `getInteractiveViewers()` When running in a graphical execution environment a step can make one or more popup Viewer components available.
    `java.util.List<java.lang.String>` | `getOutgoingConnectionTypes()` Get a list of outgoing connection types that this step can produce.
    `int` | `getRefreshFreq()` Get the refresh frequency
    `int` | `getRefreshWidth()` Get how many pixels to shift the plot by every time a point is plotted
    `int` | `getXLabelFreq()` Get the x label frequency
    `void` | `processIncoming(Data data)` Process an incoming data payload (if the step accepts incoming connections)
    `java.lang.String` | `refreshFreqTipText()` GUI Tip text
    `java.lang.String` | `refreshWidthTipText()` GUI Tip text
    `void` | `removePlotNotificationListener(StripChart.PlotNotificationListener l)` Remove a plot notification listener
    `void` | `setRefreshFreq(int freq)` Set how often (in x axis points) to refresh the display
    `void` | `setRefreshWidth(int width)` Set how many pixels to shift the plot by every time a point is plotted
    `void` | `setXLabelFreq(int freq)` Set the x label frequency
    `void` | `stepInit()` Initialize the step.
    `java.lang.String` | `xLabelFreqTipText()` GUI Tip text

    - ### Methods inherited from class weka.knowledgeflow.steps.BaseStep

      `environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, start, stop`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StripChart

          public StripChart()

  - ### Method Detail

    - #### xLabelFreqTipText

          public java.lang.String xLabelFreqTipText()

      GUI Tip text
      Returns:
        the tip text for this option

    - #### getXLabelFreq

          public int getXLabelFreq()

      Get the x label frequency
      Returns:
        the x label frequency

    - #### setXLabelFreq

          public void setXLabelFreq(int freq)

      Set the x label frequency
      Parameters:
        `freq` - the x label frequency

    - #### refreshFreqTipText

          public java.lang.String refreshFreqTipText()

      GUI Tip text
      Returns:
        a `String` value

    - #### setRefreshFreq

          public void setRefreshFreq(int freq)

      Set how often (in x axis points) to refresh the display
      Parameters:
        `freq` - an `int` value

    - #### getRefreshFreq

          public int getRefreshFreq()

      Get the refresh frequency
      Returns:
        an `int` value

    - #### refreshWidthTipText

          public java.lang.String refreshWidthTipText()

      GUI Tip text
      Returns:
        a `String` value

    - #### setRefreshWidth

          public void setRefreshWidth(int width)

      Set how many pixels to shift the plot by every time a point is plotted
      Parameters:
        `width` - the number of pixels to shift the plot by

    - #### getRefreshWidth

          public int getRefreshWidth()

      Get how many pixels to shift the plot by every time a point is plotted
      Returns:
        the number of pixels to shift the plot by

    - #### stepInit

          public void stepInit()
                        throws WekaException

      Description copied from interface: `Step`
      Initialize the step.
      Throws:
        `WekaException` - if a problem occurs during initialization

    - #### processIncoming

          public void processIncoming(Data data)
                               throws WekaException

      Process an incoming data payload (if the step accepts incoming connections)
      Specified by:
        `processIncoming` in interface `BaseStepExtender`
      Specified by:
        `processIncoming` in interface `Step`
      Overrides:
        `processIncoming` in class `BaseStep`
      Parameters:
        `data` - the data to process
      Throws:
        `WekaException` - if a problem occurs

    - #### getIncomingConnectionTypes

          public java.util.List<java.lang.String> getIncomingConnectionTypes()

      Get a list of incoming connection types that this step can accept. Ideally (and if appropriate), this should take into account the state of the step and any existing incoming connections. E.g. a step might be able to accept one (and only one) incoming batch data connection.
      Returns:
        a list of incoming connections that this step can accept given its current state

    - #### addPlotNotificationListener

          public void addPlotNotificationListener(StripChart.PlotNotificationListener listener)

      Add a plot notification listener
      Parameters:
        `listener` - the listener to be notified

    - #### removePlotNotificationListener

          public void removePlotNotificationListener(StripChart.PlotNotificationListener l)

      Remove a plot notification listener
      Parameters:
        `l` - the listener to remove

    - #### getOutgoingConnectionTypes

          public java.util.List<java.lang.String> getOutgoingConnectionTypes()

      Get a list of outgoing connection types that this step can produce. Ideally (and if appropriate), this should take into account the state of the step and the incoming connections. E.g. depending on what incoming connection is present, a step might be able to produce a trainingSet output, a testSet output or neither, but not both.
      Returns:
        a list of outgoing connections that this step can produce

    - #### getInteractiveViewers

          public java.util.Map<java.lang.String,java.lang.String> getInteractiveViewers()

      When running in a graphical execution environment a step can make one or more popup Viewer components available. These might be used to display results, graphics etc. Returning null indicates that the step has no such additional graphical views. The map returned by this method should be keyed by action name (e.g. "View results"), and values should be fully qualified names of the corresponding StepInteractiveView implementation. Furthermore, the contents of this map can (and should) be dependent on whether a particular viewer should be made available - i.e. if execution hasn't occurred yet, or if a particular incoming connection type is not present, then it might not be possible to view certain results. Viewers can implement StepInteractiveView directly (in which case they need to extends JPanel), or extends the AbstractInteractiveViewer class. The later extends JPanel, uses a BorderLayout, provides a "Close" button and a method to add additional buttons.
      Specified by:
        `getInteractiveViewers` in interface `Step`
      Overrides:
        `getInteractiveViewers` in class `BaseStep`
      Returns:
        a map of viewer component names, or null if this step has no graphical views