From: Olivier G. <og...@us...> - 2008-04-06 17:09:02
|
Update of /cvsroot/osmose-dev/osmose/src/osmose/application In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5886/src/osmose/application Modified Files: OSMApplication.java Log Message: Removed a (fixed) workaround for Java version older than 1.4. Index: OSMApplication.java =================================================================== RCS file: /cvsroot/osmose-dev/osmose/src/osmose/application/OSMApplication.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OSMApplication.java 4 Apr 2008 22:07:14 -0000 1.6 --- OSMApplication.java 6 Apr 2008 17:09:00 -0000 1.7 *************** *** 250,254 **** UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); //Set MenuItemUI to prevent bug #4911422 ! UIManager.put("MenuItemUI", "osmose.application.OSMMenuWorkAroundUI"); } catch(Exception e) { --- 250,267 ---- UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); //Set MenuItemUI to prevent bug #4911422 ! // This has been fixed in Java 1.5 ! boolean workAround = false; ! String javaVersion = System.getProperty("java.version"); ! String[] fullVersion = javaVersion.split("[.]"); ! if (fullVersion.length > 1) { ! int version1 = (new Integer(fullVersion[0])).intValue(); ! int version2 = (new Integer(fullVersion[1])).intValue(); ! if ((version1 == 1) && (version2 < 5)) { ! workAround = true; ! } ! } ! if (workAround) { ! UIManager.put("MenuItemUI", "osmose.application.OSMMenuWorkAroundUI"); ! } } catch(Exception e) { |