Java Code Examples for javafx.scene.control.ContentDisplay#LEFT

The following examples show how to use javafx.scene.control.ContentDisplay#LEFT . 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: ControlStyle.java    From MyBox with Apache License 2.0 6 votes vote down vote up
public static ContentDisplay getControlContent(String value) {
    if (value == null) {
        return ContentDisplay.GRAPHIC_ONLY;
    }
    switch (value.toLowerCase()) {
        case "graphic":
            return ContentDisplay.GRAPHIC_ONLY;
        case "text":
            return ContentDisplay.TEXT_ONLY;
        case "top":
            return ContentDisplay.TOP;
        case "left":
            return ContentDisplay.LEFT;
        case "right":
            return ContentDisplay.RIGHT;
        case "bottom":
            return ContentDisplay.BOTTOM;
        case "center":
            return ContentDisplay.CENTER;
        default:
            return ContentDisplay.GRAPHIC_ONLY;

    }
}
 
Example 2
Source File: Exercise_16_15.java    From Intro-to-Java-Programming with MIT License 5 votes vote down vote up
/** Returns the selected content display */
private ContentDisplay setDisplay() {
	if (cbo.getValue().equals("TOP"))
		return ContentDisplay.TOP;
	else if (cbo.getValue().equals("BOTTOM"))
		return ContentDisplay.BOTTOM;
	else if (cbo.getValue().equals("LEFT"))
		return ContentDisplay.LEFT;
	else
		return ContentDisplay.RIGHT; 
}