if (splitPane.isOneTouchExpandable()) { if (e.getSource() == leftButton) { currentDividerLocation--; if (currentDividerLocation < 0) currentDividerLocation = 0; moveDividerTo(currentDividerLocation); return; } else if (e.getSource() == rightButton) { currentDividerLocation++; if (currentDividerLocation > 2) currentDividerLocation = 2; moveDividerTo(currentDividerLocation); return; } }
    public void mousePressed(MouseEvent e)    {      if (splitPane.isOneTouchExpandable())        {	  if (e.getSource() == leftButton)	    {	      currentDividerLocation--;	      if (currentDividerLocation < 0)		currentDividerLocation = 0;	      moveDividerTo(currentDividerLocation);	      return;	    }	  else if (e.getSource() == rightButton)	    {	      currentDividerLocation++;	      if (currentDividerLocation > 2)		currentDividerLocation = 2;	      moveDividerTo(currentDividerLocation);	      return;	    }        }      isDragging = true;      currentDividerLocation = 1;      if (orientation == JSplitPane.HORIZONTAL_SPLIT)	dragger = new DragController(e);      else	dragger = new VerticalDragController(e);      prepareForDragging();    }