Java Code Examples for javax.swing.plaf.basic.BasicSplitPaneUI#getSplitPane()

The following examples show how to use javax.swing.plaf.basic.BasicSplitPaneUI#getSplitPane() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MotifSplitPaneDivider.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 2
Source File: MotifSplitPaneDivider.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 3
Source File: MotifSplitPaneDivider.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 4
Source File: SplitPaneDividerBorder.java    From beautyeye with Apache License 2.0 5 votes vote down vote up
public Insets getBorderInsets(Component c)
{
	Insets insets = new Insets(0, 0, 0, 0);
	if (c instanceof BasicSplitPaneDivider)
	{
		BasicSplitPaneUI bspui = ((BasicSplitPaneDivider) c)
				.getBasicSplitPaneUI();

		if (bspui != null)
		{
			JSplitPane splitPane = bspui.getSplitPane();

			if (splitPane != null)
			{
				if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT)
				{
					insets.top = insets.bottom = 0;
					insets.left = insets.right = 1;
					return insets;
				}
				// VERTICAL_SPLIT
				insets.top = insets.bottom = 1;
				insets.left = insets.right = 0;
				return insets;
			}
		}
	}
	insets.top = insets.bottom = insets.left = insets.right = 1;
	return insets;
}
 
Example 5
Source File: MotifSplitPaneDivider.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 6
Source File: MotifSplitPaneDivider.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 7
Source File: MotifSplitPaneDivider.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 8
Source File: MotifSplitPaneDivider.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 9
Source File: MotifSplitPaneDivider.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 10
Source File: MotifSplitPaneDivider.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 11
Source File: MotifSplitPaneDivider.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 12
Source File: MotifSplitPaneDivider.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 13
Source File: MotifSplitPaneDivider.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 14
Source File: MotifSplitPaneDivider.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 15
Source File: MotifSplitPaneDivider.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 16
Source File: MotifSplitPaneDivider.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}
 
Example 17
Source File: MotifSplitPaneDivider.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the SplitPaneUI that is using the receiver. This is completely
 * overriden from super to create a different MouseHandler.
 */
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
    if (splitPane != null) {
        splitPane.removePropertyChangeListener(this);
       if (mouseHandler != null) {
           splitPane.removeMouseListener(mouseHandler);
           splitPane.removeMouseMotionListener(mouseHandler);
           removeMouseListener(mouseHandler);
           removeMouseMotionListener(mouseHandler);
           mouseHandler = null;
       }
    }
    splitPaneUI = newUI;
    if (newUI != null) {
        splitPane = newUI.getSplitPane();
        if (splitPane != null) {
            if (mouseHandler == null) mouseHandler=new MotifMouseHandler();
            splitPane.addMouseListener(mouseHandler);
            splitPane.addMouseMotionListener(mouseHandler);
            addMouseListener(mouseHandler);
            addMouseMotionListener(mouseHandler);
            splitPane.addPropertyChangeListener(this);
            if (splitPane.isOneTouchExpandable()) {
                oneTouchExpandableChanged();
            }
        }
    }
    else {
        splitPane = null;
    }
}