Class ConsolePanel

    • Field Detail

      • m_Properties

        protected static Properties m_Properties
        the properties.
      • m_Singleton

        protected static ConsolePanel m_Singleton
        the singleton.
      • m_TabbedPane

        protected BaseTabbedPane m_TabbedPane
        the tabbed pane for the various outputs.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar.
      • m_MenuItemSaveAs

        protected JMenuItem m_MenuItemSaveAs
        the save as item.
      • m_MenuItemExit

        protected JMenuItem m_MenuItemExit
        the close item.
      • m_MenuItemCopy

        protected JMenuItem m_MenuItemCopy
        the copy item.
      • m_MenuItemClear

        protected JMenuItem m_MenuItemClear
        the clear item.
      • m_MenuItemClearAll

        protected JMenuItem m_MenuItemClearAll
        the clear all item.
      • m_MenuItemFind

        protected JMenuItem m_MenuItemFind
        the find item.
      • m_MenuItemFindNext

        protected JMenuItem m_MenuItemFindNext
        the find next item.
    • Constructor Detail

      • ConsolePanel

        protected ConsolePanel()
        Initializes the panel.
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initializeLogging

        protected void initializeLogging()
        Initializes the logging.
        See FileHandler.ADAMS_LOGFILE_PREFIX for injecting prefix to log file via environment variable.
      • initGUI

        protected void initGUI()
        Initializes the GUI.
        Overrides:
        initGUI in class BasePanel
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface MenuBarProvider
        Returns:
        the menu bar
      • getCurrentPanel

        public ConsolePanel.OutputPanel getCurrentPanel()
        Returns the current output panel.
        Returns:
        the panel, null if none available
      • addListener

        public void addListener​(ConsolePanelListener l)
        Adds the listener.
        Parameters:
        l - the listener to add
      • removeListener

        public void removeListener​(ConsolePanelListener l)
        Removes the listener.
        Parameters:
        l - the listener to remove
      • notifyListeners

        protected void notifyListeners​(LoggingLevel level,
                                       String msg)
        Notifies the listeners.
        Parameters:
        level - the logging level of output the string represents
        msg - the message to append
      • append

        public void append​(String msg,
                           Throwable t)
        Convenience method for outputting exceptions.
        Parameters:
        msg - the message to precede the stacktrace
        t - the exception (stacktrace will be output)
      • append

        public void append​(Object source,
                           String msg,
                           Throwable t)
        Convenience method for outputting exceptions.
        Parameters:
        source - the source object
        msg - the message to precede the stacktrace
        t - the exception (stacktrace will be output)
      • append

        public void append​(Object source,
                           LoggingLevel level,
                           String msg)
        Convenience method for outputting exceptions.
        Parameters:
        source - the source object
        level - the logging level
        msg - the message to precede the stacktrace
      • append

        public void append​(LoggingLevel level,
                           String msg)
        Appends the given string to the according panels.
        Parameters:
        level - the logging level
        msg - the message to append
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface SendToActionSupporter
        Parameters:
        cls - the requested classes
        Returns:
        true if an object is available for sending
      • getProperties

        public static Properties getProperties()
        Returns the syntax style definition.
        Returns:
        the props file with the definitions
      • levelToColor

        public static Color levelToColor​(LoggingLevel level)
        Turns the logging level into a color.
        Parameters:
        level - the level
        Returns:
        the associated color
      • levelToColor

        public static Color levelToColor​(Level level)
        Turns the logging level into a color.
        Parameters:
        level - the level
        Returns:
        the associated color
      • getSingleton

        public static ConsolePanel getSingleton()
        Returns the singleton instance.
        Returns:
        the singleton