©
This document uses PHP Chinese website manual Release
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object java.awt.Component java.awt.Container javax.swing.plaf.basic.BasicSplitPaneDivider
public class BasicSplitPaneDivider
BasicSplitPaneUI 使用的分隔符。子类可能希望重写 paint 以进行某些更有趣的操作。边框效果是在 BasicSplitPaneUI 中绘制的,所以如果不喜欢该边框,可以在那里重置。要有条件地从某些区域拖动,请为 mousePressed 创建子类并在希望开始拖动时调用 super。
警告:此类的序列化对象将与以后的 Swing 版本不兼容。当前的序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans
包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder
。
嵌套类摘要 | |
---|---|
protected class |
BasicSplitPaneDivider.DividerLayout
用于布置 BasicSplitPaneDivider 。 |
protected class |
BasicSplitPaneDivider.DragController
在面向 HORIZONTAL_SPLIT 的拆分窗格的拖动会话期间处理事件。 |
protected class |
BasicSplitPaneDivider.MouseHandler
MouseHandler 负责将鼠标事件(释放、拖动……)转换为适当的 DragController 方法。 |
protected class |
BasicSplitPaneDivider.VerticalDragController
在面向 VERTICAL_SPLIT 的拆分窗格的拖动会话期间处理事件。 |
从类 java.awt.Container 继承的嵌套类/接口 |
---|
Container.AccessibleAWTContainer |
从类 java.awt.Component 继承的嵌套类/接口 |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
字段摘要 | |
---|---|
protected int |
dividerSize
分隔符的大小。 |
protected BasicSplitPaneDivider.DragController |
dragger
处理要进行实际拖动操作的鼠标拖动消息。 |
protected Component |
hiddenDivider
用于非连续布局模式的分隔符。 |
protected JButton |
leftButton
用于快速切换左边组件的按钮。 |
protected BasicSplitPaneDivider.MouseHandler |
mouseHandler
处理发自此类和拆分窗格的鼠标事件。 |
protected static int |
ONE_TOUCH_OFFSET
|
protected static int |
ONE_TOUCH_SIZE
基于 BasicSplitPaneUI 添加到它的两个方向的分隔符宽度和高度。 |
protected int |
orientation
JSplitPane 的方向。 |
protected JButton |
rightButton
用于快速切换右边组件的按钮。 |
protected JSplitPane |
splitPane
其中包含接收者的 JSplitPane。 |
protected BasicSplitPaneUI |
splitPaneUI
从其创建此实例的 UI。 |
从类 java.awt.Component 继承的字段 |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
从接口 java.awt.image.ImageObserver 继承的字段 |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
构造方法摘要 | |
---|---|
BasicSplitPaneDivider(BasicSplitPaneUI ui)
创建 BasicSplitPaneDivider 的实例。 |
方法摘要 | |
---|---|
protected JButton |
createLeftOneTouchButton()
创建并返回 JButton 的实例,该实例可用于折叠拆分窗格中的左边组件。 |
protected JButton |
createRightOneTouchButton()
创建并返回 JButton 的实例,该实例可用于折叠拆分窗格中的右边组件。 |
protected void |
dragDividerTo(int location)
利用包含此实例的 dragDividerTo 传递 BasicSplitPaneUI 的消息。 |
protected void |
finishDraggingTo(int location)
利用包含此实例的 finishDraggingTo 传递 BasicSplitPaneUI 的消息。 |
BasicSplitPaneUI |
getBasicSplitPaneUI()
返回接收者当前位于其中的 SplitPaneUI 。 |
Border |
getBorder()
返回此组件的边框,如果当前没有设置边框,则返回 null。 |
int |
getDividerSize()
返回分隔符的大小。 |
Insets |
getInsets()
如果已在此组件上设置了边框,则返回该边框的 insets;否则调用 super.getInsets。 |
Dimension |
getMinimumSize()
返回 dividerSize x dividerSize |
Dimension |
getPreferredSize()
返回 dividerSize x dividerSize |
boolean |
isMouseOver()
返回鼠标当前是否位于分隔符上 |
protected void |
oneTouchExpandableChanged()
当包含接收者的 JSplitPane 的 oneTouchExpandable 值发生更改时传递消息。 |
void |
paint(Graphics g)
绘制分隔符。 |
protected void |
prepareForDragging()
传递消息以准备拖动操作。 |
void |
propertyChange(PropertyChangeEvent e)
属性更改事件(假定发自 JSplitPane)将在必要时传递 updateOrientation 的消息。 |
void |
setBasicSplitPaneUI(BasicSplitPaneUI newUI)
设置要使用接收者的 SplitPaneUI。 |
void |
setBorder(Border border)
设置此组件的边框。 |
void |
setDividerSize(int newSize)
将分隔符的大小设置为 newSize 。 |
protected void |
setMouseOver(boolean mouseOver)
设置鼠标当前是否位于分隔符上。 |
从类 java.awt.Container 继承的方法 |
---|
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
从类 java.awt.Component 继承的方法 |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
字段详细信息 |
---|
protected static final int ONE_TOUCH_SIZE
protected static final int ONE_TOUCH_OFFSET
protected BasicSplitPaneDivider.DragController dragger
protected BasicSplitPaneUI splitPaneUI
protected int dividerSize
protected Component hiddenDivider
protected JSplitPane splitPane
protected BasicSplitPaneDivider.MouseHandler mouseHandler
protected int orientation
protected JButton leftButton
protected JButton rightButton
构造方法详细信息 |
---|
public BasicSplitPaneDivider(BasicSplitPaneUI ui)
方法详细信息 |
---|
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
public BasicSplitPaneUI getBasicSplitPaneUI()
SplitPaneUI
。
public void setDividerSize(int newSize)
newSize
。如果拆分窗格为 HORIZONTAL_SPLIT
,则此为宽度;拆分窗格为 VERTICAL_SPLIT
则其为高度。
public int getDividerSize()
public void setBorder(Border border)
public Border getBorder()
setBorder(javax.swing.border.Border)
public Insets getInsets()
Container
中的 getInsets
setBorder(javax.swing.border.Border)
protected void setMouseOver(boolean mouseOver)
mouseOver
- 鼠标当前是否位于分隔符上public boolean isMouseOver()
public Dimension getPreferredSize()
Container
中的 getPreferredSize
Dimension
实例。Container.getMinimumSize()
,
Container.getMaximumSize()
,
Container.getLayout()
,
LayoutManager.preferredLayoutSize(Container)
,
Component.getPreferredSize()
public Dimension getMinimumSize()
Container
中的 getMinimumSize
Dimension
实例。Container.getPreferredSize()
,
Container.getMaximumSize()
,
Container.getLayout()
,
LayoutManager.minimumLayoutSize(Container)
,
Component.getMinimumSize()
public void propertyChange(PropertyChangeEvent e)
PropertyChangeListener
中的 propertyChange
e
- 描述事件源和已更改属性的 PropertyChangeEvent 对象。public void paint(Graphics g)
Container
中的 paint
g
- 指定的 Graphics 窗口Component.update(Graphics)
protected void oneTouchExpandableChanged()
leftButton
和 rightButton
为 null,则创建它们,同时使接收者无效。
protected JButton createLeftOneTouchButton()
protected JButton createRightOneTouchButton()
protected void prepareForDragging()
protected void dragDividerTo(int location)
protected void finishDraggingTo(int location)
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。