Class BaseStatusBar

    • Field Detail

      • m_LabelStatusLeft

        protected JLabel m_LabelStatusLeft
        a label for displaying a status.
      • m_MouseListener

        protected MouseListener m_MouseListener
        a mouse listener for displaying the message in a dialog.
      • m_StatusDialogTitle

        protected String m_StatusDialogTitle
        the title for the status dialog.
      • m_DialogSize

        protected Dimension m_DialogSize
        the default dimension for displaying the status.
      • m_StatusLeft

        protected String m_StatusLeft
        the current status (left).
      • m_StatusRight

        protected String m_StatusRight
        the current status (right).
      • m_LabelStatusRight

        protected JLabel m_LabelStatusRight
        the label for the right status.
      • m_ExpiryTimeLeft

        protected int m_ExpiryTimeLeft
        the expiry time in seconds for clearing the left status automatically.
      • m_ExpiryTimeRight

        protected int m_ExpiryTimeRight
        the expiry time in seconds for clearing the right status automatically.
      • m_TimerLeft

        protected Timer m_TimerLeft
        the timer for the left message.
      • m_TimerRight

        protected Timer m_TimerRight
        the timer for the right message.
      • m_ClearTaskLeft

        protected TimerTask m_ClearTaskLeft
        the current timer for the left message.
      • m_ClearTaskRight

        protected TimerTask m_ClearTaskRight
        the current timer for the right message.
    • Constructor Detail

      • BaseStatusBar

        public BaseStatusBar()
    • Method Detail

      • initialize

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

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • clearStatus

        public void clearStatus()
        Removes any status message currently being displayed (left only).
      • clearStatus

        public void clearStatus​(boolean left)
        Removes any status message currently being displayed.
        Parameters:
        left - whether to clear left or right
      • hasStatus

        public boolean hasStatus()
        Returns whether a status is currently being displayed (left).
        Returns:
        true if a status message is being displayed
      • hasStatus

        public boolean hasStatus​(boolean left)
        Returns whether a status is currently being displayed.
        Parameters:
        left - whether to query left or right status
        Returns:
        true if a status message is being displayed
      • setStatus

        public void setStatus​(String msg)
        Displays a message (left).
        Parameters:
        msg - the message to display
      • setStatus

        public void setStatus​(boolean left,
                              String msg)
        Displays a message.
        Parameters:
        left - whether to update left or right status
        msg - the message to display
      • getStatus

        public String getStatus()
        Returns the currently displayed status (left).
        Returns:
        the status, null if none displayed
      • getStatus

        public String getStatus​(boolean left)
        Returns the currently displayed status.
        Parameters:
        left - whether to query left or right status
        Returns:
        the status, null if none displayed
      • showStatus

        public void showStatus​(boolean left,
                               String msg)
        Displays a message. Just an alias for setStatus(boolean, String)
        Parameters:
        left - whether to update left or right status
        msg - the message to display
        See Also:
        setStatus(boolean, String)
      • displayStatus

        protected void displayStatus​(boolean left)
        Displays the status in a dialog.
        Parameters:
        left - whether to display left or right status
      • addMouseListener

        public void addMouseListener​(MouseListener l)
        Adds the mouse listener to the status bar (the JLabel, actually).
        Overrides:
        addMouseListener in class Component
        Parameters:
        l - the listener to add
      • removeMouseListener

        public void removeMouseListener​(MouseListener l)
        Removes the mouse listener from the status bar (the JLabel, actually).
        Overrides:
        removeMouseListener in class Component
        Parameters:
        l - the listener to removes
      • setMouseListenerActive

        public void setMouseListenerActive​(boolean value)
        Sets whether to turn mouse listener on (left only).
        Parameters:
        value - if true then the mouse listener is active
      • isMouseListenerActive

        public boolean isMouseListenerActive()
        Returns whether the mouse listener is active.
        Returns:
        true if the mouse listener is active
      • getPopup

        protected BasePopupMenu getPopup​(boolean left)
        Returns the popup menu for the status (left only).
        Parameters:
        left - whether for left or right label
        Returns:
        the popup menu
      • setStatusDialogTitle

        public void setStatusDialogTitle​(String value)
        Sets the title to use for the dialog when displaying the status bar in a dialog.
        Parameters:
        value - the title, use null for default
      • getStatusDialogTitle

        public String getStatusDialogTitle()
        Returns the currently set title for the status dialog.
        Returns:
        the title
      • setStatusProcessor

        public void setStatusProcessor​(BaseStatusBar.StatusProcessor value)
        Sets the code for processing the status message before displaying it.
        Parameters:
        value - the processor to use, null to turn off
      • getStatusProcessor

        public BaseStatusBar.StatusProcessor getStatusProcessor()
        Returns the code for processing the status message before displaying it.
        Returns:
        the processor in use, null if none set
      • setDialogSize

        public void setDialogSize​(Dimension value)
        Sets the size for the dialog.
        Parameters:
        value - the size to use
      • getDialogSize

        public Dimension getDialogSize()
        Returns the size for the dialog.
        Returns:
        the size in use
      • setPopupMenuCustomizer

        public void setPopupMenuCustomizer​(BaseStatusBar.PopupMenuCustomizer value)
        Sets the popup menu customizer to use.
        Parameters:
        value - the customizer, null to unset
      • getPopupMenuCustomizer

        public BaseStatusBar.PopupMenuCustomizer getPopupMenuCustomizer()
        Returns the current popup customizer in use.
        Returns:
        the customizer, null if none set
      • setExpiryTime

        public void setExpiryTime​(boolean left,
                                  int seconds)
        Sets the expiry time in seconds.
        Parameters:
        left - whether to set the time for the left or right message
        seconds - expiry time in seconds, 0 to turn off expiry
      • getExpiryTime

        public int getExpiryTime​(boolean left)
        Returns the expiry time in seconds.
        Parameters:
        left - whether to return left or right expiry
        Returns:
        the time in seconds, 0 for no expiry