java.lang.Objectjava.awt.ScrollPaneAdjustable
public class ScrollPaneAdjustable
此类表示 ScrollPane 的水平或垂直滚动条的状态。ScrollPane 方法返回此类的对象。
| 字段摘要 |
|---|
| 从接口 java.awt.Adjustable 继承的字段 |
|---|
HORIZONTAL, NO_ORIENTATION, VERTICAL |
| 方法摘要 | |
|---|---|
void |
addAdjustmentListener(AdjustmentListener l) 添加指定的调整侦听器,以接收发自此 ScrollPaneAdjustable 的调整事件。 |
AdjustmentListener[] |
getAdjustmentListeners() 返回在此 ScrollPaneAdjustable 上所有已注册调整侦听器组成的数组。 |
int |
getBlockIncrement() 获取可调整对象的块值增量。 |
int |
getMaximum() 获取可调整对象的最大值。 |
int |
getMinimum() 获取可调整对象的最小值。 |
int |
getOrientation() 返回此滚动条的方向。 |
int |
getUnitIncrement() 获取可调整对象的单位值增量。 |
int |
getValue() 获取可调整对象的当前值。 |
boolean |
getValueIsAdjusting() 当作为用户所采用操作的结果的值正处于更改过程中时,返回 true。 |
int |
getVisibleAmount() 获取比例指示器的长度。 |
String |
paramString() 返回表示此滚动条的状态的字符串。 |
void |
removeAdjustmentListener(AdjustmentListener l) 移除指定的调整侦听器,不再接收发自此 ScrollPaneAdjustable 的调整事件。 |
void |
setBlockIncrement(int b) 设置可调整对象的块值增量。 |
void |
setMaximum(int max) 此方法不应由用户代码调用。 |
void |
setMinimum(int min) 此方法不应由用户代码调用。 |
void |
setUnitIncrement(int u) 设置可调整对象的单位值增量。 |
void |
setValue(int v) 将此滚动条的值设置为指定值。 |
void |
setValueIsAdjusting(boolean b) 设置 valueIsAdjusting 属性。 |
void |
setVisibleAmount(int v) 此方法不应由用户代码调用。 |
String |
toString() 返回此滚动条及其值的字符串表示形式。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 方法详细信息 |
|---|
public int getOrientation()
Adjustable 中的
getOrientation
Adjustable.HORIZONTAL 或
Adjustable.VERTICAL
public void setMinimum(int min)
Adjustable 接口的类是公用的。
Adjustable 中的
setMinimum
min - 最小值
AWTError - 调用时总是抛出一个错误。
public int getMinimum()
Adjustable 复制的描述
Adjustable 中的
getMinimum
public void setMaximum(int max)
Adjustable 接口的类是公用的。
Adjustable 中的
setMaximum
max - 最大值
AWTError - 调用时总是抛出一个错误。
public int getMaximum()
Adjustable 复制的描述
Adjustable 中的
getMaximum
public void setUnitIncrement(int u)
Adjustable 复制的描述
Adjustable 中的
setUnitIncrement
u - 单位增量
public int getUnitIncrement()
Adjustable 复制的描述
Adjustable 中的
getUnitIncrement
public void setBlockIncrement(int b)
Adjustable 复制的描述
Adjustable 中的
setBlockIncrement
b - 块值增量
public int getBlockIncrement()
Adjustable 复制的描述
Adjustable 中的
getBlockIncrement
public void setVisibleAmount(int v)
Adjustable 接口的类是公用的。
Adjustable 中的
setVisibleAmount
v - 指示器的长度
AWTError - 调用时总是抛出一个错误。
public int getVisibleAmount()
Adjustable 复制的描述
Adjustable 中的
getVisibleAmount
public void setValueIsAdjusting(boolean b)
valueIsAdjusting 属性。
b - 新的调整正处于进行状态
getValueIsAdjusting()
public boolean getValueIsAdjusting()
valueIsAdjusting 属性的值
setValueIsAdjusting(boolean)
public void setValue(int v)
如果提供的值小于当前最小值或大于当前最大值,则适当地替换其中的一个值。
Adjustable 中的
setValue
v - 滚动条的新值
public int getValue()
Adjustable 复制的描述
Adjustable 中的
getValue
public void addAdjustmentListener(AdjustmentListener l)
ScrollPaneAdjustable 的调整事件。如果
l 为
null,则不抛出异常,也不执行任何动作。
有关 AWT 的线程模型的详细信息,请参阅 AWT 线程问题。
Adjustable 中的
addAdjustmentListener
public void removeAdjustmentListener(AdjustmentListener l)
ScrollPaneAdjustable 的调整事件。如果
l 为
null,则不抛出异常,也不执行动作。
有关 AWT 的线程模型的详细信息,请参阅 AWT 线程问题。
Adjustable 中的
removeAdjustmentListener
l - 调整侦听器。
addAdjustmentListener(java.awt.event.AdjustmentListener),
getAdjustmentListeners(),
AdjustmentListener,
AdjustmentEvent
public AdjustmentListener[] getAdjustmentListeners()
ScrollPaneAdjustable 上所有已注册调整侦听器组成的数组。
ScrollPaneAdjustable 的所有
AdjustmentListener,如果当前没有已注册的调整侦听器,则返回一个空数组
addAdjustmentListener(java.awt.event.AdjustmentListener),
removeAdjustmentListener(java.awt.event.AdjustmentListener),
AdjustmentListener,
AdjustmentEvent
public String toString()
public String paramString()
null。