Class FigureUtilities


  • public final class FigureUtilities
    extends java.lang.Object
    Based on org.eclipse.draw2d.FigureUtilities .
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.swt.graphics.Point getTextDimension​(java.lang.String s, org.eclipse.swt.graphics.Font f)
      Returns the dimensions of the String s using the font f.
      static int getTextWidth​(java.lang.String s, org.eclipse.swt.graphics.Font f)
      Returns the width of s in Font f.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getTextDimension

        public static org.eclipse.swt.graphics.Point getTextDimension​(java.lang.String s,
                                                                      org.eclipse.swt.graphics.Font f)
        Returns the dimensions of the String s using the font f. Tab expansion and carriage return processing are performed.
        Parameters:
        s - the string
        f - the font
        Returns:
        the text's dimensions
        See Also:
        GC.textExtent(String)
      • getTextWidth

        public static int getTextWidth​(java.lang.String s,
                                       org.eclipse.swt.graphics.Font f)
        Returns the width of s in Font f.
        Parameters:
        s - the string
        f - the font
        Returns:
        the width