org.jorigin.gui.JMemoryStateBar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jcommon Show documentation
Show all versions of jcommon Show documentation
A java common package that enable to deal with various functionalities
/*
This file is part of JOrigin Common Library.
JOrigin Common is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
JOrigin Common is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JOrigin Common. If not, see .
*/
package org.jorigin.gui;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JToggleButton;
import javax.swing.SwingWorker;
import org.jorigin.Common;
/**
* This class represents a simple widget dedicated to the monitoring of the available Java Runtime memory.
* The memory state bar is a {@link javax.swing.JPanel} standalone component that can be embedded into other components.
* @author Julien Seinturier - COMEX S.A. - [email protected] - https://github.com/jorigin/jeometry
* @version {@value Common#version} - b{@value Common#BUILD}
* @since 1.0.0
*/
public class JMemoryStateBar extends JPanel{
private static final long serialVersionUID = Common.BUILD;
/**
* The command used to trigger garbage collecting.
*/
public static final String COMMAND_GARBAGE = "commandGarbage";
/**
* The command used to activate the memory state bar.
*/
public static final String COMMAND_ACTIVE = "commandActive";
private JProgressBar memoryStateBar = null;
private JButton memoryGarbageCollectorButton = null;
private JToggleButton memoryMonitorActivateButton = null;
private SwingWorker
© 2015 - 2024 Weber Informatics LLC | Privacy Policy