public class TextUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getShortStr(org.eclipse.swt.graphics.GC gc,
String t,
int width)
Shortens a supplied string so that it fits within the area specified by
the width argument.
|
static String |
getShortString(org.eclipse.swt.graphics.GC gc,
String t,
int width)
Deprecated.
when text is large, performance is poor, possible occur OOM exception. suggest use
getShortStr(GC, String, int) |
static String |
getShortText(org.eclipse.swt.graphics.GC gc,
String t,
int width)
Deprecated.
when text is large, performance is poor, possible occur OOM exception. suggest use
getShortStr(GC, String, int) |
@Deprecated public static String getShortText(org.eclipse.swt.graphics.GC gc, String t, int width)
getShortStr(GC, String, int)GC.textExtent(String).gc - GC used to perform calculation.t - text to modify.width - Pixels to display.@Deprecated public static String getShortString(org.eclipse.swt.graphics.GC gc, String t, int width)
getShortStr(GC, String, int)GC.stringExtent(String).gc - GC used to perform calculation.t - text to modify.width - Pixels to display.public static String getShortStr(org.eclipse.swt.graphics.GC gc, String t, int width)
GC.getCharWidth(char).gc - GC used to perform calculation.t - text to modify.width - Pixels to display.Copyright © 2020. All rights reserved.