Gestion de la désactivation des boutons de projet + curseur grille
This commit is contained in:
@@ -8,7 +8,11 @@ import java.awt.*;
|
||||
*/
|
||||
public class AppThinkerWindow extends JFrame {
|
||||
private Project _project;
|
||||
|
||||
private AppThinkerMenuBar _menu;
|
||||
private AppThinkerToolbar _toolbar;
|
||||
private AppThinkerGrid _grid;
|
||||
private AppThinkerStatusbar _statusbar;
|
||||
|
||||
/**
|
||||
* Constructeur de la classe AppThinkerWindow
|
||||
@@ -24,21 +28,22 @@ public class AppThinkerWindow extends JFrame {
|
||||
this.setLocationRelativeTo(null);
|
||||
|
||||
//Ajout du menu à la fenêtre
|
||||
AppThinkerMenuBar menu = new AppThinkerMenuBar();
|
||||
this.setJMenuBar(menu);
|
||||
_menu = new AppThinkerMenuBar(this);
|
||||
this.setJMenuBar(_menu);
|
||||
|
||||
//Ajout de la toolbar à la fenêtre
|
||||
AppThinkerToolbar toolbar = new AppThinkerToolbar();
|
||||
this.add(toolbar, BorderLayout.NORTH);
|
||||
_toolbar = new AppThinkerToolbar(this);
|
||||
this.add(_toolbar, BorderLayout.NORTH);
|
||||
|
||||
//Ajout de la grille à la fenêtre
|
||||
_grid = new AppThinkerGrid();
|
||||
this.add(_grid, BorderLayout.CENTER);
|
||||
|
||||
//Ajout de la statusbar à la fenêtre
|
||||
AppThinkerStatusbar statusbar = new AppThinkerStatusbar();
|
||||
this.add(statusbar, BorderLayout.SOUTH);
|
||||
_statusbar = new AppThinkerStatusbar();
|
||||
this.add(_statusbar, BorderLayout.SOUTH);
|
||||
this.pack();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,13 +52,16 @@ public class AppThinkerWindow extends JFrame {
|
||||
public void newProject(){
|
||||
this._project = new Project();
|
||||
this.setTitle("AppThinker | " + _project.getName());
|
||||
this._menu.enableEditing();
|
||||
this._toolbar.enableEditing();
|
||||
this._statusbar.setStatusMessage("Le projet a été créé.");
|
||||
this._statusbar.setFileMessage(this._project.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Ouvre un projet existant dans la fenêtre.
|
||||
* @param path Le chemin du projet à ouvrir.
|
||||
*/
|
||||
public void openProject(String path){
|
||||
public void openProject(){
|
||||
|
||||
}
|
||||
|
||||
@@ -62,6 +70,11 @@ public class AppThinkerWindow extends JFrame {
|
||||
*/
|
||||
public void closeProject(){
|
||||
this._project = null;
|
||||
this.setTitle("AppThinker");
|
||||
this._menu.disableEditing();
|
||||
this._toolbar.disableEditing();
|
||||
this._statusbar.setStatusMessage("Le projet a été fermé.");
|
||||
this._statusbar.setFileMessage("Aucun projet ouvert");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,9 +93,16 @@ public class AppThinkerWindow extends JFrame {
|
||||
|
||||
/**
|
||||
* Sauvegarde le projet en cours à un autre emplacement.
|
||||
* @param path Le chemin de sauvegarde du projet.
|
||||
*/
|
||||
public void saveAsProject(String path){
|
||||
public void saveAsProject(){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupère la grille contenue dans la fenêtre.
|
||||
* @return La grille contenue dans la fenêtre.
|
||||
*/
|
||||
public AppThinkerGrid getGrid(){
|
||||
return this._grid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user