|
From: Harry E. <har...@us...> - 2006-11-01 23:04:16
|
Update of /cvsroot/synclast/client/src/com/synclast/ui In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3259 Modified Files: WordWrapLabel.java Log Message: Fixed a static initializer error having to do with stylesheets getting applied before text has been set. Hope this is the last of these. Also fixed an order of operation issue with stylesheets getting applied in one of the constructors. Index: WordWrapLabel.java =================================================================== RCS file: /cvsroot/synclast/client/src/com/synclast/ui/WordWrapLabel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WordWrapLabel.java 18 Sep 2006 07:59:05 -0000 1.2 --- WordWrapLabel.java 1 Nov 2006 23:04:03 -0000 1.3 *************** *** 40,44 **** */ public WordWrapLabel(String text) { ! this(text, Font.getDefaultFont()); } --- 40,45 ---- */ public WordWrapLabel(String text) { ! super(text); ! originalText = text; } *************** *** 62,65 **** --- 63,71 ---- private void calcSize() { + //handle initialization by _class static variable + if(text == null) { + w = h = 0; + return; + } char[] fullText = text.toCharArray(); int startOfLine = 0; |