org.nakedobjects.plugins.dnd.viewer.drawing
Interface Text

All Known Implementing Classes:
AwtText

public interface Text


Method Summary
 int charWidth(char c)
          Returns the width, in pixels, of the specified character.
 int getAscent()
          Returns the height, in pixels, of the distance from the baseline to top of the tallest character (including accents that are not common in english.
 int getDescent()
          Returns the height, in pixels, of the distance from bottom of the lowest descending character to the baseline.
 int getLineHeight()
          Returns the sum of the text height and line spacing.
 int getLineSpacing()
          Returns the number of blank vertical pixels to add between adjacent lines to give them additional spacing.
 int getMidPoint()
          Returns the mid point, in pixels, between the baseline and the top of the characters.
 java.lang.String getName()
          Return the name of this text style.
 int getTextHeight()
          Returns the height, in pixels, for a normal line of text - where there is some space between two lines of text.
 int stringHeight(java.lang.String text, int maxWidth)
          Returns the height in pixels when the specified text is wrapped at the specified width
 int stringWidth(java.lang.String text)
          Returns the width of the specified in pixels.
 int stringWidth(java.lang.String message, int maxWidth)
           
 

Method Detail

charWidth

int charWidth(char c)
Returns the width, in pixels, of the specified character.


getAscent

int getAscent()
Returns the height, in pixels, of the distance from the baseline to top of the tallest character (including accents that are not common in english.


getDescent

int getDescent()
Returns the height, in pixels, of the distance from bottom of the lowest descending character to the baseline.


getMidPoint

int getMidPoint()
Returns the mid point, in pixels, between the baseline and the top of the characters.


getName

java.lang.String getName()
Return the name of this text style.


getTextHeight

int getTextHeight()
Returns the height, in pixels, for a normal line of text - where there is some space between two lines of text.


getLineHeight

int getLineHeight()
Returns the sum of the text height and line spacing.

See Also:
getLineHeight(), getLineSpacing()

getLineSpacing

int getLineSpacing()
Returns the number of blank vertical pixels to add between adjacent lines to give them additional spacing.


stringWidth

int stringWidth(java.lang.String text)
Returns the width of the specified in pixels.


stringHeight

int stringHeight(java.lang.String text,
                 int maxWidth)
Returns the height in pixels when the specified text is wrapped at the specified width


stringWidth

int stringWidth(java.lang.String message,
                int maxWidth)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.