Show
Ignore:
Timestamp:
05/04/08 18:42:55 (4 years ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted char[] to String

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/layout/RowLayout.d

    r201 r238  
    2020import dwt.widgets.Composite; 
    2121import dwt.layout.RowData; 
    22 import tango.text.Util; 
    2322import tango.util.Convert; 
    2423import Math = tango.math.Math; 
     24import dwt.dwthelper.utils; 
    2525 
    2626 
     
    221221} 
    222222 
    223 char[] getName () { 
    224     char[] string = this.classinfo.name; 
    225     int index = locatePrior( string, '.'); 
    226     if (index is string.length ) return string; 
     223String getName () { 
     224    String string = this.classinfo.name; 
     225    int index = string.lastIndexOf('.'); 
     226    if (index is -1 ) return string; 
    227227    return string[ index + 1 .. string.length ]; 
    228228} 
     
    457457 * @return a string representation of the layout 
    458458 */ 
    459 override public char[] toString () { 
    460     char[] string = getName ()~" {"; 
     459override public String toString () { 
     460    String string = getName ()~" {"; 
    461461    string ~= "type="~((type !is DWT.HORIZONTAL) ? "DWT.VERTICAL" : "DWT.HORIZONTAL")~" "; 
    462     if (marginWidth !is 0) string ~= "marginWidth="~to!(char[])(marginWidth)~" "; 
    463     if (marginHeight !is 0) string ~= "marginHeight="~to!(char[])(marginHeight)~" "; 
    464     if (marginLeft !is 0) string ~= "marginLeft="~to!(char[])(marginLeft)~" "; 
    465     if (marginTop !is 0) string ~= "marginTop="~to!(char[])(marginTop)~" "; 
    466     if (marginRight !is 0) string ~= "marginRight="~to!(char[])(marginRight)~" "; 
    467     if (marginBottom !is 0) string ~= "marginBottom="~to!(char[])(marginBottom)~" "; 
    468     if (spacing !is 0) string ~= "spacing="~to!(char[])(spacing)~" "; 
    469     string ~= "wrap="~to!(char[])(wrap)~" "; 
    470     string ~= "pack="~to!(char[])(pack)~" "; 
    471     string ~= "fill="~to!(char[])(fill)~" "; 
    472     string ~= "justify="~to!(char[])(justify)~" "; 
    473     string = trim( string ); 
     462    if (marginWidth !is 0) string ~= "marginWidth="~to!(String)(marginWidth)~" "; 
     463    if (marginHeight !is 0) string ~= "marginHeight="~to!(String)(marginHeight)~" "; 
     464    if (marginLeft !is 0) string ~= "marginLeft="~to!(String)(marginLeft)~" "; 
     465    if (marginTop !is 0) string ~= "marginTop="~to!(String)(marginTop)~" "; 
     466    if (marginRight !is 0) string ~= "marginRight="~to!(String)(marginRight)~" "; 
     467    if (marginBottom !is 0) string ~= "marginBottom="~to!(String)(marginBottom)~" "; 
     468    if (spacing !is 0) string ~= "spacing="~to!(String)(spacing)~" "; 
     469    string ~= "wrap="~to!(String)(wrap)~" "; 
     470    string ~= "pack="~to!(String)(pack)~" "; 
     471    string ~= "fill="~to!(String)(fill)~" "; 
     472    string ~= "justify="~to!(String)(justify)~" "; 
     473    string = string.trim(); 
    474474    string ~= "}"; 
    475475    return string;