es.ree.eemws.kit.gui.applications.browser.StatusBar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eemws-kit Show documentation
Show all versions of eemws-kit Show documentation
Client implementation of IEC 62325-504 technical specification. eemws-kit includes command line utilities to invoke the eem web services, as well as several GUI applications (browser, editor, ...)
The newest version!
/*
* Copyright 2024 Redeia.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3 of the license.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTIBIILTY or FITNESS FOR A PARTICULAR PURPOSE. See GNU Lesser General
* Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, see
* http://www.gnu.org/licenses/.
*
* Any redistribution and/or modification of this program has to make
* reference to Redeia as the copyright owner of the program.
*/
package es.ree.eemws.kit.gui.applications.browser;
import java.awt.BorderLayout;
import java.io.Serializable;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EtchedBorder;
import es.ree.eemws.kit.gui.common.Constants;
/**
* Simple status bar.
*
* @author Redeia.
* @version 2.1 01/01/2024
*
*/
public final class StatusBar implements Serializable {
/** Serial version UID. */
private static final long serialVersionUID = 1L;
/** Default text for status bar. */
private static final String DEFAULT_STATUS = MessageCatalog.BROWSER_STATUS_READY.getMessage();
/** Label containing current status text. */
private JLabel lblStatus = null;
/**
* Returns status bar panel.
*
* @return status bar panel.
*/
public JPanel getPanel() {
lblStatus = new JLabel();
lblStatus.setHorizontalAlignment(SwingConstants.LEFT);
lblStatus.setFont(Constants.FONT_STYLE);
var pnlStatus = new JPanel();
pnlStatus.setBorder(new EtchedBorder());
pnlStatus.setLayout(new BorderLayout());
pnlStatus.add(lblStatus, BorderLayout.WEST);
setStatus(DEFAULT_STATUS);
return pnlStatus;
}
/**
* Displays on bar the status passed as parameter.
*
* @param status Status text.
*/
public void setStatus(final String status) {
lblStatus.setText(" " + status); //$NON-NLS-1$
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy