|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.awt.font.GraphicAttribute
java.awt.font.ImageGraphicAttribute
public final class ImageGraphicAttribute
ImageGraphicAttribute 类是在 TextLayout 中绘制图像的 GraphicAttribute 实现。
GraphicAttribute| 字段摘要 |
|---|
| 从类 java.awt.font.GraphicAttribute 继承的字段 |
|---|
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT |
| 构造方法摘要 | |
|---|---|
ImageGraphicAttribute(Image image,
int alignment)
根据指定的 Image 构造一个 ImageGraphicAttribute。 |
|
ImageGraphicAttribute(Image image,
int alignment,
float originX,
float originY)
根据指定的 Image 构造一个 ImageGraphicAttribute。 |
|
| 方法摘要 | |
|---|---|
void |
draw(Graphics2D graphics,
float x,
float y)
在指定的位置呈现此 GraphicAttribute。 |
boolean |
equals(ImageGraphicAttribute rhs)
比较此 ImageGraphicAttribute 与指定的 ImageGraphicAttribute。 |
boolean |
equals(Object rhs)
比较此 ImageGraphicAttribute 与指定的 Object。 |
float |
getAdvance()
返回此 ImageGraphicAttribute 的 advance。 |
float |
getAscent()
返回此 ImageGraphicAttribute 的 ascent。 |
Rectangle2D |
getBounds()
返回一个 Rectangle2D,它封装此 ImageGraphicAttribute 相对于呈现位置呈现的所有位。 |
float |
getDescent()
返回此 ImageGraphicAttribute 的 descent。 |
int |
hashCode()
返回此 ImageGraphicAttribute 的哈希码。 |
| 从类 java.awt.font.GraphicAttribute 继承的方法 |
|---|
getAlignment, getJustificationInfo, getOutline |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ImageGraphicAttribute(Image image,
int alignment)
Image 构造一个 ImageGraphicAttribute。原点位于 (0, 0)。
image - 此 ImageGraphicAttribute 呈现的 Image。此对象保持对 image 的引用。alignment - 此 ImageGraphicAttribute 的一种对齐方式。
public ImageGraphicAttribute(Image image,
int alignment,
float originX,
float originY)
Image 构造一个 ImageGraphicAttribute。Image 中的点 (originX, originY) 出现在文本中 ImageGraphicAttribute 的原点。
image - 此 ImageGraphicAttribute 呈现的 Image。此对象保持对 image 的引用。alignment - 此 ImageGraphicAttribute 的一种对齐方式originX - Image 中点的 X 坐标,该点显示在文本行中 ImageGraphicAttribute 的原点位置上。originY - Image 中点的 Y 坐标,该点显示在文本行中 ImageGraphicAttribute 的原点位置上。| 方法详细信息 |
|---|
public float getAscent()
ImageGraphicAttribute 的 ascent。ImageGraphicAttribute 的 ascent 是从该图像的顶端到原点的距离。
GraphicAttribute 中的 getAscentImageGraphicAttribute 的 ascent。GraphicAttribute.getBounds()public float getDescent()
ImageGraphicAttribute 的 descent。ImageGraphicAttribute 的 descent 是从原点到该图像底部的距离。
GraphicAttribute 中的 getDescentImageGraphicAttribute 的 descent。GraphicAttribute.getBounds()public float getAdvance()
ImageGraphicAttribute 的 advance。ImageGraphicAttribute 的 advance 是从原点到该图像右边缘的距离。
GraphicAttribute 中的 getAdvanceImageGraphicAttribute 的 advance。GraphicAttribute.getBounds()public Rectangle2D getBounds()
Rectangle2D,它封装此 ImageGraphicAttribute 相对于呈现位置呈现的所有位。图形可以在其原点、ascent、descent 和 advance 之外呈现;但如果这样做,此方法的实现必须指示呈现该图形的位置。
GraphicAttribute 中的 getBoundsImageGraphicAttribute 呈现的所有位的 Rectangle2D。
public void draw(Graphics2D graphics,
float x,
float y)
GraphicAttribute。
GraphicAttribute 中的 drawgraphics - 将该图形呈现到的 Graphics2Dpublic int hashCode()
ImageGraphicAttribute 的哈希码。
Object 中的 hashCodeObject.equals(java.lang.Object),
Hashtablepublic boolean equals(Object rhs)
ImageGraphicAttribute 与指定的 Object。
Object 中的 equalsrhs - 要测试相等性的 Object
ImageGraphicAttribute 与 rhs 相等,则返回 true;否则返回 false。Object.hashCode(),
Hashtablepublic boolean equals(ImageGraphicAttribute rhs)
ImageGraphicAttribute 与指定的 ImageGraphicAttribute。
rhs - 要测试相等性的 ImageGraphicAttribute
ImageGraphicAttribute 与 rhs 相等,则返回 true;否则返回 false。
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。