Mercurial > projects > dwt-win
diff dwt/layout/RowData.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | 9a64a7781bab |
children | fd9c62a2998e |
line wrap: on
line diff
--- a/dwt/layout/RowData.d Sat Apr 26 10:01:48 2008 +0200 +++ b/dwt/layout/RowData.d Mon May 05 00:12:38 2008 +0200 @@ -16,8 +16,8 @@ import dwt.graphics.Point; import dwt.widgets.Control; -import tango.text.Util; import tango.util.Convert; +import dwt.dwthelper.utils; /** * Each control controlled by a <code>RowLayout</code> can have its initial @@ -105,10 +105,10 @@ this (point.x, point.y); } -char[] getName () { - char[] string = this.classinfo.name; - int index = locatePrior( string, '.'); - if (index is string.length ) return string; +String getName () { + String string = this.classinfo.name; + int index = string.lastIndexOf('.'); + if (index is -1 ) return string; return string[ index + 1 .. string.length ]; } @@ -118,12 +118,12 @@ * * @return a string representation of the RowData object */ -override public char[] toString () { - char[] string = getName ()~" {"; - if (width !is DWT.DEFAULT) string ~= "width="~to!(char[])(width)~" "; - if (height !is DWT.DEFAULT) string ~= "height="~to!(char[])(height)~" "; - if (exclude) string ~= "exclude="~to!(char[])(exclude)~" "; - string = trim( string ); +override public String toString () { + String string = getName ()~" {"; + if (width !is DWT.DEFAULT) string ~= "width="~to!(String)(width)~" "; + if (height !is DWT.DEFAULT) string ~= "height="~to!(String)(height)~" "; + if (exclude) string ~= "exclude="~to!(String)(exclude)~" "; + string = string.trim(); string ~= "}"; return string; }