JSplitPane getMinimumDividerLocation - 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 getMinimumDividerLocation method.

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:getMaximumDividerLocation, getMinimumDividerLocation, setDividerLocation
        public void mouseDragged(MouseEvent e) {
            MouseEvent convertedEvent =
                    SwingUtilities.convertMouseEvent(BottomBar.this.getComponent(), e, fSplitPane);
            int newLocation = convertedEvent.getPoint().y + fDelta;
            // bound newLocation between the minimum and maximum divider locations. 
            int boundedNewLocation = Math.max(fSplitPane.getMinimumDividerLocation(),
                    Math.min(newLocation, fSplitPane.getMaximumDividerLocation()));
            fSplitPane.setDividerLocation(boundedNewLocation);
        } 
 
        public void mouseMoved(MouseEvent e) {
        } 
    }     
 
} 
5
CodeRank
This code example shows how to use the following methods:getMaximumDividerLocation, getMinimumDividerLocation, setDividerLocation
getMinimumDividerLocation Method Overview
Returns the minimum location of the divider from the look and feel implementation.
See Code Examples for other Java 8 JSplitPane Methods: