Class Util

java.lang.Object
org.swtchart.internal.Util

public final class Util extends Object
A utility class providing generic methods.
  • 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 is null or already disposed, point containing size zero will be returned.
      Parameters:
      font - the font
      text - the text
      Returns:
      a point containing text extent
    • getIndexDefinedInSWT

      public static int getIndexDefinedInSWT(LineStyle lineStyle)
      Gets the index defined in SWT.
      Parameters:
      lineStyle - the line style
      Returns:
      the index defined in SWT.