Mercurial > projects > dwt-linux
comparison dwt/custom/StackLayout.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | 17f8449522fd |
children | c0d810de7093 |
comparison
equal
deleted
inserted
replaced
237:98b80b00af79 | 238:380bad9f6852 |
---|---|
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * Port to the D programming language: | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | 11 * Frank Benoit <benoit@tionex.de> |
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.custom.StackLayout; | 13 module dwt.custom.StackLayout; |
14 | |
15 import dwt.dwthelper.utils; | |
14 | 16 |
15 | 17 |
16 | 18 |
17 import dwt.DWT; | 19 import dwt.DWT; |
18 import dwt.graphics.Point; | 20 import dwt.graphics.Point; |
126 children[i].setVisible(children[i] is topControl); | 128 children[i].setVisible(children[i] is topControl); |
127 | 129 |
128 } | 130 } |
129 } | 131 } |
130 | 132 |
131 char[] getName () { | 133 String getName () { |
132 char[] string = this.classinfo.name; | 134 String string = this.classinfo.name; |
133 int index = tango.text.Util.locatePrior( string ,'.'); | 135 int index = tango.text.Util.locatePrior( string ,'.'); |
134 if (index is string.length ) return string; | 136 if (index is string.length ) return string; |
135 return string[ index + 1 .. $ ]; | 137 return string[ index + 1 .. $ ]; |
136 } | 138 } |
137 | 139 |
139 * Returns a string containing a concise, human-readable | 141 * Returns a string containing a concise, human-readable |
140 * description of the receiver. | 142 * description of the receiver. |
141 * | 143 * |
142 * @return a string representation of the layout | 144 * @return a string representation of the layout |
143 */ | 145 */ |
144 public override char[] toString () { | 146 public override String toString () { |
145 char[] string = getName ()~" {"; | 147 String string = getName ()~" {"; |
146 if (marginWidth !is 0) string ~= "marginWidth="~to!(char[])(marginWidth)~" "; | 148 if (marginWidth !is 0) string ~= "marginWidth="~to!(String)(marginWidth)~" "; |
147 if (marginHeight !is 0) string ~= "marginHeight="~to!(char[])(marginHeight)~" "; | 149 if (marginHeight !is 0) string ~= "marginHeight="~to!(String)(marginHeight)~" "; |
148 if (topControl !is null) string ~= "topControl="~to!(char[])(topControl)~" "; | 150 if (topControl !is null) string ~= "topControl="~to!(String)(topControl)~" "; |
149 string = tango.text.Util.trim(string); | 151 string = tango.text.Util.trim(string); |
150 string ~= "}"; | 152 string ~= "}"; |
151 return string; | 153 return string; |
152 } | 154 } |
153 } | 155 } |