Class ProbabilityPlotDisplay

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ClearableDisplay, DisplayTypeSupporter, ErrorHandler, InputConsumer, ComponentSupplier, DisplayPanelProvider, MenuBarProvider, SendToActionSupporter, Serializable, Comparable

    public class ProbabilityPlotDisplay
    extends AbstractGraphicalDisplay
    implements DisplayPanelProvider
    Actor for displaying a probability plot

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to
        the console (0 = off).
        default: 0
        minimum: 0
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: ProbabilityPlotDisplay
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
    -width <int> (property: width)
        The width of the dialog.
        default: 900
        minimum: 1
    -height <int> (property: height)
        The height of the dialog.
        default: 600
        minimum: 1
    -x <int> (property: x)
        The X position of the dialog (>=0: absolute, -1: left, -2: center, -3: right
        default: -1
        minimum: -3
    -y <int> (property: y)
        The Y position of the dialog (>=0: absolute, -1: top, -2: center, -3: bottom
        default: -1
        minimum: -3
    -writer <adams.gui.print.JComponentWriter> (property: writer)
        The writer to use for generating the graphics output.
        default: adams.gui.print.NullWriter
    -regression <adams.gui.visualization.stats.paintlet.AbstractProbabilityPaintlet> (property: regression)
        Regression to display
        default: adams.gui.visualization.stats.paintlet.Normal
    -grid (property: grid)
        Display a grid overlay
    -regression-line (property: regressionLine)
        Display a best fit line overlay
    -attribute-name <adams.core.base.BaseRegExp> (property: attributeName)
        Name of attribute to display, used if set,otherwise the index is used
    -attribute <java.lang.String> (property: attribute)
        Set the attribute to display using an index, used only if regular expression
        not set
        default: last
    See Also:
    Serialized Form
    • Field Detail

      • m_Grid

        protected boolean m_Grid
        Whether a grid overlay is drawn
      • m_Regression

        protected boolean m_Regression
        Whether a best regression line is drawn
      • m_Att

        protected BaseRegExp m_Att
        name of attribute to display
      • m_AttIndex

        protected String m_AttIndex
        Index of attribute to display
    • Constructor Detail

      • ProbabilityPlotDisplay

        public ProbabilityPlotDisplay()
    • Method Detail

      • accepts

        public Class[] accepts()
        Description copied from interface: InputConsumer
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        the Class of objects that can be processed
      • display

        protected void display​(Token token)
        Description copied from class: AbstractDisplay
        Displays the token (the panel and dialog have already been created at this stage).
        Specified by:
        display in class AbstractDisplay
        token - the token to display
      • setAttribute

        public void setAttribute​(String val)
        Set the string to use for setting the attribute using an index
        val - String for the attribute index
      • getAttribute

        public String getAttribute()
        Get the string used to set the attribute using an index
        String for the index
      • attributeTipText

        public String attributeTipText()
        return a tip text for the attribute index property
        tip text for the property
      • setAttributeName

        public void setAttributeName​(BaseRegExp val)
        Set the attribute to use with a regular expression
        val - String for regular expression
      • getAttributeName

        public BaseRegExp getAttributeName()
        Get the string to set the attribute using a regular expression
        String for regular expression
      • attributeNameTipText

        public String attributeNameTipText()
        Return a tip text for the attribute name property
        tip text for the property
      • setGrid

        public void setGrid​(boolean val)
        Set whether a grid overlay is added
        val - true if grid overlay drawn
      • getGrid

        public boolean getGrid()
        Get whether a grid overlay should be added
        True if grid is to be added
      • gridTipText

        public String gridTipText()
        Tip text for the grid property
        String describing the property
      • setRegressionLine

        public void setRegressionLine​(boolean val)
        Set whether a regression line overlay should be added
        val - True if regression line added
      • getRegressionLine

        public boolean getRegressionLine()
        Get whether a regression line should be added
        true if regression line should be added
      • regressionLineTipText

        public String regressionLineTipText()
        Tip text for the regression line property
        String describing the property
      • setRegression

        public void setRegression​(AbstractProbabilityPaintlet val)
        Set the regression used to transform the data
        val - Paintlet for the regression
      • getRegression

        public AbstractProbabilityPaintlet getRegression()
        get the regression used to transform the data
        Paintlet used for the regression
      • regressionTipText

        public String regressionTipText()
        Tip text for the regression property
        String describing the property
      • createDisplayPanel

        public DisplayPanel createDisplayPanel​(Token token)
        Creates a new display panel for the token.
        Specified by:
        createDisplayPanel in interface DisplayPanelProvider
        token - the token to display in a new panel, can be null
        the generated panel
      • displayPanelRequiresScrollPane

        public boolean displayPanelRequiresScrollPane()
        Returns whether the created display panel requires a scroll pane or not.
        Specified by:
        displayPanelRequiresScrollPane in interface DisplayPanelProvider
        true if the display panel requires a scroll pane