OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 174 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 177
Line 48... Line 48...
48
import org.openconcerto.ui.preferences.EmailProps;
48
import org.openconcerto.ui.preferences.EmailProps;
49
import org.openconcerto.utils.CompareUtils;
49
import org.openconcerto.utils.CompareUtils;
50
import org.openconcerto.utils.ExceptionHandler;
50
import org.openconcerto.utils.ExceptionHandler;
51
import org.openconcerto.utils.FileUtils;
51
import org.openconcerto.utils.FileUtils;
52
import org.openconcerto.utils.ThrowableHandler;
52
import org.openconcerto.utils.ThrowableHandler;
-
 
53
import org.openconcerto.utils.i18n.TranslationManager;
53
import org.openconcerto.utils.protocol.Helper;
54
import org.openconcerto.utils.protocol.Helper;
54
import org.openconcerto.xml.FastXMLProperties;
55
import org.openconcerto.xml.FastXMLProperties;
55
 
56
 
56
import java.awt.AWTEvent;
57
import java.awt.AWTEvent;
57
import java.awt.Component;
58
import java.awt.Component;
58
import java.awt.Desktop;
59
import java.awt.Desktop;
59
import java.awt.Image;
60
import java.awt.Image;
60
import java.awt.SplashScreen;
-
 
61
import java.awt.Toolkit;
61
import java.awt.Toolkit;
62
import java.awt.event.AWTEventListener;
62
import java.awt.event.AWTEventListener;
63
import java.awt.event.HierarchyEvent;
63
import java.awt.event.HierarchyEvent;
64
import java.awt.event.WindowAdapter;
64
import java.awt.event.WindowAdapter;
65
import java.awt.event.WindowEvent;
65
import java.awt.event.WindowEvent;
Line 243... Line 243...
243
        // Mac
243
        // Mac
244
        // only works with Aqua laf
244
        // only works with Aqua laf
245
        System.setProperty("apple.laf.useScreenMenuBar", "true");
245
        System.setProperty("apple.laf.useScreenMenuBar", "true");
246
 
246
 
247
        // ToolTipManager.sharedInstance().setInitialDelay(0);
247
        // ToolTipManager.sharedInstance().setInitialDelay(0);
-
 
248
        if (false) {
-
 
249
            // TODO : regarder si ne pas le forcer fix le bug de carré noir
248
        // SpeedUp Linux
250
            // SpeedUp Linux
249
        System.setProperty("sun.java2d.pmoffscreen", "false");
251
            System.setProperty("sun.java2d.pmoffscreen", "false");
250
 
252
 
-
 
253
        }
251
        System.setProperty(EditPanel.NOBORDER, "true");
254
        System.setProperty(EditPanel.NOBORDER, "true");
252
        System.setProperty(EditPanel.ADD_AT_THE_END, "true");
255
        System.setProperty(EditPanel.ADD_AT_THE_END, "true");
253
        System.setProperty("org.openconcerto.sql.listPanel.deafEditPanel", "true");
256
        System.setProperty("org.openconcerto.sql.listPanel.deafEditPanel", "true");
254
 
257
 
255
        // needed as long as IListFrame title isn't localised
258
        // needed as long as IListFrame title isn't localised
Line 272... Line 275...
272
        // Workaround for JRE 7 bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7075600
275
        // Workaround for JRE 7 bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7075600
273
        System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");
276
        System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");
274
 
277
 
275
        System.setProperty(ITextCombo.SIMPLE_TRAVERSAL, "true");
278
        System.setProperty(ITextCombo.SIMPLE_TRAVERSAL, "true");
276
 
279
 
-
 
280
        // Must be called before createDefaultInstance()
-
 
281
        TranslationManager.addTranslationStreamFromClass(Gestion.class);
-
 
282
 
277
        // Disable FOR SHARE lock
283
        // Disable FOR SHARE lock
278
        BaseFillSQLRequest.setDefaultLockSelect(false);
284
        BaseFillSQLRequest.setDefaultLockSelect(false);
279
 
285
 
280
        ComboSQLRequest.setDefaultItemsOrder(CompareUtils.<IComboSelectionItem> naturalOrder());
286
        ComboSQLRequest.setDefaultItemsOrder(CompareUtils.<IComboSelectionItem> naturalOrder());
281
        // Initialisation du splashScreen
287
        // Initialisation du splashScreen
282
        // ne pas oublier en param -splash:image.png
288
        // ne pas oublier en param -splash:image.png
283
        try {
289
        try {
-
 
290
            // Ne fonctionne pas sur certains Linux
284
            SplashScreen.getSplashScreen();
291
            java.awt.SplashScreen.getSplashScreen();
285
        } catch (Exception e) {
292
        } catch (Throwable e) {
286
            // Can occur on OpenJDK...
293
            // Can occur on OpenJDK...
287
            System.out.println("SplashScreen failed... " + e.getMessage());
294
            System.out.println("SplashScreen failed... " + e.getMessage());
288
        }
295
        }
289
 
296
 
290
        // must be done before creating UserRightsManager (which is done by
297
        // must be done before creating UserRightsManager (which is done by