public class TextUtils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
TextUtils()
Protected constructor to prevent instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getShortString(org.eclipse.swt.graphics.GC gc,
java.lang.String t,
int width)
Shortens a supplied string so that it fits within the area specified by
the width argument.
|
static java.lang.String |
getShortText(org.eclipse.swt.graphics.GC gc,
java.lang.String t,
int width)
Shortens a supplied string so that it fits within the area specified by
the width argument.
|
public static java.lang.String getShortText(org.eclipse.swt.graphics.GC gc,
java.lang.String t,
int width)
GC.textExtent(String).gc - GC used to perform calculation.t - text to modify.width - Pixels to display.public static java.lang.String getShortString(org.eclipse.swt.graphics.GC gc,
java.lang.String t,
int width)
GC.stringExtent(String).gc - GC used to perform calculation.t - text to modify.width - Pixels to display.