本文整理匯總了Java中javafx.scene.control.TitledPane.setMinSize方法的典型用法代碼示例。如果您正苦於以下問題:Java TitledPane.setMinSize方法的具體用法?Java TitledPane.setMinSize怎麽用?Java TitledPane.setMinSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.control.TitledPane
的用法示例。
在下文中一共展示了TitledPane.setMinSize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawNode
import javafx.scene.control.TitledPane; //導入方法依賴的package包/類
@Override
public Node drawNode() {
String title = "TitledPane";
Label content = new Label("Content");
TitledPane titledPane = new TitledPane(title, content);
if (titledPane.getText() != title) {
reportGetterFailure("getTitle()");
}
if (titledPane.getContent() != content) {
reportGetterFailure("getTitle()");
}
titledPane.setMinSize(SLOT_WIDTH, SLOT_HEIGHT);
titledPane.setMaxSize(SLOT_WIDTH, SLOT_HEIGHT);
titledPane.setPrefSize(SLOT_WIDTH, SLOT_HEIGHT);
titledPane.setStyle("-fx-border-color: darkgray;");
return titledPane;
}
示例2: createObject
import javafx.scene.control.TitledPane; //導入方法依賴的package包/類
protected Object createObject(double width, double height, Double tab_width, Double tab_height) {
Label content = new Label("Content");
if (tab_width != null && tab_height != null) {
content.setMinSize(tab_width, tab_height);
content.setMaxSize(tab_width, tab_height);
content.setPrefSize(tab_width, tab_height);
}
TitledPane titled_pane = new TitledPane();
titled_pane.setText("Title");
titled_pane.setContent(content);
titled_pane.setMinSize(width, height);
titled_pane.setMaxSize(width, height);
titled_pane.setPrefSize(width, height);
titled_pane.setStyle("-fx-border-color: darkgray;");
return titled_pane;
}