Class BrolStatusBar

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.jdesktop.swingx.JXStatusBar
be.gaudry.swing.component.statusbar.BrolStatusBar
All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener

public class BrolStatusBar extends org.jdesktop.swingx.JXStatusBar implements PropertyChangeListener
Custom status bar for the Swing applications which interacts with the ShowPanelController Provided by the broldev.core.swing project.
Since:
1.0 (Jan 7, 2009), broldev.core.swing 0.0.1-SNAPSHOT dependency
Version:
1.0 (Jan 7, 2009)
Author:
Steph GAUDRY
See Also:
Serialized Form
  • Field Details

    • progressStr

      protected String progressStr
  • Constructor Details

    • BrolStatusBar

      public BrolStatusBar()
      Builds a default status bar with a memory monitor, and a dump named "BrolDev"
    • BrolStatusBar

      public BrolStatusBar(String appName)
      Builds a status bar with a memory monitor, and a named dump
      Parameters:
      appName - application name for the dump
    • BrolStatusBar

      public BrolStatusBar(String appName, boolean showMonitor)
      Builds a status bar with or without a memory monitor, and a named dump
      Parameters:
      appName - application name for the dump
      showMonitor - true to show a memory monitor
      See Also:
      getAppName()
  • Method Details

    • adaptTheme

      public void adaptTheme()
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • getBrolDump

      public BrolDump getBrolDump()
      Returns:
      the BrolDump to start
    • setMonitor

      public void setMonitor(AutoLocalizedAction action)
      Sets the action to perform on the "Show graphical monitor" popup for the memory monitor bar.
      Parameters:
      action - new action to display a graphical monitor
    • isMonitorRequested

      public boolean isMonitorRequested()
      Allows to know if the memory monitor is requested or not.
      Returns:
      true if the monitor is requested
    • getAppName

      public String getAppName()
      Returns the application name used to dump, and displayed into the status bar
      Returns:
      the application name
    • setAppName

      public void setAppName(String appName)
      Parameters:
      appName - the application name to set
      See Also:
      getAppName()
    • setBusy

      public void setBusy(boolean busy)
      Sets the status to busy or not. This will shown or hide a progress GUI component.
      Parameters:
      busy - true to set on the busy status
    • addMessage

      public void addMessage(String message)
      Displays a message into the status bar and adds the message into the log.
      Parameters:
      message - message to add
    • addMessage

      public void addMessage(String format, Object... args)
      Adds a message as formatted string using the specified format string and arguments. \nThe locale always used is the one returned by Locale.getDefault().
      Parameters:
      format - A format string
      args - Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by the Java Virtual Machine Specification. The behavior on a null argument depends on the conversion.
      See Also:
      addMessage(String)
    • setViewName

      public void setViewName(String viewName)
      Displays the current view name in the status bar and adds the message into the log.
      Parameters:
      viewName - name of the current view
    • getShowMessagesAction

      public AbstractAction getShowMessagesAction()
      Returns an action to show a console with the applications messages log.
      Returns:
      the action to show the messages
    • setLanguage

      void setLanguage()
    • addProgressRedult

      public void addProgressRedult(ProgressResult progressResult)
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener