Module org.jcommon

Class JMemoryStateBar

    • Field Detail

      • COMMAND_GARBAGE

        public static final String COMMAND_GARBAGE
        The command used to trigger garbage collecting.
        See Also:
        Constant Field Values
      • COMMAND_ACTIVE

        public static final String COMMAND_ACTIVE
        The command used to activate the memory state bar.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JMemoryStateBar

        public JMemoryStateBar()
        Construct a new default memory monitor
    • Method Detail

      • initGUI

        protected void initGUI()
        Init the GUI component of the memory monitor
      • startMonitor

        public void startMonitor()
        Start the monitoring of the Java Runtime memory. The components of the state bar are updated by a thread at the frequency given by the refresh delay.
        See Also:
        stopMonitor(), setRefreshDelay(long), getRefreshDelay()
      • stopMonitor

        public void stopMonitor()
        Stop the monitoring of the Java Runtime memory. The monitoring thread is sopped and the components are no more updated.
        See Also:
        startMonitor()
      • setRefreshDelay

        public void setRefreshDelay​(long delay)
        Get the delay of time in milliseconds between two refreshes of the memory state bar.
        Parameters:
        delay - the delay of time.
        See Also:
        getRefreshDelay()
      • getRefreshDelay

        public long getRefreshDelay()
        Set the delay of time in milliseconds between two refreshes of the memory state bar.
        Returns:
        the delay of time.
        See Also:
        getRefreshDelay()
      • getGarbageIcon

        public Icon getGarbageIcon()
        Get the icon displayed on the garbage button.
        Returns:
        the icon used on the garbage button.
      • setGarbageIcon

        public void setGarbageIcon​(Icon icon)
        Set the icon displayed on the garbage button.
        Parameters:
        icon - the icon used on the garbage button.
      • getActiveIcon

        public Icon getActiveIcon()
        Get the active icon.
        Returns:
        the active icon.
      • setActiveIcon

        public void setActiveIcon​(Icon icon)
        Set the active icon.
        Parameters:
        icon - the active icon
      • getInactiveIcon

        public Icon getInactiveIcon()
        Get the inactive icon
        Returns:
        the inactive icon
      • setInactiveIcon

        public void setInactiveIcon​(Icon icon)
        Set the inactive icon
        Parameters:
        icon - the inactive icon