edu.neu.ccs.gui
Interface TextAnchor.YLocator

Enclosing interface:
TextAnchor

public static interface TextAnchor.YLocator

The YLocator interface defines the methods needed to compute the y-coordinate of the base line, ascent line, descent line, and leading line of a given String displayed in a given Font using the given anchorY position and this strategy.


Method Summary
 float getAscentLineY(String string, Font font, float anchorY)
          Returns the ascent line y-coordinate of the string.
 float getBaseLineY(String string, Font font, float anchorY)
          Returns the base line y-coordinate of the string.
 float getDescentLineY(String string, Font font, float anchorY)
          Returns the descent line y-coordinate of the string.
 float getLeadingLineY(String string, Font font, float anchorY)
          Returns the leading line y-coordinate of the string.
 

Method Detail

getBaseLineY

public float getBaseLineY(String string,
                          Font font,
                          float anchorY)
Returns the base line y-coordinate of the string.

Parameters:
string - the string to display
font - the font to use for the display
anchorY - the y-coordinate of the anchor position
Returns:
the base line y-coordinate of the string

getAscentLineY

public float getAscentLineY(String string,
                            Font font,
                            float anchorY)
Returns the ascent line y-coordinate of the string.

Parameters:
string - the string to display
font - the font to use for the display
anchorY - the y-coordinate of the anchor position
Returns:
the ascent line y-coordinate of the string

getDescentLineY

public float getDescentLineY(String string,
                             Font font,
                             float anchorY)
Returns the descent line y-coordinate of the string.

Parameters:
string - the string to display
font - the font to use for the display
anchorY - the y-coordinate of the anchor position
Returns:
the descent line y-coordinate of the string

getLeadingLineY

public float getLeadingLineY(String string,
                             Font font,
                             float anchorY)
Returns the leading line y-coordinate of the string.

Parameters:
string - the string to display
font - the font to use for the display
anchorY - the y-coordinate of the anchor position
Returns:
the leading line y-coordinate of the string