Ignore:
Timestamp:
Oct 16, 2010, 1:08:28 PM (14 years ago)
Author:
mlg
Message:

implements feature : the number of thumbnails in the thumbnails viewer is adapted to the size of the frame
not perfect but better
feature:0001838

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/Main.java

    r6980 r7221  
    33import java.io.File;
    44import java.io.IOException;
    5 
    65import javax.swing.UIManager;
    7 
    86import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel;
    9 
    107import fr.mael.jiwigo.transverse.session.SessionManager;
    118import fr.mael.jiwigo.transverse.util.Outil;
     
    1310import fr.mael.jiwigo.ui.ConnexionDialog;
    1411import fr.mael.jiwigo.ui.mainframe.MainFrame;
     12
    1513
    1614/**
     
    4543 */
    4644public class Main {
    47     /**
    48      * Logger
    49      */
    50     public static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(Main.class);
    51     /**
    52      * The login and session manager that allows to connect to
    53      * the webservice and to query it
    54      */
    55     public static SessionManager sessionManager;
    5645
    57     /**
    58      *  the main window
    59      */
    60     private static MainFrame mainFrame;
     46        /**
     47         * Logger
     48         */
     49        public static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(Main.class);
     50        /**
     51         * The login and session manager that allows to connect to
     52         * the webservice and to query it
     53         */
     54        public static SessionManager sessionManager;
    6155
    62     public static void main(String[] args) {
    63         try {
    64             UIManager.setLookAndFeel(new NimbusLookAndFeel());
    65         } catch (Exception e) {
    66         }
    67         File dossierConfig = new File(System.getProperty("user.home") + "/.jiwigo");
    68         if (!dossierConfig.exists()) {
    69             dossierConfig.mkdir();
    70         }
    71         try {
    72             PreferencesManagement.creerFichierParDefaut();
    73             //dialog de connexion
    74             ConnexionDialog dialog = new ConnexionDialog();
    75             dialog.showDialog();
    76         } catch (IOException e) {
    77             LOG.error(Outil.getStackTrace(e));
     56        /**
     57         *  the main window
     58         */
     59        private static MainFrame mainFrame;
     60
     61
     62        public static void main(String[] args) {
     63                try {
     64                        UIManager.setLookAndFeel(new NimbusLookAndFeel());
     65                } catch (Exception e) {
     66                }
     67                File dossierConfig = new File(System.getProperty("user.home") + "/.jiwigo");
     68                if (!dossierConfig.exists()) {
     69                        dossierConfig.mkdir();
     70                }
     71                try {
     72                        PreferencesManagement.creerFichierParDefaut();
     73                        //dialog de connexion
     74                        ConnexionDialog dialog = new ConnexionDialog();
     75                        dialog.showDialog();
     76                } catch (IOException e) {
     77                        LOG.error(Outil.getStackTrace(e));
     78                }
     79
    7880        }
    7981
    80     }
    8182
    82     public static void showFrame() {
     83        public static void showFrame() {
    8384
    84         if (mainFrame == null) {
    85             mainFrame = MainFrame.getInstance();
     85                if (mainFrame == null) {
     86                        mainFrame = MainFrame.getInstance();
     87                }
     88                if (!mainFrame.isVisible()) {
     89                        mainFrame.showUi();
     90                }
    8691        }
    87         if (!mainFrame.isVisible()) {
    88             mainFrame.showUi();
    89         }
    90     }
    9192}
Note: See TracChangeset for help on using the changeset viewer.