public class TextUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getShortStr(org.eclipse.swt.graphics.GC gc,
java.lang.String text,
int width,
int style)
Shortens a supplied string so that it fits within the area specified by the
width argument.
|
public static java.lang.String getShortStr(org.eclipse.swt.graphics.GC gc,
java.lang.String text,
int width,
int style)
GC.getCharWidth(char).gc - GC used to perform calculation.text - text to modify.width - Pixels to display.style - truncation style. see SWT.LEFT, SWT.CENTER,
SWT.RIGHT