Re: [Xswt-developer] Inconsistency between different SWT attributes
Brought to you by:
dvorme
|
From: David J. O. <dj...@co...> - 2006-08-04 04:06:01
|
Patch applied and released to HEAD. Thanks!
Best regards,
Dave Orme
Drews, Heinz wrote:
> Hello,
>
> I'm using the latest version of XSWT checked out from CVS:
>
> In one of the samples it is said that the color attribute can be
> specified using CSS names or SWT names.
> In the sample the color name is prefixed by SWT. But only the name
> without the prefix is supported.
> This gives an inconsistent behavior, e.g. for fonts SWT.BOLD is used.
>
> I have attached a patch to allow prefixed names for colors.
>
> Regards,
> Heinz
> ------------------------------------------------------------------------
>
> Index: src/com/swtworkbench/community/xswt/dataparser/parsers/color/SWTColorsDataParser.java
> ===================================================================
> RCS file: /cvsroot/xswt/com.swtworkbench.community.xswt/src/com/swtworkbench/community/xswt/dataparser/parsers/color/SWTColorsDataParser.java,v
> retrieving revision 1.1
> diff -u -r1.1 SWTColorsDataParser.java
> --- src/com/swtworkbench/community/xswt/dataparser/parsers/color/SWTColorsDataParser.java 20 May 2006 17:13:08 -0000 1.1
> +++ src/com/swtworkbench/community/xswt/dataparser/parsers/color/SWTColorsDataParser.java 3 Aug 2006 19:29:40 -0000
> @@ -12,6 +12,9 @@
> }
>
> public Object parse(String source) {
> + if (source.startsWith("SWT.")) {
> + source = source.substring(4);
> + }
> Integer rgb = (Integer)super.parse(source);
> if (rgb == null) {
> return null;
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xswt-developer mailing list
> Xsw...@li...
> https://lists.sourceforge.net/lists/listinfo/xswt-developer
>
|