KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > custom > SashFormData


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  *******************************************************************************/

11 package org.eclipse.swt.custom;
12
13 class SashFormData {
14
15     long weight;
16
17 String JavaDoc getName () {
18     String JavaDoc string = getClass ().getName ();
19     int index = string.lastIndexOf ('.');
20     if (index == -1) return string;
21     return string.substring (index + 1, string.length ());
22 }
23
24 /**
25  * Returns a string containing a concise, human-readable
26  * description of the receiver.
27  *
28  * @return a string representation of the event
29  */

30 public String JavaDoc toString () {
31     return getName()+" {weight="+weight+"}"; //$NON-NLS-2$
32
}
33 }
34
Popular Tags