|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Locator interface defines the methods needed to
compute the coordinates, bounds, and center of a String
displayed in a given Font using the given anchor
positions 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. |
Rectangle2D |
getBounds2D(String string,
Font font,
float anchorX,
float anchorY)
Returns a copy of the 2-dimensional bounds of the area that will be occupied by the displayed string. |
Point2D |
getCenter(String string,
Font font,
float anchorX,
float anchorY)
Returns a copy of the logical center of the displayed string, that is, the point specified by getCenterX and by
getBaseLineY. |
float |
getCenterX(String string,
Font font,
float anchorX)
Returns the center x-coordinate of the string. |
float |
getDescentLineY(String string,
Font font,
float anchorY)
Returns the descent line y-coordinate of the string. |
float |
getHeight(String string,
Font font,
float anchorY)
Returns the height of the area that will be occupied by the displayed string. |
float |
getLeadingLineY(String string,
Font font,
float anchorY)
Returns the leading line y-coordinate of the string. |
float |
getLeftX(String string,
Font font,
float anchorX)
Returns the left x-coordinate of the string. |
float |
getRightX(String string,
Font font,
float anchorX)
Returns the right x-coordinate of the string. |
float |
getWidth(String string,
Font font,
float anchorX)
Returns the width of the area that will be occupied by the displayed string. |
| Method Detail |
public float getLeftX(String string,
Font font,
float anchorX)
string - the string to displayfont - the font to use for the displayanchorX - the x-coordinate of the anchor position
public float getRightX(String string,
Font font,
float anchorX)
string - the string to displayfont - the font to use for the displayanchorX - the x-coordinate of the anchor position
public float getCenterX(String string,
Font font,
float anchorX)
string - the string to displayfont - the font to use for the displayanchorX - the x-coordinate of the anchor position
public float getBaseLineY(String string,
Font font,
float anchorY)
string - the string to displayfont - the font to use for the displayanchorY - the y-coordinate of the anchor position
public float getAscentLineY(String string,
Font font,
float anchorY)
string - the string to displayfont - the font to use for the displayanchorY - the y-coordinate of the anchor position
public float getDescentLineY(String string,
Font font,
float anchorY)
string - the string to displayfont - the font to use for the displayanchorY - the y-coordinate of the anchor position
public float getLeadingLineY(String string,
Font font,
float anchorY)
string - the string to displayfont - the font to use for the displayanchorY - the y-coordinate of the anchor position
public float getWidth(String string,
Font font,
float anchorX)
Returns the width of the area that will be occupied by the displayed string.
string - the string to displayfont - the font to use for the displayanchorX - the x-coordinate of the anchor position
public float getHeight(String string,
Font font,
float anchorY)
Returns the height of the area that will be occupied by the displayed string.
string - the string to displayfont - the font to use for the displayanchorY - the y-coordinate of the anchor position
public Rectangle2D getBounds2D(String string,
Font font,
float anchorX,
float anchorY)
Returns a copy of the 2-dimensional bounds of the area that will be occupied by the displayed string.
string - the string to displayfont - the font to use for the displayanchorX - the x-coordinate of the anchor positionanchorY - the y-coordinate of the anchor position
public Point2D getCenter(String string,
Font font,
float anchorX,
float anchorY)
Returns a copy of the logical center of the displayed string,
that is, the point specified by getCenterX and by
getBaseLineY.
string - the string to displayfont - the font to use for the displayanchorX - the x-coordinate of the anchor positionanchorY - the y-coordinate of the anchor position
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||