Runtime

org.eclipse.gmf.runtime.draw2d.ui.text
Class TextUtilitiesEx

java.lang.Object
  extended by org.eclipse.draw2d.TextUtilities
      extended by org.eclipse.gmf.runtime.draw2d.ui.text.TextUtilitiesEx

public class TextUtilitiesEx
extends TextUtilities

Since:
2.1

Field Summary
 
Fields inherited from class org.eclipse.draw2d.TextUtilities
INSTANCE
 
Constructor Summary
TextUtilitiesEx(IMapMode mapmode)
          Creates a new instance.
 
Method Summary
 int getAscent(Font font)
          Gets the ascent, converted by the mapmode
 int getDescent(Font font)
          Gets the descent, converted by the mapmode
 Dimension getStringExtents(java.lang.String s, Font f)
          Gets a string's extents, converted by the mapmode
 Dimension getTextExtents(java.lang.String s, Font f)
          Gets text's extents, converted by the mapmode
 
Methods inherited from class org.eclipse.draw2d.TextUtilities
getLargestSubstringConfinedTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextUtilitiesEx

public TextUtilitiesEx(IMapMode mapmode)
Creates a new instance.

Parameters:
mapmode - mapmode to be used for translating measurement units
Method Detail

getAscent

public int getAscent(Font font)
Gets the ascent, converted by the mapmode

Overrides:
getAscent in class TextUtilities

getDescent

public int getDescent(Font font)
Gets the descent, converted by the mapmode

Overrides:
getDescent in class TextUtilities

getStringExtents

public Dimension getStringExtents(java.lang.String s,
                                  Font f)
Gets a string's extents, converted by the mapmode

Overrides:
getStringExtents in class TextUtilities

getTextExtents

public Dimension getTextExtents(java.lang.String s,
                                Font f)
Gets text's extents, converted by the mapmode

Overrides:
getTextExtents in class TextUtilities

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.