| 1 |
/******************************************************************************* |
|---|
| 2 |
* Copyright (c) 2000, 2005 IBM Corporation and others. |
|---|
| 3 |
* All rights reserved. This program and the accompanying materials |
|---|
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
|---|
| 5 |
* which accompanies this distribution, and is available at |
|---|
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
|---|
| 7 |
* |
|---|
| 8 |
* Contributors: |
|---|
| 9 |
* IBM Corporation - initial API and implementation |
|---|
| 10 |
* Port to the D programming language: |
|---|
| 11 |
* Frank Benoit <benoit@tionex.de> |
|---|
| 12 |
*******************************************************************************/ |
|---|
| 13 |
module dwt.custom.SashFormData; |
|---|
| 14 |
|
|---|
| 15 |
import dwt.dwthelper.utils; |
|---|
| 16 |
|
|---|
| 17 |
static import tango.text.Util; |
|---|
| 18 |
import tango.util.Convert; |
|---|
| 19 |
|
|---|
| 20 |
class SashFormData { |
|---|
| 21 |
|
|---|
| 22 |
long weight; |
|---|
| 23 |
|
|---|
| 24 |
String getName () { |
|---|
| 25 |
String string = this.classinfo.name; |
|---|
| 26 |
int index = tango.text.Util.locatePrior( string ,'.' ); |
|---|
| 27 |
if (index is string.length ) return string; |
|---|
| 28 |
return string[ index + 1 .. $ ]; |
|---|
| 29 |
} |
|---|
| 30 |
|
|---|
| 31 |
/** |
|---|
| 32 |
* Returns a string containing a concise, human-readable |
|---|
| 33 |
* description of the receiver. |
|---|
| 34 |
* |
|---|
| 35 |
* @return a string representation of the event |
|---|
| 36 |
*/ |
|---|
| 37 |
public override String toString () { |
|---|
| 38 |
return getName()~" {weight="~to!(String)(weight)~"}"; //$NON-NLS-2$ |
|---|
| 39 |
} |
|---|
| 40 |
} |
|---|