2020-11-21 19:47:38 +01:00
|
|
|
import javax.swing.*;
|
|
|
|
|
import javax.swing.border.BevelBorder;
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
2020-11-22 15:55:26 +01:00
|
|
|
/**
|
|
|
|
|
* Affiche une barre de statut au pied de la fenêtre
|
|
|
|
|
* @author V.BOULANGER
|
|
|
|
|
*/
|
2020-11-21 19:47:38 +01:00
|
|
|
public class AppThinkerStatusbar extends JPanel {
|
|
|
|
|
/**
|
|
|
|
|
* Constructeur de la classe AppThinkerStatusbar
|
|
|
|
|
*/
|
|
|
|
|
public AppThinkerStatusbar(){
|
|
|
|
|
//Création de la statusBar
|
|
|
|
|
this.setBorder(new BevelBorder(BevelBorder.LOWERED));
|
|
|
|
|
this.setLayout(new GridLayout(1,3));
|
|
|
|
|
|
|
|
|
|
JLabel statusLabel = new JLabel("Prêt");
|
|
|
|
|
this.add(statusLabel);
|
|
|
|
|
|
|
|
|
|
JPanel actionBar = new JPanel();
|
|
|
|
|
|
|
|
|
|
JLabel posXLabel = new JLabel("PX : 0 | ");
|
|
|
|
|
actionBar.add(posXLabel);
|
|
|
|
|
JLabel posYLabel = new JLabel("PY : 0 | ");
|
|
|
|
|
actionBar.add(posYLabel);
|
|
|
|
|
JLabel sizeXLabel = new JLabel("SX : 0 | ");
|
|
|
|
|
actionBar.add(sizeXLabel);
|
|
|
|
|
JLabel sizeYLabel = new JLabel("SY : 0");
|
|
|
|
|
actionBar.add(sizeYLabel);
|
|
|
|
|
JButton editActionBtn = new JButton();
|
|
|
|
|
editActionBtn.setIcon(new ImageIcon(getClass().getResource("img/x16/edit.png")));
|
|
|
|
|
editActionBtn.setToolTipText("Éditer l'élément sélectionné.");
|
|
|
|
|
editActionBtn.setOpaque(false);
|
|
|
|
|
editActionBtn.setContentAreaFilled(false);
|
|
|
|
|
editActionBtn.setBorderPainted(false);
|
|
|
|
|
actionBar.add(editActionBtn);
|
|
|
|
|
JButton deleteActionBtn = new JButton();
|
|
|
|
|
deleteActionBtn.setIcon(new ImageIcon(getClass().getResource("img/x16/delete.png")));
|
|
|
|
|
deleteActionBtn.setToolTipText("Supprimer l'élément sélectionné.");
|
|
|
|
|
deleteActionBtn.setOpaque(false);
|
|
|
|
|
deleteActionBtn.setContentAreaFilled(false);
|
|
|
|
|
deleteActionBtn.setBorderPainted(false);
|
|
|
|
|
actionBar.add(deleteActionBtn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.add(actionBar);
|
|
|
|
|
|
|
|
|
|
JLabel fileLabel = new JLabel("Aucun projet ouvert");
|
|
|
|
|
fileLabel.setHorizontalAlignment(JLabel.RIGHT);
|
|
|
|
|
this.add(fileLabel);
|
|
|
|
|
}
|
|
|
|
|
}
|