summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java1
2 files changed, 3 insertions, 11 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);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
index 5391eaccbd..11a746c92a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
@@ -72,7 +72,6 @@ Canvas () {
* </ul>
*
* @see SWT
- * @see Widget#checkSubclass
* @see Widget#getStyle
*/
public Canvas (Composite parent, int style) {