java.lang.Object
javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
在面向 HORIZONTAL_SPLIT 的拆分窗格的拖动会话期间处理事件。这会不断地向
dragDividerTo 发送消息,然后在完成后向 finishDraggingTo 发送消息。创建实例时,应使用 isValid 向其发送消息,以确保可以进行拖动(如果无法调整两个视图的大小,则不允许拖动)。
Warning: 此类的序列化对象将与未来的 Swing 版本不兼容。当前的序列化支持适用于运行相同版本 Swing 的应用程序之间的短期存储或 RMI。从 1.4 开始,对所有 JavaBeans 的长期存储的支持已添加到 java.beans 包中。请参阅 XMLEncoder 。
-
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述protected voidcompleteDrag(int x, int y) 带有鼠标事件新位置的消息 finishDraggingTo。protected void带有鼠标事件新位置的消息 finishDraggingTo。protected voidcontinueDrag(int newX, int newY) 使用鼠标事件的新位置向 dragDividerTo 发送消息。protected void使用鼠标事件的新位置向 dragDividerTo 发送消息。protected intgetNeededLocation(int x, int y) 返回 x 参数,因为它用于水平分割。protected booleanisValid()如果拖动会话有效,则返回true。protected int根据传入的 MouseEvent 返回放置分隔线的新位置。
-
构造方法详细信息
-
DragController
构造一个DragController新实例- 参数:
e- 鼠标事件
-
-
方法详情
-
isValid
protected boolean isValid()如果拖动会话有效,则返回true。- 返回:
true如果拖动会话有效
-
positionForMouseEvent
根据传入的 MouseEvent 返回放置分隔线的新位置。- 参数:
e- 鼠标事件- 返回:
- 新职位
-
getNeededLocation
protected int getNeededLocation(int x, int y) 返回 x 参数,因为它用于水平分割。- 参数:
x- X 坐标y- Y 坐标- 返回:
- X 参数
-
continueDrag
protected void continueDrag(int newX, int newY) 使用鼠标事件的新位置向 dragDividerTo 发送消息。- 参数:
newX- X 坐标newY- Y 坐标
-
continueDrag
使用鼠标事件的新位置向 dragDividerTo 发送消息。- 参数:
e- 鼠标事件
-
completeDrag
protected void completeDrag(int x, int y) 带有鼠标事件新位置的消息 finishDraggingTo。- 参数:
x- X 坐标y- Y 坐标
-
completeDrag
带有鼠标事件新位置的消息 finishDraggingTo。- 参数:
e- 鼠标事件
-