Class LogViewer

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

    public class LogViewer
    extends AbstractDisplay
    Actor that displays LogEntry objects, but doesn't store them in the database.

    - accepts:

    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: LogViewer
    -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.
    -short-title (property: shortTitle)
        If enabled uses just the name for the title instead of the actor's full 
    -width <int> (property: width)
        The width of the dialog.
        default: 600
        minimum: 1
    -height <int> (property: height)
        The height of the dialog.
        default: 400
        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
    -dialog <adams.flow.sink.logview.AbstractLogEntryDialog> (property: dialog)
        The dialog to use for displaying the log entries.
        default: adams.flow.sink.logview.DefaultLogEntryDialog
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_ButtonDisplay

        protected BaseButton m_ButtonDisplay
        the button for displaying the message details.
      • m_ButtonSave

        protected BaseButton m_ButtonSave
        the button for saving the selected entries (or all if none selected).
      • m_BaseFileChooser

        protected transient BaseFileChooser m_BaseFileChooser
        the base file chooser for saving the log entries.
    • Constructor Detail

      • LogViewer

        public LogViewer()
    • Method Detail

      • setDialog

        public void setDialog​(AbstractLogEntryDialog value)
        Sets the dialog to use.
        value - the dialog
      • dialogTipText

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

        protected int getDefaultWidth()
        Returns the default width for the dialog.
        getDefaultWidth in class AbstractDisplay
        the default width
      • getDefaultHeight

        protected int getDefaultHeight()
        Returns the default height for the dialog.
        getDefaultHeight in class AbstractDisplay
        the default height
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
      • displayMessage

        protected void displayMessage​(LogEntry entry)
        Displays the message of the given entry in a separate window.
        entry - the entry to display
      • getBaseFileChooser

        protected BaseFileChooser getBaseFileChooser()
        Returns (and initializes if necessary) the file chooser.
        the file chooser
      • display

        protected void display​(Token token)
        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
      • cleanUpGUI

        protected void cleanUpGUI()
        Removes all graphical components.
        cleanUpGUI in class AbstractDisplay