From: <de...@us...> - 2014-10-22 21:59:00
|
Revision: 8891 http://sourceforge.net/p/fudaa/svn/8891 Author: deniger Date: 2014-10-22 21:58:58 +0000 (Wed, 22 Oct 2014) Log Message: ----------- maj couleur par defaut ?\195?\160 similaire Modified Paths: -------------- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializerHandler.java Added Paths: ----------- trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializationAware.java Modified: trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java =================================================================== --- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java 2014-10-22 21:58:46 UTC (rev 8890) +++ trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java 2014-10-22 21:58:58 UTC (rev 8891) @@ -1,14 +1,13 @@ /** * @modification $Date: 2007-06-20 12:20:44 $ - * @statut unstable - * @file BuPreferences.java - * @version 0.43 - * @author Guillaume Desnoix - * @email gui...@de... - * @license GNU General Public License 2 (GPL2) - * @copyright 1998-2005 Guillaume Desnoix + * @statut unstable + * @file BuPreferences.java + * @version 0.43 + * @author Guillaume Desnoix + * @email gui...@de... + * @license GNU General Public License 2 (GPL2) + * @copyright 1998-2005 Guillaume Desnoix */ - package com.memoire.bu; import java.awt.Color; @@ -42,16 +41,17 @@ * A class to manage user preferences for the standard GUI. */ public class BuPreferences extends FuPreferences { + public static final BuPreferences BU = new BuPreferences(); - protected BuPreferences() {} + protected BuPreferences() { + } public String getLanguages() { return "de,en,es,eo,fr,it,hi,hu,nl,pt,ru"; } // Specific - public void applyLookAndFeel() { applyLookAndFeel(false); } @@ -102,15 +102,23 @@ * if((FuLib.jdk()<=1.1)&&lnfname.equals("ASPECT_SKINLF")) lnfname="ASPECT_METAL"; if((FuLib.jdk()<=1.3)&&lnfname.equals("ASPECT_GTK")) * lnfname="ASPECT_METAL"; */ - if ((FuLib.jdk() <= 1.4) && lnfname.equals("ASPECT_SYNTHETICA")) lnfname = "ASPECT_METAL"; + if ((FuLib.jdk() <= 1.4) && lnfname.equals("ASPECT_SYNTHETICA")) { + lnfname = "ASPECT_METAL"; + } - if (lnfname.equals("ASPECT_DEFAUT")) lnfclass = ""; - else if (lnfname.equals("ASPECT_AMIGA")) lnfclass = "swing.addon.plaf.threeD.ThreeDLookAndFeel"; - else if (lnfname.equals("ASPECT_FHLAF")) lnfclass = "com.shfarr.ui.plaf.fh.FhLookAndFeel"; - else if (lnfname.equals("ASPECT_GTK")) lnfclass = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"; - else if (lnfname.equals("ASPECT_KUNSTSTOFF")) lnfclass = "com.incors.plaf.kunststoff.KunststoffLookAndFeel"; - else if (lnfname.equals("ASPECT_LIQUID")) lnfclass = "com.birosoft.liquid.LiquidLookAndFeel"; - // else if (lnfname.equals("ASPECT_SUBSTANCE")) { + if (lnfname.equals("ASPECT_DEFAUT")) { + lnfclass = ""; + } else if (lnfname.equals("ASPECT_AMIGA")) { + lnfclass = "swing.addon.plaf.threeD.ThreeDLookAndFeel"; + } else if (lnfname.equals("ASPECT_FHLAF")) { + lnfclass = "com.shfarr.ui.plaf.fh.FhLookAndFeel"; + } else if (lnfname.equals("ASPECT_GTK")) { + lnfclass = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"; + } else if (lnfname.equals("ASPECT_KUNSTSTOFF")) { + lnfclass = "com.incors.plaf.kunststoff.KunststoffLookAndFeel"; + } else if (lnfname.equals("ASPECT_LIQUID")) { + lnfclass = "com.birosoft.liquid.LiquidLookAndFeel"; + } // else if (lnfname.equals("ASPECT_SUBSTANCE")) { // lnfclass = "org.jvnet.substance.skin.SubstanceBusinessLookAndFeel"; // // try { @@ -122,7 +130,6 @@ // } // // } - else if (lnfname.equals("ASPECT_MAC")) { FuLib.setSystemProperty("os.name", "Mac OS"); lnfclass = "com.sun.java.swing.plaf.mac.MacLookAndFeel"; @@ -130,28 +137,32 @@ lnfclass = "javax.swing.plaf.metal.MetalLookAndFeel"; try { Class c = Class.forName(lnfclass); - Method m = c.getMethod("setCurrentTheme", new Class[] { MetalTheme.class }); + Method m = c.getMethod("setCurrentTheme", new Class[]{MetalTheme.class}); int i = Integer.parseInt(getStringProperty("metal.theme", "THEME_METAL0").substring(11)); // FuLog.debug("SET THEME "+i+" "+BuMetalCustomTheme.getList()[i]); // FuLog.printStackTrace(); - m.invoke(null, new Object[] { BuMetalCustomTheme.getList()[i] }); + m.invoke(null, new Object[]{BuMetalCustomTheme.getList()[i]}); } catch (Exception ex) { FuLog.warning("BPR: metal theme", ex); } finally { BuLib.forgetLnf(); } - } else if (lnfname.equals("ASPECT_METOUIA")) lnfclass = "net.sourceforge.mlf.metouia.MetouiaLookAndFeel"; - else if (lnfname.equals("ASPECT_MOTIF")) lnfclass = "com.sun.java.swing.plaf.motif.MotifLookAndFeel"; - else if (lnfname.equals("ASPECT_NEXT")) lnfclass = "nextlf.plaf.NextLookAndFeel"; - else if (lnfname.equals("ASPECT_ORGANIC")) lnfclass = "javax.swing.plaf.organic.OrganicLookAndFeel"; - else if (lnfname.equals("ASPECT_OYOAHA")) { + } else if (lnfname.equals("ASPECT_METOUIA")) { + lnfclass = "net.sourceforge.mlf.metouia.MetouiaLookAndFeel"; + } else if (lnfname.equals("ASPECT_MOTIF")) { + lnfclass = "com.sun.java.swing.plaf.motif.MotifLookAndFeel"; + } else if (lnfname.equals("ASPECT_NEXT")) { + lnfclass = "nextlf.plaf.NextLookAndFeel"; + } else if (lnfname.equals("ASPECT_ORGANIC")) { + lnfclass = "javax.swing.plaf.organic.OrganicLookAndFeel"; + } else if (lnfname.equals("ASPECT_OYOAHA")) { lnfclass = "com.oyoaha.swing.plaf.oyoaha.OyoahaLookAndFeel"; try { Class c = Class.forName(lnfclass); Object o = c.newInstance(); - Method m = c.getMethod("setOyoahaTheme", new Class[] { File.class }); - m.invoke(o, new Object[] { new File(getStringProperty("oyoaha.theme")) }); + Method m = c.getMethod("setOyoahaTheme", new Class[]{File.class}); + m.invoke(o, new Object[]{new File(getStringProperty("oyoaha.theme"))}); UIManager.setLookAndFeel((LookAndFeel) o); // Oyoaha applyFontScaling(); forced = false; @@ -160,25 +171,30 @@ } finally { BuLib.forgetLnf(); } - } else if (lnfname.equals("ASPECT_PLASTIC")) lnfclass = "com.jgoodies.looks.plastic.PlasticLookAndFeel"; - else if (lnfname.equals("ASPECT_PLASTIC3D")) lnfclass = "com.jgoodies.looks.plastic.Plastic3DLookAndFeel"; - else if (lnfname.equals("ASPECT_PLASTICXP")) lnfclass = "com.jgoodies.looks.plastic.PlasticXPLookAndFeel"; - else if (lnfname.equals("ASPECT_SKINLF")) { + } else if (lnfname.equals("ASPECT_PLASTIC")) { + lnfclass = "com.jgoodies.looks.plastic.PlasticLookAndFeel"; + } else if (lnfname.equals("ASPECT_PLASTIC3D")) { + lnfclass = "com.jgoodies.looks.plastic.Plastic3DLookAndFeel"; + } else if (lnfname.equals("ASPECT_PLASTICXP")) { + lnfclass = "com.jgoodies.looks.plastic.PlasticXPLookAndFeel"; + } else if (lnfname.equals("ASPECT_SKINLF")) { lnfclass = "com.l2fprod.gui.plaf.skin.SkinLookAndFeel"; try { String t = getStringProperty("skinlf.theme"); Class c = Class.forName(lnfclass); Method m = null; - if (t.toLowerCase().endsWith(".zip") || t.toLowerCase().endsWith(".jar")) m = c.getMethod("loadThemePack", - new Class[] { String.class }); - else - m = c.getMethod("loadSkin", new Class[] { String.class }); + if (t.toLowerCase().endsWith(".zip") || t.toLowerCase().endsWith(".jar")) { + m = c.getMethod("loadThemePack", + new Class[]{String.class}); + } else { + m = c.getMethod("loadSkin", new Class[]{String.class}); + } - Object s = m.invoke(null, new Object[] { t }); + Object s = m.invoke(null, new Object[]{t}); - m = c.getMethod("setSkin", new Class[] { Class.forName("com.l2fprod.gui.plaf.skin.Skin") }); - m.invoke(null, new Object[] { s }); + m = c.getMethod("setSkin", new Class[]{Class.forName("com.l2fprod.gui.plaf.skin.Skin")}); + m.invoke(null, new Object[]{s}); } catch (Exception ex) { FuLog.error("BPR: could not set skinlf theme", ex); } finally { @@ -188,14 +204,17 @@ lnfclass = "com.memoire.slaf.SlafLookAndFeel"; try { Class c = Class.forName(lnfclass); - Method m = c.getMethod("setCurrentTheme", new Class[] { String.class }); - m.invoke(null, new Object[] { getStringProperty("slaf.theme") }); - } catch (Exception ex) {} finally { + Method m = c.getMethod("setCurrentTheme", new Class[]{String.class}); + m.invoke(null, new Object[]{getStringProperty("slaf.theme")}); + } catch (Exception ex) { + } finally { BuLib.forgetLnf(); } - } else if (lnfname.equals("ASPECT_SYNTHETICA")) lnfclass = "de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel"; - else if (lnfname.equals("ASPECT_TONIC")) lnfclass = "com.digitprop.tonic.TonicLookAndFeel"; - else if (lnfname.equals("ASPECT_WINDOWS")) { + } else if (lnfname.equals("ASPECT_SYNTHETICA")) { + lnfclass = "de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel"; + } else if (lnfname.equals("ASPECT_TONIC")) { + lnfclass = "com.digitprop.tonic.TonicLookAndFeel"; + } else if (lnfname.equals("ASPECT_WINDOWS")) { lnfclass = "com.jgoodies.looks.windows.WindowsLookAndFeel"; FuLib.setSystemProperty("os.name", "Windows"); @@ -205,18 +224,21 @@ } // if(lnfclass.equals("")) lnfclass="com.memoire.slaf.SlafLookAndFeel"; - setLookAndFeel(lnfclass, forced); // if(FuLib.jdk()>=1.4) // { boolean b = getBooleanProperty("lookandfeel.decorated", false); - if (b && FuLib.isKorteRunning()) b = false; + if (b && FuLib.isKorteRunning()) { + b = false; + } JDialog.setDefaultLookAndFeelDecorated(b); JFrame.setDefaultLookAndFeelDecorated(b); // } - if (os != null) FuLib.setSystemProperty("os.name", os); + if (os != null) { + FuLib.setSystemProperty("os.name", os); + } if (BuLib.isMetal()) { Icon ic = new IconUIResource(new BuEmptyIcon(10, 10)); @@ -228,9 +250,10 @@ * if((i==0)&&(FuLib.jdk()>=1.5)&& Color.white.equals(UIManager.getColor("Desktop.background"))) * UIManager.getDefaults().put ("Desktop.background",new ColorUIResource(184,207,229)); */ - - if (BuLib.isOcean() && Color.white.equals(UIManager.getColor("Desktop.background"))) UIManager.getDefaults().put( - "Desktop.background", new ColorUIResource(184, 207, 229)); + if (BuLib.isOcean() && Color.white.equals(UIManager.getColor("Desktop.background"))) { + UIManager.getDefaults().put( + "Desktop.background", new ColorUIResource(184, 207, 229)); + } } boolean setLookAndFeel(String _lnfclass, boolean _forced) { @@ -252,14 +275,20 @@ BuIcon icon; icon = BuResource.BU.getButtonIcon("valider"); - if (!icon.isDefault() && (UIManager.get("FileChooser.approveButtonIcon") == null)) UIManager.getDefaults().put( - "FileChooser.approveButtonIcon", icon); + if (!icon.isDefault() && (UIManager.get("FileChooser.approveButtonIcon") == null)) { + UIManager.getDefaults().put( + "FileChooser.approveButtonIcon", icon); + } icon = BuResource.BU.getButtonIcon("annuler"); - if (!icon.isDefault() && (UIManager.get("FileChooser.cancelButtonIcon") == null)) UIManager.getDefaults().put( - "FileChooser.cancelButtonIcon", icon); + if (!icon.isDefault() && (UIManager.get("FileChooser.cancelButtonIcon") == null)) { + UIManager.getDefaults().put( + "FileChooser.cancelButtonIcon", icon); + } icon = BuResource.BU.getButtonIcon("renommer"); - if (!icon.isDefault() && (UIManager.get("FileChooser.renameButtonIcon") == null)) UIManager.getDefaults().put( - "FileChooser.renameButtonIcon", icon); + if (!icon.isDefault() && (UIManager.get("FileChooser.renameButtonIcon") == null)) { + UIManager.getDefaults().put( + "FileChooser.renameButtonIcon", icon); + } return r; } @@ -267,8 +296,12 @@ public int getFontScaling() { int w = Toolkit.getDefaultToolkit().getScreenSize().width; int f = getIntegerProperty("lookandfeel.fontscale", Math.max(100, (int) Math.round(100. * w / 1280))); - if (f < 10) f = 10; - if (f > 1000) f = 1000; + if (f < 10) { + f = 10; + } + if (f > 1000) { + f = 1000; + } return f; } @@ -311,7 +344,9 @@ if (_dispo.indexOf(l) >= 0) { // System.err.println("LANG="+l); if (!l.equals("") && !l.equals(Locale.getDefault().getLanguage())) { - if ("en".equals(l) && "EN".equals(c)) c = "US"; + if ("en".equals(l) && "EN".equals(c)) { + c = "US"; + } Locale.setDefault(new Locale(l, c)); FuLib.setSystemProperty("user.language", l); FuLib.setSystemProperty("user.country", c); @@ -323,9 +358,13 @@ } public void applyOn(Object _o) { - if (_o == null) return; + if (_o == null) { + return; + } - if (!(_o instanceof BuCommonInterface)) throw new RuntimeException("" + _o + " is not a BuCommonInterface."); + if (!(_o instanceof BuCommonInterface)) { + throw new RuntimeException("" + _o + " is not a BuCommonInterface."); + } BuCommonInterface appli = (BuCommonInterface) _o; BuMainPanel main = appli.getMainPanel(); @@ -347,38 +386,42 @@ int bottom = getIntegerProperty("screen.bottom", 0); switch (getIntegerProperty("window.size", 2)) { - case 0: - f.setLocation(Math.max(left, e.width / 10), Math.max(top, e.height / 10)); - f.setSize(Math.min(e.width * 4 / 5, e.width - left - right), Math - .min(e.height * 4 / 5, e.height - top - bottom)); - break; - case 1: - f.setLocation(left, top); - f.setSize(Math.min(e.width - f.getLocation().x, e.width - left - right), Math.min(e.height - f.getLocation().y, - e.height - top - bottom)); - break; - case 2: - int x = getIntegerProperty("window.x", e.width / 10); - int y = getIntegerProperty("window.y", e.height / 10); - int w = getIntegerProperty("window.w"); - int h = getIntegerProperty("window.h"); + case 0: + f.setLocation(Math.max(left, e.width / 10), Math.max(top, e.height / 10)); + f.setSize(Math.min(e.width * 4 / 5, e.width - left - right), Math + .min(e.height * 4 / 5, e.height - top - bottom)); + break; + case 1: + f.setLocation(left, top); + f.setSize(Math.min(e.width - f.getLocation().x, e.width - left - right), Math.min(e.height - f.getLocation().y, + e.height - top - bottom)); + break; + case 2: + int x = getIntegerProperty("window.x", e.width / 10); + int y = getIntegerProperty("window.y", e.height / 10); + int w = getIntegerProperty("window.w"); + int h = getIntegerProperty("window.h"); - if (x < 0) x = 0; - if (y < 0) y = 0; - if ((w > 0) && (h > 0)) - { - f.setLocation(x, y); - f.setSize(w, h); - } - break; - case 3: - try { - Method m = JFrame.class.getMethod("setState", new Class[] { Integer.class }); - m.invoke(f, new Object[] { FuFactoryInteger.get(1) }); - } catch (Exception ex) {} + if (x < 0) { + x = 0; + } + if (y < 0) { + y = 0; + } + if ((w > 0) && (h > 0)) { + f.setLocation(x, y); + f.setSize(w, h); + } + break; + case 3: + try { + Method m = JFrame.class.getMethod("setState", new Class[]{Integer.class}); + m.invoke(f, new Object[]{FuFactoryInteger.get(1)}); + } catch (Exception ex) { + } // f.setState(Frame.ICONIFIED); - // Frame.ICONIFIED = 1; - break; + // Frame.ICONIFIED = 1; + break; } f.getRootPane().revalidate(); @@ -419,7 +462,6 @@ * if(FuLib.jdk()>=1.4) { boolean b=getBooleanProperty("lookandfeel.decorated",false); if(b&&FuLib.isKorteRunning()) * b=false; JDialog.setDefaultLookAndFeelDecorated(b); JFrame. setDefaultLookAndFeelDecorated(b); } */ - applyLookAndFeel(); // Desktop applyOnDesktop(desktop); @@ -434,7 +476,9 @@ if (!"".equals(url.trim())) { BuIcon icon = new BuIcon(url); - if (!icon.isDefault()) img = icon.getImage(); + if (!icon.isDefault()) { + img = icon.getImage(); + } } if (img == null) { @@ -445,41 +489,53 @@ } public void applyOnMainPanel(BuMainPanel _main) { - if (_main.getSpecificBar() != null) _main.getSpecificBar().setVisible( - getBooleanProperty("specificbar.visible", true)); - if (_main.getLeftColumn() != null) _main.getLeftColumn().setVisible(getBooleanProperty("leftcolumn.visible", true)); - if (_main.getRightColumn() != null) _main.getRightColumn().setVisible( - getBooleanProperty("rightcolumn.visible", true)); - if (_main.getStatusBar() != null) _main.getStatusBar().setVisible(getBooleanProperty("statusbar.visible", true)); + if (_main.getSpecificBar() != null) { + _main.getSpecificBar().setVisible( + getBooleanProperty("specificbar.visible", true)); + } + if (_main.getLeftColumn() != null) { + _main.getLeftColumn().setVisible(getBooleanProperty("leftcolumn.visible", true)); + } + if (_main.getRightColumn() != null) { + _main.getRightColumn().setVisible( + getBooleanProperty("rightcolumn.visible", true)); + } + if (_main.getStatusBar() != null) { + _main.getStatusBar().setVisible(getBooleanProperty("statusbar.visible", true)); + } boolean va = getBooleanProperty("assistant.visible", true); _main.getLeftColumn().toggleComponent("ASSISTANT", va); _main.getRightColumn().toggleComponent("ASSISTANT", va); - - int lcwidth=getIntegerProperty("leftcolumn.width",-1); - if (lcwidth>0) { - int height=_main.getLeftColumn().getPreferredSize().height; - _main.getLeftColumn().setPreferredSize(new Dimension(lcwidth,height)); + + int lcwidth = getIntegerProperty("leftcolumn.width", -1); + if (lcwidth > 0) { + int height = _main.getLeftColumn().getPreferredSize().height; + _main.getLeftColumn().setPreferredSize(new Dimension(lcwidth, height)); } - - int rcwidth=getIntegerProperty("rightcolumn.width",-1); - if (rcwidth>0) { - int height=_main.getRightColumn().getPreferredSize().height; - _main.getRightColumn().setPreferredSize(new Dimension(rcwidth,height)); + + int rcwidth = getIntegerProperty("rightcolumn.width", -1); + if (rcwidth > 0) { + int height = _main.getRightColumn().getPreferredSize().height; + _main.getRightColumn().setPreferredSize(new Dimension(rcwidth, height)); } - if (getBooleanProperty("columns.swapped", false) ^ _main.isColumnsSwapped()) _main.swapColumns(); - + if (getBooleanProperty("columns.swapped", false) ^ _main.isColumnsSwapped()) { + _main.swapColumns(); + } + _main.revalidate(); } public void applyOnDesktop(BuDesktop _desktop) { - if (_desktop == null) return; + if (_desktop == null) { + return; + } BuBackgroundPainter bp = _desktop.getBackgroundPainter(); bp.setGrid(getBooleanProperty("desktop.grid", false)); bp.setDots(getBooleanProperty("desktop.dots", false)); - + _desktop.setBackground(UIManager.getColor("Panel.background")); if (getStringProperty("desktop.background").equals("DESKTOP_ROUGE")) { _desktop.setBackground(new Color(128, 64, 64)); bp.setIcon(null); @@ -526,33 +582,52 @@ public boolean isEnabled(String _option) { boolean r = true; if (_option.startsWith("ASPECT_")) { - if (_option.endsWith("AMIGA")) r = FuLib.classExists("swing.addon.plaf.threeD.ThreeDLookAndFeel"); - else if (_option.endsWith("FHLAF")) r = FuLib.classExists("com.shfarr.ui.plaf.fh.FhLookAndFeel"); - else if (_option.endsWith("GTK")) r = FuLib.classExists("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); - else if (_option.endsWith("KUNSTSTOFF")) r = FuLib - .classExists("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); - else if (_option.endsWith("LIQUID")) r = FuLib.classExists("com.birosoft.liquid.LiquidLookAndFeel"); - else if (_option.endsWith("MAC")) r = FuLib.classExists("com.sun.java.swing.plaf.mac.MacLookAndFeel"); - else if (_option.endsWith("METAL")) r = FuLib.classExists("javax.swing.plaf.metal.MetalLookAndFeel"); - else if (_option.endsWith("MOTIF")) r = FuLib.classExists("com.sun.java.swing.plaf.motif.MotifLookAndFeel"); - else if (_option.endsWith("NEXT")) r = FuLib.classExists("nextlf.plaf.NextLookAndFeel"); - else if (_option.endsWith("ORGANIC")) r = FuLib.classExists("com.sun.java.swing.plaf.organic.OrganicLookAndFeel"); - else if (_option.endsWith("OYOAHA")) r = FuLib.classExists("com.oyoaha.swing.plaf.oyoaha.OyoahaLookAndFeel"); - else if (_option.endsWith("PLASTIC")) r = FuLib.classExists("com.jgoodies.looks.plastic.PlasticLookAndFeel"); - else if (_option.endsWith("PLASTIC3D")) r = FuLib.classExists("com.jgoodies.looks.plastic.Plastic3DLookAndFeel"); - else if (_option.endsWith("PLASTICXP")) r = FuLib.classExists("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); - else if (_option.endsWith("SKINLF")) r = FuLib.classExists("com.l2fprod.gui.plaf.skin.SkinLookAndFeel"); - else if (_option.endsWith("SLAF")) r = FuLib.classExists("com.memoire.slaf.SlafLookAndFeel"); - else if (_option.endsWith("SYNTHETICA")) r = FuLib - .classExists("de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel"); - else if (_option.endsWith("TONIC")) r = FuLib.classExists("com.digitprop.tonic.TonicLookAndFeel"); - else if (_option.endsWith("WINDOWS")) r = FuLib.classExists("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + if (_option.endsWith("AMIGA")) { + r = FuLib.classExists("swing.addon.plaf.threeD.ThreeDLookAndFeel"); + } else if (_option.endsWith("FHLAF")) { + r = FuLib.classExists("com.shfarr.ui.plaf.fh.FhLookAndFeel"); + } else if (_option.endsWith("GTK")) { + r = FuLib.classExists("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); + } else if (_option.endsWith("KUNSTSTOFF")) { + r = FuLib + .classExists("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); + } else if (_option.endsWith("LIQUID")) { + r = FuLib.classExists("com.birosoft.liquid.LiquidLookAndFeel"); + } else if (_option.endsWith("MAC")) { + r = FuLib.classExists("com.sun.java.swing.plaf.mac.MacLookAndFeel"); + } else if (_option.endsWith("METAL")) { + r = FuLib.classExists("javax.swing.plaf.metal.MetalLookAndFeel"); + } else if (_option.endsWith("MOTIF")) { + r = FuLib.classExists("com.sun.java.swing.plaf.motif.MotifLookAndFeel"); + } else if (_option.endsWith("NEXT")) { + r = FuLib.classExists("nextlf.plaf.NextLookAndFeel"); + } else if (_option.endsWith("ORGANIC")) { + r = FuLib.classExists("com.sun.java.swing.plaf.organic.OrganicLookAndFeel"); + } else if (_option.endsWith("OYOAHA")) { + r = FuLib.classExists("com.oyoaha.swing.plaf.oyoaha.OyoahaLookAndFeel"); + } else if (_option.endsWith("PLASTIC")) { + r = FuLib.classExists("com.jgoodies.looks.plastic.PlasticLookAndFeel"); + } else if (_option.endsWith("PLASTIC3D")) { + r = FuLib.classExists("com.jgoodies.looks.plastic.Plastic3DLookAndFeel"); + } else if (_option.endsWith("PLASTICXP")) { + r = FuLib.classExists("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); + } else if (_option.endsWith("SKINLF")) { + r = FuLib.classExists("com.l2fprod.gui.plaf.skin.SkinLookAndFeel"); + } else if (_option.endsWith("SLAF")) { + r = FuLib.classExists("com.memoire.slaf.SlafLookAndFeel"); + } else if (_option.endsWith("SYNTHETICA")) { + r = FuLib + .classExists("de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel"); + } else if (_option.endsWith("TONIC")) { + r = FuLib.classExists("com.digitprop.tonic.TonicLookAndFeel"); + } else if (_option.endsWith("WINDOWS")) { + r = FuLib.classExists("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + } } return r; } // GET - public Color getColorProperty(String _key) { return getColorProperty(_key, Color.black); } @@ -564,7 +639,8 @@ if (s != null) { try { r = new Color(Integer.parseInt(s, 16)); - } catch (Exception ex) {} + } catch (Exception ex) { + } } return r; @@ -616,7 +692,9 @@ } } } - if (!"".equals(s.trim())) f = s; + if (!"".equals(s.trim())) { + f = s; + } r = new Font(f, t, h); } catch (Exception ex) { @@ -627,7 +705,6 @@ } // PUT - public void putColorProperty(String _key, Color _color) { String s = Integer.toHexString(_color.getRGB()); putStringProperty(_key, ("000000" + s).substring(s.length())); @@ -639,7 +716,7 @@ public static String getStringValue(Font _font) { String style = (((_font.getStyle() & Font.BOLD) != 0) ? "bold" : "") - + (((_font.getStyle() & Font.ITALIC) != 0) ? "italic" : ""); + + (((_font.getStyle() & Font.ITALIC) != 0) ? "italic" : ""); String string = _font.getFamily() + "," + style + "," + _font.getSize(); return string; } Added: trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializationAware.java =================================================================== --- trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializationAware.java (rev 0) +++ trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializationAware.java 2014-10-22 21:58:58 UTC (rev 8891) @@ -0,0 +1,14 @@ +/* + GPL 2 + */ +package org.fudaa.dodico.boony; + +/** + * + * @author Frederic Deniger + */ +public interface BoonyDeserializationAware { + + void endDeserialization(); + +} Modified: trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializerHandler.java =================================================================== --- trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializerHandler.java 2014-10-22 21:58:46 UTC (rev 8890) +++ trunk/framework/dodico-common/src/main/java/org/fudaa/dodico/boony/BoonyDeserializerHandler.java 2014-10-22 21:58:58 UTC (rev 8891) @@ -224,6 +224,10 @@ } else if (("object".equals(_element)) || ("iobject".equals(_element))) { Object o = objects_.pop(); + if (o instanceof BoonyDeserializationAware) { + ((BoonyDeserializationAware) o).endDeserialization(); + + } if (o instanceof CorbaEnum) { final Object id = ref_.get(o); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |