|
From: JP <j-...@us...> - 2007-03-18 11:48:57
|
Update of /cvsroot/swixat/swixat/src/main/java/org/swixat/framework In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1035/src/main/java/org/swixat/framework Modified Files: Tag: B0_6_0 SwiXMLEngine.java Log Message: Modified new init script feature to work for all JComponents, rather than just those with property setters. (Wanted to use the feature with a JTabbedPane component, which doesn't have a property setter by default.) Index: SwiXMLEngine.java =================================================================== RCS file: /cvsroot/swixat/swixat/src/main/java/org/swixat/framework/SwiXMLEngine.java,v retrieving revision 1.17.2.2 retrieving revision 1.17.2.3 diff -C2 -d -r1.17.2.2 -r1.17.2.3 *** SwiXMLEngine.java 5 Mar 2007 13:52:10 -0000 1.17.2.2 --- SwiXMLEngine.java 18 Mar 2007 06:25:32 -0000 1.17.2.3 *************** *** 221,226 **** } ! // treat Action tag ! if (c instanceof JComponent) { try { Method mt = c.getClass().getMethod("getActionCommand", null); --- 221,229 ---- } ! if (c instanceof JComponent) { ! // Call init script. If absent, executeCommand does nothing. ! String init = (String)((JComponent)c).getClientProperty("init"); ! getParentFrame().executeCommand(init); ! // treat Action tag try { Method mt = c.getClass().getMethod("getActionCommand", null); *************** *** 239,246 **** if (ps != null) { ps.init((JComponent)c, this); - - // call user init script - String init = (String)((JComponent)c).getClientProperty("init"); - getParentFrame().executeCommand(init); } --- 242,245 ---- |