diff options
author | Grant Gayed <grant_gayed@ca.ibm.com> | 2012-10-11 14:24:58 -0400 |
---|---|---|
committer | Grant Gayed <grant_gayed@ca.ibm.com> | 2012-10-11 14:27:01 -0400 |
commit | d2a1d09a2450fdd75ca84606740151070c252a5a (patch) | |
tree | f67b3b34b90e2049db0469f4f4bc90975596bffb /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets | |
parent | 8796d59928d217bc37660078155636c76aa5bd39 (diff) | |
download | eclipse.platform.swt-d2a1d09a2450fdd75ca84606740151070c252a5a.tar.gz eclipse.platform.swt-d2a1d09a2450fdd75ca84606740151070c252a5a.tar.xz eclipse.platform.swt-d2a1d09a2450fdd75ca84606740151070c252a5a.zip |
Bug 391675 - CLabel documentation says class is not intended to be
subclassed, then recommends subclassing
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java index b45797e02b..65e63b75df 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java @@ -36,12 +36,13 @@ import org.eclipse.swt.accessibility.*; * </dl> * * </p><p> - * IMPORTANT: This class is <em>not</em> intended to be subclassed. + * This class may be subclassed for the purpose of overriding the default string + * shortening algorithm that is implemented in method <code>shortenText()</code>. * </p> * * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: CustomControlExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * @noextend This class is not intended to be subclassed by clients. + * @see CLabel#shortenText(GC, String, int) */ public class CLabel extends Canvas { @@ -148,14 +149,6 @@ private static int checkStyle (int style) { return style |= SWT.NO_FOCUS | SWT.DOUBLE_BUFFERED; } -//protected void checkSubclass () { -// String name = getClass().getName (); -// String validName = CLabel.class.getName(); -// if (!validName.equals(name)) { -// SWT.error (SWT.ERROR_INVALID_SUBCLASS); -// } -//} - public Point computeSize(int wHint, int hHint, boolean changed) { checkWidget(); Point e = getTotalSize(image, text); |