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.

    Input/output:
    - accepts:
       adams.db.LogEntry


    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.
        default: 
     
    -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 
        name.
     
    -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
     
    Version:
    $Revision$
    Author:
    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.
        Parameters:
        value - the dialog
      • dialogTipText

        public String dialogTipText()
        Returns the tip text for this property.
        Returns:
        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.
        Overrides:
        getDefaultWidth in class AbstractDisplay
        Returns:
        the default width
      • getDefaultHeight

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

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        adams.db.LogEntry.class
      • displayMessage

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

        protected BaseFileChooser getBaseFileChooser()
        Returns (and initializes if necessary) the file chooser.
        Returns:
        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
        Parameters:
        token - the token to display
      • cleanUpGUI

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