Package org.swtchart.internal
Class Util
java.lang.Object
org.swtchart.internal.Util
A utility class providing generic methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.swt.graphics.Point
getExtentInGC
(org.eclipse.swt.graphics.Font font, String text) Gets the text extent with given font in GC.static int
getIndexDefinedInSWT
(LineStyle lineStyle) Gets the index defined in SWT.
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getExtentInGC
public static org.eclipse.swt.graphics.Point getExtentInGC(org.eclipse.swt.graphics.Font font, String text) Gets the text extent with given font in GC. If the given font isnull
or already disposed, point containing size zero will be returned.- Parameters:
font
- the fonttext
- the text- Returns:
- a point containing text extent
-
getIndexDefinedInSWT
Gets the index defined in SWT.- Parameters:
lineStyle
- the line style- Returns:
- the index defined in SWT.
-