JSplitPane getOrientation - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for JSplitPane getOrientation method.

This code example shows how to use the following methods:getOrientation, resetToPreferredSizes, setOrientation
This code example shows how to use the following methods:setBorder, getOrientation, setBottomComponent, setResizeWeight, setRightComponent
	 * @param secondaryComponent the right or bottom component, when split 
	 */ 
	public SplittablePane(int orientation, Component mainComponent, Component secondaryComponent) {
		setLayout(new BorderLayout());
		 
		splitPane = new JSplitPane(orientation);
		splitPane.setBorder(null);
		splitPane.setResizeWeight(0.5); // Divide extra or removed space evenly when resizing.
		 
		this.mainComponent = mainComponent;
		this.isSplit = false;
		if (this.mainComponent != null) {
		    add(this.mainComponent, BorderLayout.CENTER);
		} 
		 
		setSecondaryComponent(secondaryComponent);
	} 
	 
	/** 
	 * Sets the main component. This is either the left or top component, 

5
CodeRank
This code example shows how to use the following methods:getOrientation, setBottomComponent, setTopComponent
	} 
 
	public void setSubViews(Viewer viewer1,Viewer viewer2){
		this.viewer2=viewer2;
		this.viewer1=viewer1;
		if(splitPane.getOrientation()==JSplitPane.VERTICAL_SPLIT){
			splitPane.setTopComponent(viewer1);
			splitPane.setBottomComponent(viewer2);
			viewer1.setSuperView(this,"top");
			viewer2.setSuperView(this,"bottom");
		}else{ 
			splitPane.setLeftComponent(viewer1);
			splitPane.setRightComponent(viewer2);
			viewer1.setSuperView(this,"left");
			viewer2.setSuperView(this,"right");
		} 
	} 
 
	@Override 
	public void clearContent(){ 
4
CodeRank
getOrientation Method Overview
Returns the orientation.
See Code Examples for other Java 8 JSplitPane Methods: