JavaTM 2 Platform
Standard Ed. 6

接口 java.awt.Shape
的使用

使用 Shape 的软件包
java.awt 包含用于创建用户界面和绘制图形图像的所有类。 
java.awt.font 提供与字体相关的类和接口。 
java.awt.geom 提供用于在与二维几何形状相关的对象上定义和执行操作的 Java 2D 类。 
java.awt.image.renderable 提供用于生成与呈现无关的图像的类和接口。 
javax.swing 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 
javax.swing.plaf.basic 提供了根据基本外观构建的用户界面对象。 
javax.swing.text 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
javax.swing.text.html 提供类 HTMLEditorKit 和创建 HTML 文本编辑器的支持类。 
 

java.awtShape 的使用
 

实现 Shapejava.awt 中的类
 class Polygon
          Polygon 类封装了坐标空间中封闭的二维区域的描述。
 class Rectangle
          Rectangle 指定坐标空间中的一个区域,通过坐标空间中 Rectangle 对象左上方的点 (x,y)、宽度和高度可以定义这个区域。
 

返回 Shapejava.awt 中的方法
 Shape BasicStroke.createStrokedShape(Shape s)
          返回一个 Shape,它在内部定义了指定 Shape 的笔划轮廓。
 Shape Stroke.createStrokedShape(Shape p)
          返回一个轮廓 Shape,它封闭了应该在根据规则描绘 Shape 时绘制的区域,这些规则是由实现 Stroke 接口的对象定义的。
abstract  Shape Graphics.getClip()
          获取当前剪贴区域。
 

参数类型为 Shapejava.awt 中的方法
abstract  void Graphics2D.clip(Shape s)
          将当前 Clip 与指定 Shape 的内部区域相交,并将 Clip 设置为所得的交集。
 Shape BasicStroke.createStrokedShape(Shape s)
          返回一个 Shape,它在内部定义了指定 Shape 的笔划轮廓。
 Shape Stroke.createStrokedShape(Shape p)
          返回一个轮廓 Shape,它封闭了应该在根据规则描绘 Shape 时绘制的区域,这些规则是由实现 Stroke 接口的对象定义的。
abstract  void Graphics2D.draw(Shape s)
          使用当前 Graphics2D 上下文的设置勾画 Shape 的轮廓。
abstract  void Graphics2D.fill(Shape s)
          使用 Graphics2D 上下文的设置,填充 Shape 的内部区域。
abstract  boolean Graphics2D.hit(Rectangle rect, Shape s, boolean onStroke)
          检查指定的 Shape 是否与设备空间中的指定 Rectangle 相交。
abstract  void Graphics.setClip(Shape clip)
          将当前剪贴区域设置为任意的剪贴形状。
 

java.awt.fontShape 的使用
 

返回 Shapejava.awt.font 中的方法
 Shape TextLayout.getBlackBoxBounds(int firstEndpoint, int secondEndpoint)
          返回指定范围中字符的黑框边界。
 Shape TextLayout.getCaretShape(TextHitInfo hit)
          返回表示此 TextLayout 的自然边界中指定目标字符处插入符的 Shape
 Shape TextLayout.getCaretShape(TextHitInfo hit, Rectangle2D bounds)
          返回表示指定边界内指定目标字符处插入符的 Shape
 Shape[] TextLayout.getCaretShapes(int offset)
          返回对应于强插入符和弱插入符的两条路径。
 Shape[] TextLayout.getCaretShapes(int offset, Rectangle2D bounds)
          返回对应于强插入符和弱插入符的两条路径。
 Shape[] TextLayout.getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy)
          返回对应于强插入符和弱插入符的两条路径。
abstract  Shape GlyphVector.getGlyphLogicalBounds(int glyphIndex)
          返回此 GlyphVector 中指定字形的逻辑边界。
abstract  Shape GlyphVector.getGlyphOutline(int glyphIndex)
          返回其内部区域与此 GlyphVector 中指定字形的可视表示形式对应的 Shape
 Shape GlyphVector.getGlyphOutline(int glyphIndex, float x, float y)
          返回一个 Shape,其内部区域与此 GlyphVector 中指定字形的可视表示形式对应,并偏移到 x、y。
abstract  Shape GlyphVector.getGlyphVisualBounds(int glyphIndex)
          返回 GlyphVector 中指定字形的可视边界。
 Shape TextLayout.getLogicalHighlightShape(int firstEndpoint, int secondEndpoint)
          返回封装指定范围中逻辑选择范围的 Shape,它扩展到此 TextLayout 的自然边界。
 Shape TextLayout.getLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds)
          返回封闭指定范围中扩展到指定 bounds 的逻辑选择范围的 Shape
abstract  Shape GlyphVector.getOutline()
          返回其内部区域与此 GlyphVector 的可视表示形式对应的 Shape
 Shape GraphicAttribute.getOutline(AffineTransform tx)
          返回表示此 GraphicAttribute 呈现区域的 Shape
 Shape ShapeGraphicAttribute.getOutline(AffineTransform tx)
          返回一个表示此 ShapeGraphicAttribute 呈现区域的 Shape
 Shape TextLayout.getOutline(AffineTransform tx)
          返回表示此 TextLayout 的轮廓的 Shape
abstract  Shape GlyphVector.getOutline(float x, float y)
          返回在 x、y 处呈现时,其内部区域与此 GlyphVector 的可视表示形式对应的 Shape
 Shape TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint)
          返回封闭指定范围中扩展到指定边界的可视选择范围的 Shape
 Shape TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds)
          返回封闭指定范围中扩展到 bounds 的可视选择范围的路径。
 

参数类型为 Shapejava.awt.font 中的构造方法
ShapeGraphicAttribute(Shape shape, int alignment, boolean stroke)
          针对指定 Shape 构造 ShapeGraphicAttribute
 

java.awt.geomShape 的使用
 

实现 Shapejava.awt.geom 中的类
 class Arc2D
          Arc2D 是所有存储 2D 弧度的对象的抽象超类,其中 2D 弧度由窗体矩形、起始角度、角跨越(弧的长度)和闭合类型(OPENCHORDPIE)定义。
static class Arc2D.Double
          此类定义以 double 精度指定的弧。
static class Arc2D.Float
          此类定义以 float 精度指定的弧。
 class Area
          Area 对象存储和操作 2 维空间封闭区域的与解析无关的描述。
 class CubicCurve2D
          CubicCurve2D 类定义 (x,y) 坐标空间内的三次参数曲线段。
static class CubicCurve2D.Double
          使用 double 坐标指定的三次参数曲线段。
static class CubicCurve2D.Float
          使用 float 坐标指定的三次参数曲线段。
 class Ellipse2D
          Ellipse2D 类描述窗体矩形定义的椭圆。
static class Ellipse2D.Double
          Double 类以 double 精度定义椭圆。
static class Ellipse2D.Float
          Float 类以 float 精度定义椭圆。
 class GeneralPath
          GeneralPath 类表示根据直线、二次曲线和三次 (Bézier) 曲线构造的几何路径。
 class Line2D
          Line2D 表示 (x,y) 坐标空间中的线段。
static class Line2D.Double
          使用 double 坐标指定的线段。
static class Line2D.Float
          使用 float 坐标指定的线段。
 class Path2D
          Path2D 类提供一个表示任意几何形状路径的简单而又灵活的形状。
static class Path2D.Double
          Double 类定义了一条几何路径,它具有以双精度浮点值形式存储的坐标。
static class Path2D.Float
          Float 类定义了一条几何路径,它具有以单精度浮点值形式存储的坐标。
 class QuadCurve2D
          QuadCurve2D 类定义 (x,y) 坐标空间内的二次参数曲线段。
static class QuadCurve2D.Double
          使用 double 坐标指定的二次参数曲线段。
static class QuadCurve2D.Float
          使用 float 坐标指定的二次参数曲线段。
 class Rectangle2D
          Rectangle2D 类描述通过位置 (x,y) 和尺寸 (w x h) 定义的矩形。
static class Rectangle2D.Double
          Double 类定义一个在 double 坐标中指定的矩形。
static class Rectangle2D.Float
          Float 类定义一个在 float 坐标中指定的矩形。
 class RectangularShape
          RectangularShape 是许多 Shape 对象的基类,这些对象的几何形状由矩形窗体定义。
 class RoundRectangle2D
          RoundRectangle2D 类定义一个矩形,该矩形具有由位置 (x,y)、维度 (w x h) 以及圆角弧的宽度和高度定义的圆角。
static class RoundRectangle2D.Double
          Double 类定义一个所有圆角都使用 double 坐标指定的矩形。
static class RoundRectangle2D.Float
          Float 类定义一个所有圆角都使用 float 坐标指定的矩形。
 

返回 Shapejava.awt.geom 中的方法
 Shape Path2D.createTransformedShape(AffineTransform at)
          返回一个表示此 Path2D 变换形式的新 Shape
 Shape AffineTransform.createTransformedShape(Shape pSrc)
          返回新的 Shape 对象,它在通过此变换之后,由指定 Shape 的几何形状定义。
 

参数类型为 Shapejava.awt.geom 中的方法
 void Path2D.append(Shape s, boolean connect)
          将指定 Shape 对象的几何形状添加到路径中,可能要使用一条线段将新几何形状连接到现有路径段。
 Shape AffineTransform.createTransformedShape(Shape pSrc)
          返回新的 Shape 对象,它在通过此变换之后,由指定 Shape 的几何形状定义。
 

参数类型为 Shapejava.awt.geom 中的构造方法
Area(Shape s)
          Area 类可以根据指定的 Shape 对象创建区域几何形状。
GeneralPath(Shape s)
          根据任意 Shape 对象构造一个新 GeneralPath 对象。
Path2D.Double(Shape s)
          根据任意 Shape 对象构造一个新的双精度 Path2D 对象。
Path2D.Double(Shape s, AffineTransform at)
          根据由 AffineTransform 对象变换的任意 Shape 对象构造一个新的双精度 Path2D 对象。
Path2D.Float(Shape s)
          根据任意 Shape 对象构造一个新的单精度 Path2D 对象。
Path2D.Float(Shape s, AffineTransform at)
          根据 AffineTransform 对象变换的任意 Shape 对象构造一个新的单精度 Path2D 对象。
 

java.awt.image.renderableShape 的使用
 

返回 Shapejava.awt.image.renderable 中的方法
 Shape RenderContext.getAreaOfInterest()
          获取当前包含在 RenderContext 中的感兴趣区域。
 

参数类型为 Shapejava.awt.image.renderable 中的方法
 void RenderContext.setAreaOfInterest(Shape newAoi)
          设置当前的感兴趣区域。
 

参数类型为 Shapejava.awt.image.renderable 中的构造方法
RenderContext(AffineTransform usr2dev, Shape aoi)
          构造具有给定变换和感兴趣区域的 RenderContext。
RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
          构造具有给定转换的 RenderContext。
 

javax.swingShape 的使用
 

返回 Shapejavax.swing 中的方法
 Shape DebugGraphics.getClip()
          重写 Graphics.getClip
 

参数类型为 Shapejavax.swing 中的方法
 void DebugGraphics.setClip(Shape clip)
          重写 Graphics.setClip
 

javax.swing.plaf.basicShape 的使用
 

实现 Shapejavax.swing.plaf.basic 中的类
static class BasicTextUI.BasicCaret
           
 

javax.swing.textShape 的使用
 

实现 Shapejavax.swing.text 中的类
 class DefaultCaret
          插入符的默认实现。
 

返回 Shapejavax.swing.text 中的方法
protected  Shape FieldView.adjustAllocation(Shape a)
          调整给定视图的分配区域,使其适合文本字段的分配区域。
protected  Shape AsyncBoxView.ChildLocator.getChildAllocation(int index)
          获取用于子视图的分配区域。
 Shape AsyncBoxView.getChildAllocation(int index, Shape a)
          获取给定子视图的分配区域。
 Shape AsyncBoxView.ChildLocator.getChildAllocation(int index, Shape a)
          获取用于子视图的分配区域。
 Shape BoxView.getChildAllocation(int index, Shape a)
          获取给定子视图的分配。
 Shape CompositeView.getChildAllocation(int index, Shape a)
          获取要在其中呈现的给定子视图的分配区域。
 Shape View.getChildAllocation(int index, Shape a)
          获取给定子视图的分配。
abstract  Shape GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
          为给定区域提供从文档模型坐标空间到视图坐标空间的映射。
 Shape View.modelToView(int pos, Shape a)
          已过时。  
 Shape AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape BoxView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型的坐标空间到映射到它的视图的坐标空间的映射。
 Shape ComponentView.modelToView(int pos, Shape a, Position.Bias b)
          提供模型坐标空间到视图坐标空间的映射。
 Shape CompositeView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape GlyphView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape IconView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape PasswordView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape FieldView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape PlainView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
abstract  Shape View.modelToView(int pos, Shape a, Position.Bias b)
          为给定字符提供从文档模型坐标空间到视图坐标空间的映射。
 Shape DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
          绘制高亮显示的某一部分。
abstract  Shape LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
           
 

参数类型为 Shapejavax.swing.text 中的方法
protected  Shape FieldView.adjustAllocation(Shape a)
          调整给定视图的分配区域,使其适合文本字段的分配区域。
 View ParagraphView.breakView(int axis, float len, Shape a)
          以给定的长度在给定的轴上拆分此视图。
 void FlowView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          发出通知,通知文档中此视图负责的某个位置的属性已更改。
 void GlyphView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档此视图负责的位置处的属性已更改。
 void LabelView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档此视图负责的位置处的属性已更改。
 void ParagraphView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          发出通知,通知文档中此视图负责的某个位置的属性已更改。
 void WrappedPlainView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出文档中此视图负责的位置上的属性已发生更改的通知。
 void PlainView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          发出通知,通知文档中此视图负责的某个位置的属性已更改。
 void View.changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档此视图负责的位置处的属性已更改。
protected  void PlainView.damageLineRange(int line0, int line1, Shape a, Component host)
          重新绘制给定的行范围。
protected  void BoxView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
          将给定的 DocumentEvent 转发给需要接收模型更改通知的子视图。
protected  void TableView.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
           
protected  void View.forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory f)
          将给定的 DocumentEvent 转发给需要被通知模型更改的子视图。
protected  void View.forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f)
          将 DocumentEvent 转发到给定的子视图。
 Shape AsyncBoxView.getChildAllocation(int index, Shape a)
          获取给定子视图的分配区域。
 Shape AsyncBoxView.ChildLocator.getChildAllocation(int index, Shape a)
          获取用于子视图的分配区域。
 Shape BoxView.getChildAllocation(int index, Shape a)
          获取给定子视图的分配。
 Shape CompositeView.getChildAllocation(int index, Shape a)
          获取要在其中呈现的给定子视图的分配区域。
 Shape View.getChildAllocation(int index, Shape a)
          获取给定子视图的分配。
protected  int ParagraphView.getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x)
          返回最接近 x 处的模型位置。
protected  Rectangle CompositeView.getInsideAllocation(Shape a)
          将分配给视图的不可变分配区域转换为表示内部分配区域的可变分配区域(即给定分配区域的边界,其顶部、左部、底部和右部的 insets 已移除)。
protected  int CompositeView.getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          返回光标的下一个可视位置,可以在东或在西。
protected  int CompositeView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          返回光标的下一个可视位置,可以在北也可以在南。
protected  int ParagraphView.getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          在东或西方向返回光标的下一个可视位置。
 int GlyphView.GlyphPainter.getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          提供确定下一个以可视化形式表示的模型位置的方法,用户可以在此位置放置一个插入符。
 int AsyncBoxView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          提供确定下一个以可视化形式表示的模型位置的方法,用户可以在此位置放置一个插入符。
 int CompositeView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          提供一种方法来确定下一个以可视化形式表示的模型位置,用户可以在此位置放置一个插入符。
 int GlyphView.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          提供一种方法来确定下一个以可视化形式表示的模型位置,用户可以在此位置放置一个插入符。
 int View.getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
          提供某种途径来确定可以放置一个插入符的下一个可视表示模型位置。
 String View.getToolTipText(float x, float y, Shape allocation)
          返回提定位置的工具提示文本。
 int View.getViewIndex(float x, float y, Shape allocation)
          返回表示视图中给定位置的子视图索引。
 int AsyncBoxView.ChildLocator.getViewIndexAtPoint(float x, float y, Shape a)
          获取位于给定点的子视图索引。
 void FlowView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          发出通知,通知在文档中此视图负责的某个位置已插入内容。
 void GlyphView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档中此视图负责的位置已插入内容。
 void WrappedPlainView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出在文档中此视图负责的位置插入了某些内容的通知。
 void ZoneView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          给出在文档中此视图负责的位置插入了某些内容的通知。
 void FieldView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          通知在文档中此视图负责的某个位置已插入内容。
 void PlainView.insertUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          发出通知,通知在文档中此视图负责的某个位置已插入内容。
 void View.insertUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知在文档中此视图负责的某个位置已插入内容。
protected  Rectangle PlainView.lineToRect(Shape a, int line)
          确定表示给定行的矩形。
abstract  Shape GlyphView.GlyphPainter.modelToView(GlyphView v, int pos, Position.Bias bias, Shape a)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape CompositeView.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape View.modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
          为给定区域提供从文档模型坐标空间到视图坐标空间的映射。
 Shape View.modelToView(int pos, Shape a)
          已过时。  
 Shape AsyncBoxView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape BoxView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型的坐标空间到映射到它的视图的坐标空间的映射。
 Shape ComponentView.modelToView(int pos, Shape a, Position.Bias b)
          提供模型坐标空间到视图坐标空间的映射。
 Shape CompositeView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape GlyphView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape IconView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape PasswordView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape FieldView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 Shape PlainView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
abstract  Shape View.modelToView(int pos, Shape a, Position.Bias b)
          为给定字符提供从文档模型坐标空间到视图坐标空间的映射。
abstract  void GlyphView.GlyphPainter.paint(GlyphView v, Graphics g, Shape a, int p0, int p1)
          绘制表示给定范围的字形。
 void DefaultHighlighter.DefaultHighlightPainter.paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c)
          绘制高亮显示区域。
 void Highlighter.HighlightPainter.paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c)
          呈现高亮显示。
 void AsyncBoxView.paint(Graphics g, Shape alloc)
          使用给定的分配和呈现表面呈现该视图。
 void BoxView.paint(Graphics g, Shape allocation)
          使用该面给定的呈现面和区域呈现 BoxView
 void ComponentView.paint(Graphics g, Shape a)
          真正的绘制行为自然来源于组件与其父容器(容纳此视图的同一容器)之间的关联。
 void GlyphView.paint(Graphics g, Shape a)
          呈现一部分运行的文本样式。
 void IconView.paint(Graphics g, Shape a)
          绘制图标。
 void ParagraphView.paint(Graphics g, Shape a)
          使用给定的呈现面和该面上的区域进行呈现。
 void WrappedPlainView.paint(Graphics g, Shape a)
          使用给定的呈现表面和表现上的区域来呈现。
 void FieldView.paint(Graphics g, Shape a)
          使用给定呈现面和该表面的区域呈现。
 void PlainView.paint(Graphics g, Shape a)
          使用给定呈现面和该表面的区域呈现。
abstract  void View.paint(Graphics g, Shape allocation)
          使用给定的呈现表面和该表面上的区域来呈现。
 Shape DefaultHighlighter.DefaultHighlightPainter.paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view)
          绘制高亮显示的某一部分。
abstract  Shape LayeredHighlighter.LayerPainter.paintLayer(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
           
 void DefaultHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
          当要呈现叶 View (例如,LabelView)时,要调用此方法。
abstract  void LayeredHighlighter.paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
          当叶 View(如 LabelView)呈现时,它们应调用此方法。
 void FlowView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          发出通知,通知从文档中此视图负责的某个位置已移除内容。
 void GlyphView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档中此视图负责的位置已移除内容。
 void WrappedPlainView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出从文档中此视图负责的位置移除了某些内容的通知。
 void ZoneView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          给出从文档中此视图负责的位置移除了某些内容的通知。
 void FieldView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          通知在文档中此视图负责的某个位置已插入内容。
 void PlainView.removeUpdate(DocumentEvent changes, Shape a, ViewFactory f)
          通知在文档中此视图负责的某个位置已插入内容。
 void View.removeUpdate(DocumentEvent e, Shape a, ViewFactory f)
          给出从文档中此视图负责的位置移除了某些内容的通知。
protected  void AsyncBoxView.ChildLocator.setAllocation(Shape a)
          将当前已分配的形状复制到用于存储当前分配区域的 Rectangle 中。
protected  void PlainView.updateDamage(DocumentEvent changes, Shape a, ViewFactory f)
          重新绘制给定文档事件覆盖的更改区域。
protected  void AsyncBoxView.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a)
          更新布局,以响应从模型接收的更改通知。
protected  void View.updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a)
          更新布局,以响应从模型接受的更改通知。
 int View.viewToModel(float x, float y, Shape a)
          已过时。  
 int AsyncBoxView.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn)
          提供从视图坐标空间到模型逻辑坐标空间的映射。
 int BoxView.viewToModel(float x, float y, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到模型逻辑坐标空间的映射。
 int ComponentView.viewToModel(float x, float y, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到模型逻辑坐标空间的映射。
 int CompositeView.viewToModel(float x, float y, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到模型的逻辑坐标空间的映射。
 int GlyphView.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn)
          提供从视图坐标空间到模型逻辑坐标空间的映射。
 int IconView.viewToModel(float x, float y, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到该模型的逻辑坐标空间的映射。
 int PasswordView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到该模型的逻辑坐标空间的映射。
 int FieldView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到该模型的逻辑坐标空间的映射。
 int PlainView.viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到该模型的逻辑坐标空间的映射。
abstract  int View.viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn)
          提供从视图坐标空间到模型的逻辑坐标空间的映射。
abstract  int GlyphView.GlyphPainter.viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] biasReturn)
          提供从视图坐标空间到模型逻辑坐标空间的映射。
 

javax.swing.text.htmlShape 的使用
 

返回 Shapejavax.swing.text.html 中的方法
 Shape ImageView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 

参数类型为 Shapejavax.swing.text.html 中的方法
 void BlockView.changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
           
 void ImageView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
          当 Elements 属性已更改时调用。
 void InlineView.changedUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档此视图负责的位置处的属性已更改。
 String ImageView.getToolTipText(float x, float y, Shape allocation)
          对于图像,工具提示文本来自于 ALT 属性指定的文本。
 void InlineView.insertUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档中此视图负责的位置已插入内容。
 Shape ImageView.modelToView(int pos, Shape a, Position.Bias b)
          提供从文档模型坐标空间到所映射的视图坐标空间的映射。
 void BlockView.paint(Graphics g, Shape allocation)
          使用给定呈现面和该表面的区域呈现。
 void ImageView.paint(Graphics g, Shape a)
          绘制 View。
 void ListView.paint(Graphics g, Shape allocation)
          使用给定呈现面和该表面的区域呈现。
 void ParagraphView.paint(Graphics g, Shape a)
          使用给定的呈现面和该面上的区域进行呈现。
 void InlineView.removeUpdate(DocumentEvent e, Shape a, ViewFactory f)
          发出通知,通知文档中此视图负责的位置已移除内容。
 int ImageView.viewToModel(float x, float y, Shape a, Position.Bias[] bias)
          提供从视图坐标空间到该模型的逻辑坐标空间的映射。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only