Class Screenshot

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

    public class Screenshot
    extends AbstractGraphicsGenerator
    Actor that takes screenshots of graphical components.

    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: Screenshot
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
     
    -title <java.lang.String> (property: title)
        The title of the dialog.
        default: Screenshot
     
    -suffix <java.lang.String> (property: suffix)
        An optional suffix for the filename, inserted before the extension.
        default:
     
    -width <int> (property: width)
        The width of the dialog.
        default: 800
     
    -height <int> (property: height)
        The height of the dialog.
        default: 600
     
    -output <adams.core.io.PlaceholderFile> (property: output)
        The output directory.
        default: .
     
    -writer <adams.gui.print.JComponentWriter [options]> (property: writer)
        The writer to use for generating the graphics output.
        default: adams.gui.print.NullWriter
     
    -provider <adams.flow.sink.DisplayPanelProvider [options]> (property: panelProvider)
        The actor for generating the display panels to take a screenshot of.
        default: adams.flow.sink.ClassifierErrors -writer adams.gui.print.NullWriter
     
    -filename-prefix <java.lang.String> (property: filenamePrefix)
        The prefix for the filename in case of auto-generation (no path, just name
        ).
        default: screenshot
     
    -filename-var <java.lang.String> (property: filenameVariable)
        The variable to use for the filename instead of the auto-generated one.
        default:
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • BACKUP_COUNTER

        public static final String BACKUP_COUNTER
        the key for storing the current counter in the backup.
        See Also:
        Constant Field Values
      • m_PanelProvider

        protected DisplayPanelProvider m_PanelProvider
        the actor to use for generating panels.
      • m_FilenamePrefix

        protected String m_FilenamePrefix
        the prefix for the auto-generated filename.
      • m_FilenameVariable

        protected VariableName m_FilenameVariable
        the variable to use as filename.
      • m_Counter

        protected int m_Counter
        the counter for the screenshots.
    • Constructor Detail

      • Screenshot

        public Screenshot()
    • Method Detail

      • reset

        protected void reset()
        Resets the scheme.
        Overrides:
        reset in class AbstractActor
      • outputTipText

        public String outputTipText()
        Returns the tip text for this property.
        Specified by:
        outputTipText in class AbstractGraphicsGenerator
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPanelProvider

        public void setPanelProvider​(DisplayPanelProvider value)
        Sets the panel provider to use for generating the panels.
        Parameters:
        value - the panel provider to use
      • getPanelProvider

        public DisplayPanelProvider getPanelProvider()
        Returns the panel provider in use for generating the panels.
        Returns:
        the panel provider in use
      • panelProviderTipText

        public String panelProviderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFilenamePrefix

        public void setFilenamePrefix​(String value)
        Sets the prefix for the filename in case of auto-generation.
        Parameters:
        value - the prefix (just name, no path)
      • getFilenamePrefix

        public String getFilenamePrefix()
        Returns the prefix for the filename in case of auto-generation.
        Returns:
        the panel provider in use
      • filenamePrefixTipText

        public String filenamePrefixTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFilenameVariable

        public void setFilenameVariable​(VariableName value)
        Sets the variable to use for generating the filename instead of the auto-generated one.
        Parameters:
        value - the variable name (without the @{ and })
      • getFilenameVariable

        public VariableName getFilenameVariable()
        Returns the variable to use for generating the filename instead of the auto-generated one.
        Returns:
        the panel provider in use
      • filenameVariableTipText

        public String filenameVariableTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        weka.classifiers.Evaluation.class