Sauvegarde 110320211843
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
#Sat Dec 19 19:42:31 CET 2020
|
||||
isFirstLaunch=false
|
||||
@@ -1,3 +1,4 @@
|
||||
import javax.swing.*;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -10,13 +11,13 @@ import java.util.Properties;
|
||||
public class AppThinker {
|
||||
//JavaDoc tags : @param @return @throws @author @version @see @since @serial @deprecated
|
||||
|
||||
public static String version = "1.0.0-dev5";
|
||||
public static String version = "1.0.0-dev6";
|
||||
public static String dateVersion = "27/12/2020";
|
||||
public static List<String> changelog;
|
||||
public static String developer = "V. BOULANGER";
|
||||
public static Properties appProperties = new Properties();
|
||||
|
||||
private static AppThinkerWindow _window;
|
||||
private static AppThinkerSplashscreen _splash;
|
||||
|
||||
/**
|
||||
* La méthode principale exécutée.
|
||||
@@ -26,19 +27,13 @@ public class AppThinker {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
//Création de la liste des modifications de la version actuelle
|
||||
changelog = new ArrayList<String>();
|
||||
changelog.add("#30 Fenêtre A propos et fenêtre de changelog");
|
||||
changelog.add("#31 Bug résolu : édition d'une classe inexistante");
|
||||
changelog.add("#34 Rafraîchissement des labels de taille");
|
||||
changelog.add("#3 Création et affichage de liens");
|
||||
changelog.add("#33 Bug d'ouverture/fermeture d'un projet résolu");
|
||||
changelog.add("#32 Bug déplacement d'une classe en dehors du diagramme résolu");
|
||||
changelog.add("#9 Modification des propriétés d'un lien.");
|
||||
changelog.add("#37 Manage user preferences");
|
||||
|
||||
AppThinkerSplashscreen splash = new AppThinkerSplashscreen();
|
||||
_splash = new AppThinkerSplashscreen();
|
||||
//Récupération des paramètres du logiciel
|
||||
loadConfiguration();
|
||||
Thread.sleep(3000);
|
||||
splash.dispose();
|
||||
_splash.dispose();
|
||||
|
||||
_window = new AppThinkerWindow();
|
||||
//Si le logiciel s'ouvre pour la 1ère fois, on affiche la fenêtre de changelog
|
||||
@@ -67,13 +62,19 @@ public class AppThinker {
|
||||
//Chargement des préférences du logiciel
|
||||
appProperties.load(input);
|
||||
} catch (final IOException ex) {
|
||||
ex.printStackTrace();
|
||||
//Fichier de préférences utilisateur introuvable. Restauration des préférences par défaut.
|
||||
/*storeConfiguration();
|
||||
appProperties.setProperty("isFirstLaunch", "true");
|
||||
appProperties.setProperty("compositionDefaultSizeX", "3000");
|
||||
appProperties.setProperty("compositionDefaultSizeY", "3000");
|
||||
storeConfiguration();*/
|
||||
JOptionPane.showMessageDialog(null, "User preferences file 'app.properties' not found. The default configuration has been restored.", "app.properties not found", JOptionPane.ERROR_MESSAGE);
|
||||
} finally {
|
||||
if (input != null) {
|
||||
try {
|
||||
input.close();
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
JOptionPane.showMessageDialog(null, "Erreur not found", "app.properties not found", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,9 +89,9 @@ public class AppThinker {
|
||||
output = new FileOutputStream("app.properties");
|
||||
//Enregistrement des propriétés du logiciel
|
||||
appProperties.store(output, null);
|
||||
|
||||
} catch (final IOException io) {
|
||||
io.printStackTrace();
|
||||
//io.printStackTrace();
|
||||
JOptionPane.showMessageDialog(null, "erreur de sauvegarde");
|
||||
} finally {
|
||||
if (output != null) {
|
||||
try {
|
||||
|
||||
@@ -12,7 +12,7 @@ public class AppThinkerSplashscreen extends JFrame {
|
||||
*/
|
||||
public AppThinkerSplashscreen(){
|
||||
this.setTitle("AppThinker - Starting");
|
||||
this.setMinimumSize(new Dimension(533, 300));
|
||||
this.setMinimumSize(new Dimension(600, 300));
|
||||
Image img = null;
|
||||
try { img = ImageIO.read(AppThinker.class.getResource("img/logoAppThinker.png")); } catch (Exception ex) { }
|
||||
this.setIconImage(img);
|
||||
@@ -29,7 +29,7 @@ public class AppThinkerSplashscreen extends JFrame {
|
||||
g2.setRenderingHints(rh);
|
||||
Image img = null;
|
||||
try { img = ImageIO.read(AppThinker.class.getResource("img/splashscreen.png")); } catch (Exception ex) { }
|
||||
g2.drawImage(img, 0, 0, 533, 300, this);
|
||||
g2.drawImage(img, 0, 0, 600, 300, this);
|
||||
/*Informations du logiciel*/
|
||||
g2.setColor(new Color(63, 169, 245));
|
||||
g2.setFont(new Font("Arial", Font.BOLD, 40));
|
||||
|
||||
@@ -26,7 +26,8 @@ public class Composition extends JPanel implements MouseListener, MouseMotionLis
|
||||
_project = project;
|
||||
this.addMouseListener(this);
|
||||
this.addMouseMotionListener(this);
|
||||
this.setPreferredSize(new Dimension(3000,3000));
|
||||
this.setPreferredSize(new Dimension(3000, 3000));
|
||||
//this.setPreferredSize(new Dimension(Integer.parseInt(AppThinker.appProperties.getProperty("compositionDefaultSizeX")), Integer.parseInt(AppThinker.appProperties.getProperty("compositionDefaultSizeY"))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
3
AppThinker/src/META-INF/MANIFEST.MF
Normal file
3
AppThinker/src/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: AppThinker
|
||||
|
||||
Reference in New Issue
Block a user