Constructor and Description |
---|
GlyphPainter() |
Modifier and Type | Method and Description |
---|---|
abstract float |
getAscent(GlyphView v) |
abstract int |
getBoundedPosition(GlyphView v, int p0, float x, float len)
确定表示在给定范围内的最大推进的模型位置。
|
abstract float |
getDescent(GlyphView v) |
abstract float |
getHeight(GlyphView v) |
int |
getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet)
提供了一种方法来确定下一步的直观模型,一个可能的地方插入位置。
|
GlyphView.GlyphPainter |
getPainter(GlyphView v, int p0, int p1)
创建一个画家使用给定的在此。
|
abstract float |
getSpan(GlyphView v, int p0, int p1, TabExpander e, float x)
确定跨了起始位置的符号(Tab扩展)。
|
abstract Shape |
modelToView(GlyphView v, int pos, Position.Bias bias, Shape a)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
abstract void |
paint(GlyphView v, Graphics g, Shape a, int p0, int p1)
涂料代表给定的范围内的符号。
|
abstract int |
viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] biasReturn)
从视图坐标空间提供一个映射到模型的逻辑坐标空间。
|
public abstract float getSpan(GlyphView v, int p0, int p1, TabExpander e, float x)
public abstract float getHeight(GlyphView v)
public abstract float getAscent(GlyphView v)
public abstract float getDescent(GlyphView v)
public abstract Shape modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) throws BadLocationException
v
含有目标坐标空间的
GlyphView
pos
的位置转换
bias
-
Position.Bias.Forward
或
Position.Bias.Backward
a
-视图边界
BadLocationException
-如果给定的位置不在相关文件表示一个有效的位置
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public abstract int viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] biasReturn)
v
-
GlyphView
提供映射
x
的X坐标
y
的Y坐标
a
-分配区域进行渲染
biasReturn
-
Position.Bias.Forward
或
Position.Bias.Backward
作为该数组的元素返回零
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
public abstract int getBoundedPosition(GlyphView v, int p0, float x, float len)
v
的角度找到破解在模型中的位置。
p0
-定位模型中的碎片的地方应该是表示> = 0。
x
图形的位置沿轴的断裂视图将占据> = 0。这可能是有用的东西,如标签计算。
len
指定距离为视角,一个潜在的突破需要> = 0。
View.breakView(int, int, float, float)
public GlyphView.GlyphPainter getPainter(GlyphView v, int p0, int p1)
v
-
GlyphView
提供一个画家
p0
-启动文件偏移> = 0
p1
-结尾的文件偏移> = P0
public int getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) throws BadLocationException
v
-视图的使用
pos
-位置转换> = 0
b
-
Position.Bias.Forward
或
Position.Bias.Backward
a
-分配区域进行渲染
direction
-这可以被认为是箭头键通常发现键盘上的当前位置的方向。这可能是swingconstants.west,swingconstants.east,SwingConstants.NORTH,或swingconstants.south。
biasRet
-
Position.Bias.Forward
或
Position.Bias.Backward
作为该数组的元素返回零
BadLocationException
IllegalArgumentException
-无效的方向
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.