Ajout de la barre menu
@@ -1,3 +1,5 @@
|
|||||||
|
import javax.swing.*;
|
||||||
|
|
||||||
public class AppThinker {
|
public class AppThinker {
|
||||||
//JavaDoc tags : @param @return @throws @author @version @see @since @serial @deprecated
|
//JavaDoc tags : @param @return @throws @author @version @see @since @serial @deprecated
|
||||||
|
|
||||||
|
|||||||
75
AppThinker/src/AppThinkerMenuBar.java
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
public class AppThinkerMenuBar extends JMenuBar {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructeur de la classe AppThinkerMenuBar
|
||||||
|
* @author V.BOULANGER
|
||||||
|
*/
|
||||||
|
public AppThinkerMenuBar(){
|
||||||
|
|
||||||
|
//Création de la barre menu
|
||||||
|
JMenu fileMenu = new JMenu("Fichier");
|
||||||
|
fileMenu.setMnemonic( 'F' );
|
||||||
|
|
||||||
|
JMenuItem newProject = new JMenuItem("Nouveau projet");
|
||||||
|
newProject.setIcon(new ImageIcon(getClass().getResource("img/x16/newProject.png")));
|
||||||
|
fileMenu.add(newProject);
|
||||||
|
|
||||||
|
JMenuItem openProject = new JMenuItem("Ouvrir un projet existant");
|
||||||
|
openProject.setIcon(new ImageIcon(getClass().getResource("img/x16/openProject.png")));
|
||||||
|
fileMenu.add(openProject);
|
||||||
|
JMenuItem saveProject = new JMenuItem("Sauvegarder le projet");
|
||||||
|
saveProject.setIcon(new ImageIcon(getClass().getResource("img/x16/saveProject.png")));
|
||||||
|
fileMenu.add(saveProject);
|
||||||
|
JMenuItem saveAsProject = new JMenuItem("Sauvegarder le projet sous...");
|
||||||
|
saveAsProject.setIcon(new ImageIcon(getClass().getResource("img/x16/saveAsProject.png")));
|
||||||
|
fileMenu.add(saveAsProject);
|
||||||
|
JMenuItem quitMenu = new JMenuItem("Quitter");
|
||||||
|
quitMenu.setIcon(new ImageIcon(getClass().getResource("img/x16/quit.png")));
|
||||||
|
fileMenu.add(quitMenu);
|
||||||
|
|
||||||
|
this.add(fileMenu);
|
||||||
|
|
||||||
|
JMenu projectMenu = new JMenu("Projet");
|
||||||
|
projectMenu.setMnemonic( 'P' );
|
||||||
|
|
||||||
|
JMenuItem newClass = new JMenuItem("Nouvelle classe");
|
||||||
|
newClass.setIcon(new ImageIcon(getClass().getResource("img/x16/newClass.png")));
|
||||||
|
projectMenu.add(newClass);
|
||||||
|
JMenuItem newAssociation = new JMenuItem("Nouvelle association");
|
||||||
|
newAssociation.setIcon(new ImageIcon(getClass().getResource("img/x16/newAssociation.png")));
|
||||||
|
projectMenu.add(newAssociation);
|
||||||
|
JMenuItem newLink = new JMenuItem("Nouveau lien");
|
||||||
|
newLink.setIcon(new ImageIcon(getClass().getResource("img/x16/newLink.png")));
|
||||||
|
projectMenu.add(newLink);
|
||||||
|
JMenuItem editElement = new JMenuItem("Éditer");
|
||||||
|
editElement.setIcon(new ImageIcon(getClass().getResource("img/x16/edit.png")));
|
||||||
|
projectMenu.add(editElement);
|
||||||
|
JMenuItem deleteElement = new JMenuItem("Supprimer");
|
||||||
|
deleteElement.setIcon(new ImageIcon(getClass().getResource("img/x16/delete.png")));
|
||||||
|
projectMenu.add(deleteElement);
|
||||||
|
JMenuItem projectOptions = new JMenuItem("Options du projet");
|
||||||
|
projectOptions.setIcon(new ImageIcon(getClass().getResource("img/x16/settings.png")));
|
||||||
|
projectMenu.add(projectOptions);
|
||||||
|
|
||||||
|
this.add(projectMenu);
|
||||||
|
|
||||||
|
JMenu appMenu = new JMenu("AppThinker");
|
||||||
|
appMenu.setMnemonic( 'A' );
|
||||||
|
|
||||||
|
JMenuItem appSettings = new JMenuItem("Paramètres");
|
||||||
|
appSettings.setIcon(new ImageIcon(getClass().getResource("img/x16/settings.png")));
|
||||||
|
appMenu.add(appSettings);
|
||||||
|
JMenuItem appInfos = new JMenuItem("Informations");
|
||||||
|
appInfos.setIcon(new ImageIcon(getClass().getResource("img/x16/info.png")));
|
||||||
|
appMenu.add(appInfos);
|
||||||
|
JMenuItem appChangelog = new JMenuItem("Nouveautés");
|
||||||
|
appChangelog.setIcon(new ImageIcon(getClass().getResource("img/x16/news.png")));
|
||||||
|
appMenu.add(appChangelog);
|
||||||
|
|
||||||
|
this.add(appMenu);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ public class AppThinkerWindow extends JFrame {
|
|||||||
* @author V.BOULANGER
|
* @author V.BOULANGER
|
||||||
*/
|
*/
|
||||||
public AppThinkerWindow(){
|
public AppThinkerWindow(){
|
||||||
|
//Paramétrage de la fenêtre
|
||||||
this.setTitle("AppThinker");
|
this.setTitle("AppThinker");
|
||||||
this.setExtendedState(JFrame.MAXIMIZED_BOTH);
|
this.setExtendedState(JFrame.MAXIMIZED_BOTH);
|
||||||
Image img = null;
|
Image img = null;
|
||||||
@@ -18,6 +19,9 @@ public class AppThinkerWindow extends JFrame {
|
|||||||
this.setLocation(0, 0);
|
this.setLocation(0, 0);
|
||||||
this.setSize(500, 500);
|
this.setSize(500, 500);
|
||||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
}
|
|
||||||
|
|
||||||
|
//Ajout du menu à la fenêtre
|
||||||
|
AppThinkerMenuBar menu = new AppThinkerMenuBar();
|
||||||
|
this.setJMenuBar(menu);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2011
AppThinker/src/img/work/infos.ai
Normal file
1900
AppThinker/src/img/work/news.ai
Normal file
2001
AppThinker/src/img/work/quit.ai
Normal file
1910
AppThinker/src/img/work/settings.ai
Normal file
BIN
AppThinker/src/img/x16/delete.png
Normal file
|
After Width: | Height: | Size: 279 B |
BIN
AppThinker/src/img/x16/edit.png
Normal file
|
After Width: | Height: | Size: 316 B |
BIN
AppThinker/src/img/x16/info.png
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
AppThinker/src/img/x16/newAssociation.png
Normal file
|
After Width: | Height: | Size: 268 B |
BIN
AppThinker/src/img/x16/newClass.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
AppThinker/src/img/x16/newLink.png
Normal file
|
After Width: | Height: | Size: 315 B |
BIN
AppThinker/src/img/x16/newProject.png
Normal file
|
After Width: | Height: | Size: 288 B |
BIN
AppThinker/src/img/x16/news.png
Normal file
|
After Width: | Height: | Size: 373 B |
BIN
AppThinker/src/img/x16/openProject.png
Normal file
|
After Width: | Height: | Size: 332 B |
BIN
AppThinker/src/img/x16/quit.png
Normal file
|
After Width: | Height: | Size: 263 B |
BIN
AppThinker/src/img/x16/saveAsProject.png
Normal file
|
After Width: | Height: | Size: 423 B |
BIN
AppThinker/src/img/x16/saveProject.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
AppThinker/src/img/x16/settings.png
Normal file
|
After Width: | Height: | Size: 355 B |