Java Code Examples for javafx.scene.control.ScrollPane.ScrollBarPolicy#NEVER

The following examples show how to use javafx.scene.control.ScrollPane.ScrollBarPolicy#NEVER . 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: OnlyScrollPaneSkin.java    From oim-fx with MIT License 5 votes vote down vote up
private boolean determineHorizontalSBVisible() {
	final ScrollPane sp = getSkinnable();

	if (IS_TOUCH_SUPPORTED) {
		return (tempVisibility && (nodeWidth > contentWidth));
	} else {
		// RT-17395: ScrollBarPolicy might be null. If so, treat it as
		// "AS_NEEDED", which is the default
		ScrollBarPolicy hbarPolicy = sp.getHbarPolicy();
		return (ScrollBarPolicy.NEVER == hbarPolicy) ? false
				: ((ScrollBarPolicy.ALWAYS == hbarPolicy) ? true : ((sp.isFitToWidth() && scrollNode != null ? scrollNode.isResizable() : false) ? (nodeWidth > contentWidth && scrollNode.minWidth(-1) > contentWidth) : (nodeWidth > contentWidth)));
	}
}
 
Example 2
Source File: OnlyScrollPaneSkin.java    From oim-fx with MIT License 5 votes vote down vote up
private boolean determineVerticalSBVisible() {
	final ScrollPane sp = getSkinnable();

	if (IS_TOUCH_SUPPORTED) {
		return (tempVisibility && (nodeHeight > contentHeight));
	} else {
		// RT-17395: ScrollBarPolicy might be null. If so, treat it as
		// "AS_NEEDED", which is the default
		ScrollBarPolicy vbarPolicy = sp.getVbarPolicy();
		return (ScrollBarPolicy.NEVER == vbarPolicy) ? false
				: ((ScrollBarPolicy.ALWAYS == vbarPolicy) ? true : ((sp.isFitToHeight() && scrollNode != null ? scrollNode.isResizable() : false) ? (nodeHeight > contentHeight && scrollNode.minHeight(-1) > contentHeight) : (nodeHeight > contentHeight)));
	}
}
 
Example 3
Source File: JavaFxTopComponent.java    From constellation with Apache License 2.0 2 votes vote down vote up
/**
 * A JavaFxTopComponent will have a ScrollPane by default, as it cannot know
 * the expected layout of the given pane. If you wish to remove the
 * horizontal scroll bar, you can override this method to return
 * ScrollBarPolicy.NEVER.
 *
 * @return a {@link ScrollBarPolicy} representing the desired horizontal
 * scroll bar policy.
 */
protected ScrollBarPolicy getHorizontalScrollPolicy() {
    return ScrollBarPolicy.NEVER;
}
 
Example 4
Source File: JavaFxTopComponent.java    From constellation with Apache License 2.0 2 votes vote down vote up
/**
 * A JavaFxTopComponent will have a ScrollPane by default, as it cannot know
 * the expected layout of the given pane. If you wish to remove the vertical
 * scroll bar, you can override this method to return ScrollBarPolicy.NEVER.
 *
 * @return a {@link ScrollBarPolicy} representing the desired vertical
 * scroll bar policy.
 */
protected ScrollBarPolicy getVerticalScrollPolicy() {
    return ScrollBarPolicy.NEVER;
}