public interface Caret
点可以被调用setDot
或moveDot
。设置有点去除,以前可能存在的任何选择的影响。点和标记将是相等的。移动点有创建一个选择的效果,因为标记是在任何位置,它以前有。
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l)
添加一个监听器跟踪每次插入位置已经改变。
|
void |
deinstall(JTextComponent c)
打电话的时候,用户界面是从一个jtextcomponent界面删除。
|
int |
getBlinkRate()
获取符号闪烁速率。
|
int |
getDot()
获取当前位置的符号。
|
Point |
getMagicCaretPosition()
获取当前插入符号的视觉定位。
|
int |
getMark()
获取当前位置的标记。
|
void |
install(JTextComponent c)
当UI被安装到一个jtextcomponent接口。
|
boolean |
isSelectionVisible()
确定是否当前可见的选择。
|
boolean |
isVisible()
决定如果插入当前可见。
|
void |
moveDot(int dot)
将插入符号的位置(点)到其他位置,留下的痕迹。
|
void |
paint(Graphics g)
将插入符号。
|
void |
removeChangeListener(ChangeListener l)
删除一个监听器,跟踪插入位置的变化。
|
void |
setBlinkRate(int rate)
集的符号闪烁速率。
|
void |
setDot(int dot)
设置一些位置插入符号的位置。
|
void |
setMagicCaretPosition(Point p)
设置当前插入符号的视觉定位。
|
void |
setSelectionVisible(boolean v)
设置选择的可见性
|
void |
setVisible(boolean v)
将插入符号的可见性。
|
void install(JTextComponent c)
c
- jtextcomponent
void deinstall(JTextComponent c)
c
- jtextcomponent
void paint(Graphics g)
g
-图形上下文
void addChangeListener(ChangeListener l)
l
-更改侦听器
void removeChangeListener(ChangeListener l)
l
-更改侦听器
boolean isVisible()
void setVisible(boolean v)
v
真如果插入应显示,假如果插入应该隐藏
boolean isSelectionVisible()
void setSelectionVisible(boolean v)
v
真如果插入应显示,假如果插入应该隐藏
void setMagicCaretPosition(Point p)
p
点-用于保存的位置。这可以是空的,表明没有视觉位置。
Point getMagicCaretPosition()
setMagicCaretPosition(java.awt.Point)
void setBlinkRate(int rate)
rate
- > = 0毫秒的延迟。如果这是零的符号不眨眼。
int getBlinkRate()
int getDot()
int getMark()
void setDot(int dot)
如果参数为负或超出文档长度,插入符号放在开头或结尾,分别。
dot
-设置插入到新的位置
void moveDot(int dot)
dot
-插入移至新位置> = 0
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.