Java 8 JSplitPane - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 JSplitPane class.

This code example shows how to use the following methods:setBorder, setLeftComponent, setResizeWeight, setRightComponent
This code example shows how to use the following methods:setContinuousLayout, setLeftComponent, setResizeWeight, setRightComponent
This code example shows how to use the following methods:setContinuousLayout, setOneTouchExpandable, setResizeWeight
    public void init() { 
        setLayout(new BorderLayout());
        clustersPanel.init();
        final Host noHost = hostFactory.createInstance();
        final JSplitPane splitPane =
                                new JSplitPane(JSplitPane.VERTICAL_SPLIT, clustersPanel, noHost.getTerminalPanel());
        guiData.setTerminalSplitPane(splitPane);
 
        splitPane.setContinuousLayout(true);
        splitPane.setResizeWeight(1.0);
        splitPane.setOneTouchExpandable(true);
 
        add(splitPane, BorderLayout.CENTER);
        guiData.initTerminalSplitPane();
    } 
} 
6
CodeRank
This code example shows how to use the following methods:setLeftComponent, setOrientation, setResizeWeight, setRightComponent
    public SystemUnderTest(){ 
        setBorder(BorderFactory.createTitledBorder("System Under Test"));
        tbs = new TestBeds();
        sut = new SutEditor();
        setLayout(new BorderLayout());
        final JSplitPane sp = new JSplitPane();
        sp.setLeftComponent(sut);
        sp.setRightComponent(tbs);
        sp.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
        sp.setResizeWeight(0.5);
        SwingUtilities.invokeLater(new Runnable() {
                public void run() { 
                    sp.setDividerLocation(0.5);
                } 
            }); 
        add(sp,BorderLayout.CENTER);
    } 
} 
6
CodeRank
This code example shows how to use the following methods:setBorder, setOneTouchExpandable, setResizeWeight
        tableHeaders.getTableHeader().setDefaultRenderer(
                new HeaderAsPropertyRenderer()); 
        RendererUtils.applyRenderers(tableHeaders, RENDERERS_HEADERS);
 
        // Create the split pane 
        JSplitPane topSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                GuiUtils.makeScrollPane(tableParams),
                GuiUtils.makeScrollPane(tableHeaders));
        topSplit.setOneTouchExpandable(true);
        topSplit.setResizeWeight(0.50); // set split ratio
        topSplit.setBorder(null); // see bug jdk 4131528
 
        JSplitPane paneParsed = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                GuiUtils.makeScrollPane(tableRequest), topSplit);
        paneParsed.setOneTouchExpandable(true);
        paneParsed.setResizeWeight(0.25); // set split ratio (only 5 lines to display)
        paneParsed.setBorder(null); // see bug jdk 4131528
 
        // Hint to background color on bottom tabs (grey, not blue) 
        JPanel panel = new JPanel(new BorderLayout());
6
CodeRank
This code example shows how to use the following methods:setContinuousLayout, setDividerLocation, setOneTouchExpandable
This code example shows how to use the following methods:getLeftComponent, getMaximumDividerLocation, getMinimumDividerLocation, getRightComponent
    private void enableOneTouchButtons(JSplitPane jc, int location) {
        JButton leftButton = ((SoapUIDivider) getDivider()).getLeftButton();
        JButton rightButton = ((SoapUIDivider) getDivider()).getRightButton();
 
        if (leftButton != null) {
            leftButton.setEnabled(location > jc.getMinimumDividerLocation() && jc.getRightComponent() != null
                    && jc.getRightComponent().isVisible());
        } 
 
        if (rightButton != null) {
            rightButton.setEnabled(location < jc.getMaximumDividerLocation() && jc.getLeftComponent() != null
                    && jc.getLeftComponent().isVisible());
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:setLeftComponent, setResizeWeight, setRightComponent
6
CodeRank
This code example shows how to use the following methods:setBottomComponent, setResizeWeight, setTopComponent
		super(); 
		this.setTitle(friendsListViewMessages.getString("friends"));
		this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
		this.setSize(400, 800);
		this.setLayout(new BorderLayout());
		JSplitPane splitter = new JSplitPane();
		splitter.setResizeWeight(0.5);
 
		JPanel topPanel = new JPanel(new BorderLayout());
		topPanel.add(new LocalizedJLabel(friendsListViewMessages, "online"), BorderLayout.NORTH);
		this.onlineList = new JList<RosterEntry>();
		this.onlineList.setCellRenderer(new FriendListItemRenderer());
		topPanel.add(new JScrollPane(this.onlineList), BorderLayout.CENTER);
 
		JPanel bottomPanel = new JPanel(new BorderLayout());
		bottomPanel.add(new LocalizedJLabel(friendsListViewMessages, "offline"), BorderLayout.NORTH);
		this.offlineList = new JList<RosterEntry>();
		this.offlineList.setCellRenderer(new FriendListItemRenderer());
		bottomPanel.add(new JScrollPane(this.offlineList), BorderLayout.CENTER);
 

6
CodeRank
This code example shows how to use the following methods:setBorder, getUI, setContinuousLayout, setDividerSize
See Code Examples for Java 8 JSplitPane Methods: