| 
JavaTM 2 Platform Standard Ed. 5.0  | 
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
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)
在指定的位置呈现该图形。  | 
 boolean | 
equals(ImageGraphicAttribute rhs)
比较此 ImageGraphicAttribute 与指定的 ImageGraphicAttribute。 | 
 boolean | 
equals(Object rhs)
比较此 ImageGraphicAttribute 与指定的 Object。 | 
 float | 
getAdvance()
返回此 ImageGraphicAttribute 的 advance。 | 
 float | 
getAscent()
返回此 ImageGraphicAttribute 的 ascent。 | 
 Rectangle2D | 
getBounds()
返回包括所有相对于呈现位置并且由此 ImageGraphicAttribute 呈现的所有位的 Rectangle2D。 | 
 float | 
getDescent()
返回此 ImageGraphicAttribute 的 descent。 | 
 int | 
hashCode()
返回此 ImageGraphicAttribute 的哈希码。 | 
| 从类 java.awt.font.GraphicAttribute 继承的方法 | 
|---|
getAlignment, getJustificationInfo | 
| 从类 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, originY - Image 中点的坐标,它显示在文本行中 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()
ImageGraphicAttribute 呈现的所有位的 Rectangle2D。图形可以在其原点、ascent、descent 和 advance 之外呈现;但是如果这样的话,此方法的实现必须指示呈现该图形的位置。
GraphicAttribute 中的 getBoundsImageGraphicAttribute 呈现的所有位的 Rectangle2D。
public void draw(Graphics2D graphics,
                 float x,
                 float y)
GraphicAttribute 中的 drawgraphics - 将该图形呈现到的 Graphics2Dx, y - 呈现该图形的用户空间坐标public 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 2 Platform Standard Ed. 5.0  | 
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。