Ajout d'une statusbar
This commit is contained in:
50
AppThinker/src/AppThinkerStatusbar.java
Normal file
50
AppThinker/src/AppThinkerStatusbar.java
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import javax.swing.*;
|
||||||
|
import javax.swing.border.BevelBorder;
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
public class AppThinkerStatusbar extends JPanel {
|
||||||
|
/**
|
||||||
|
* Constructeur de la classe AppThinkerStatusbar
|
||||||
|
* @author V.BOULANGER
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user