JavaTM Platform
Standard Ed. 6

javax.swing.plaf.basic
�� BasicSplitPaneDivider

java.lang.Object
  �̳��� java.awt.Component
      �̳��� java.awt.Container
          �̳��� javax.swing.plaf.basic.BasicSplitPaneDivider
������ʵ�ֵĽӿڣ�
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener

public class BasicSplitPaneDivider
extends Container
implements PropertyChangeListener

BasicSplitPaneUI ʹ�õķָ������������ϣ����д paint �Խ���ijЩ����Ȥ�IJ������߿�Ч������ BasicSplitPaneUI �л��Ƶģ����������ϲ���ñ߿򣬿������������á�Ҫ�������ش�ijЩ�����϶�����Ϊ mousePressed �������ಢ��ϣ����ʼ�϶�ʱ���� super��

���棺��������л��������Ժ�� Swing �汾�����ݡ���ǰ�����л�֧�������ڶ��ڴ洢��������ͬ Swing �汾��Ӧ�ó���֮��� RMI���� 1.4 �汾��ʼ������ java.beans ����������֧������ JavaBeansTM ���ڴ洢�Ĺ��ܡ���μ� XMLEncoder��


Ƕ����ժҪ
protected  class BasicSplitPaneDivider.DividerLayout
          ���ڲ��� BasicSplitPaneDivider��
protected  class BasicSplitPaneDivider.DragController
          ������ HORIZONTAL_SPLIT �IJ�ִ�����϶��Ự�ڼ䴦���¼���
protected  class BasicSplitPaneDivider.MouseHandler
          MouseHandler ��������¼����ͷš��϶�������ת��Ϊ�ʵ��� DragController ������
protected  class BasicSplitPaneDivider.VerticalDragController
          ������ VERTICAL_SPLIT �IJ�ִ�����϶��Ự�ڼ䴦���¼���
 
���� 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
 

�ֶ���ϸ��Ϣ

ONE_TOUCH_SIZE

protected static final int ONE_TOUCH_SIZE
���� BasicSplitPaneUI ���ӵ�������������ķָ������Ⱥ͸߶ȡ�

������
�����ֶ�ֵ

ONE_TOUCH_OFFSET

protected static final int ONE_TOUCH_OFFSET
������
�����ֶ�ֵ

dragger

protected BasicSplitPaneDivider.DragController dragger
����Ҫ����ʵ���϶�����������϶���Ϣ��


splitPaneUI

protected BasicSplitPaneUI splitPaneUI
���䴴����ʵ���� UI��


dividerSize

protected int dividerSize
�ָ����Ĵ�С��


hiddenDivider

protected Component hiddenDivider
���ڷ���������ģʽ�ķָ�����


splitPane

protected JSplitPane splitPane
���а��������ߵ� JSplitPane��


mouseHandler

protected BasicSplitPaneDivider.MouseHandler mouseHandler
�������Դ���Ͳ�ִ��������¼���Ϊ��ִ���������¼�����Ϊ�ڷָ����ı߿��ϵ���ʱϣ���ܹ��϶��������ñ߿����ɷָ������Ƶġ�


orientation

protected int orientation
JSplitPane �ķ���


leftButton

protected JButton leftButton
���ڿ����л��������İ�ť��


rightButton

protected JButton rightButton
���ڿ����л��ұ�����İ�ť��

���췽����ϸ��Ϣ

BasicSplitPaneDivider

public BasicSplitPaneDivider(BasicSplitPaneUI ui)
���� BasicSplitPaneDivider ��ʵ����Ϊ����¼�������϶��¼�ע���ʵ����

������ϸ��Ϣ

setBasicSplitPaneUI

public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
����Ҫʹ�ý����ߵ� SplitPaneUI��


getBasicSplitPaneUI

public BasicSplitPaneUI getBasicSplitPaneUI()
���ؽ����ߵ�ǰλ�����е� SplitPaneUI��


setDividerSize

public void setDividerSize(int newSize)
���ָ����Ĵ�С����Ϊ newSize�������ִ���Ϊ HORIZONTAL_SPLIT�����Ϊ���ȣ���ִ���Ϊ VERTICAL_SPLIT ����Ϊ�߶ȡ�


getDividerSize

public int getDividerSize()
���طָ����Ĵ�С�������ִ���Ϊ HORIZONTAL_SPLIT�����Ϊ���ȣ���ִ���Ϊ VERTICAL_SPLIT ����Ϊ�߶ȡ�


setBorder

public void setBorder(Border border)
���ô�����ı߿�

�����°汾��ʼ��
1.3

getBorder

public Border getBorder()
���ش�����ı߿������ǰû�����ñ߿��򷵻� null��

���أ�
������ı߿����
�����°汾��ʼ��
1.3
������
setBorder(javax.swing.border.Border)

getInsets

public Insets getInsets()
������ڴ�����������˱߿��򷵻ظñ߿�� insets��������� super.getInsets��

���ǣ�
�� Container �е� getInsets
���أ�
insets ���Ե�ֵ��
������
setBorder(javax.swing.border.Border)

setMouseOver

protected void setMouseOver(boolean mouseOver)
������굱ǰ�Ƿ�λ�ڷָ����ϡ�

������
mouseOver - ��굱ǰ�Ƿ�λ�ڷָ�����
�����°汾��ʼ��
1.5

isMouseOver

public boolean isMouseOver()
������굱ǰ�Ƿ�λ�ڷָ�����

���أ�
��굱ǰ�Ƿ�λ�ڷָ�����
�����°汾��ʼ��
1.5

getPreferredSize

public Dimension getPreferredSize()
���� dividerSize x dividerSize

���ǣ�
�� Container �е� getPreferredSize
���أ�
��ʾ����������ѡ��С�� Dimension ʵ����
������
Container.getMinimumSize(), Container.getMaximumSize(), Container.getLayout(), LayoutManager.preferredLayoutSize(Container), Component.getPreferredSize()

getMinimumSize

public Dimension getMinimumSize()
���� dividerSize x dividerSize

���ǣ�
�� Container �е� getMinimumSize
���أ�
��ʾ����������С��С�� Dimension ʵ����
������
Container.getPreferredSize(), Container.getMaximumSize(), Container.getLayout(), LayoutManager.minimumLayoutSize(Container), Component.getMinimumSize()

propertyChange

public void propertyChange(PropertyChangeEvent e)
���Ը����¼����ٶ����� JSplitPane�����ڱ�Ҫʱ���� updateOrientation ����Ϣ��

ָ���ߣ�
�ӿ� PropertyChangeListener �е� propertyChange
������
e - �����¼�Դ���Ѹ������Ե� PropertyChangeEvent ����

paint

public void paint(Graphics g)
���Ʒָ�����

���ǣ�
�� Container �е� paint
������
g - ָ���� Graphics ����
������
Component.update(Graphics)

oneTouchExpandableChanged

protected void oneTouchExpandableChanged()
�����������ߵ� JSplitPane �� oneTouchExpandable ֵ��������ʱ������Ϣ����������� leftButton �� rightButton Ϊ null���򴴽����ǣ�ͬʱʹ��������Ч��


createLeftOneTouchButton

protected JButton createLeftOneTouchButton()
���������� JButton ��ʵ������ʵ���������۵���ִ����е���������


createRightOneTouchButton

protected JButton createRightOneTouchButton()
���������� JButton ��ʵ������ʵ���������۵���ִ����е��ұ������


prepareForDragging

protected void prepareForDragging()
������Ϣ��׼���϶������������� startDragging ���� BasicSplitPaneUI ����Ϣ��


dragDividerTo

protected void dragDividerTo(int location)
���ð�����ʵ���� dragDividerTo ���� BasicSplitPaneUI ����Ϣ��


finishDraggingTo

protected void finishDraggingTo(int location)
���ð�����ʵ���� finishDraggingTo ���� BasicSplitPaneUI ����Ϣ��


JavaTM Platform
Standard Ed. 6

�ύ��������
�йظ���� API �ο����ϺͿ�����Ա�ĵ�������� Java SE ������Ա�ĵ������ĵ���������ϸ�ġ����򿪷���Ա���������Լ�������������ﶨ�塢ʹ�ü��ɺ͹�������ʾ����

��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������