当前位置: 首页>>代码示例>>Java>>正文


Java TitledPane.setPrefWidth方法代码示例

本文整理汇总了Java中javafx.scene.control.TitledPane.setPrefWidth方法的典型用法代码示例。如果您正苦于以下问题:Java TitledPane.setPrefWidth方法的具体用法?Java TitledPane.setPrefWidth怎么用?Java TitledPane.setPrefWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.control.TitledPane的用法示例。


在下文中一共展示了TitledPane.setPrefWidth方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildCusTree

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void buildCusTree() {
	VBox vBox = new VBox();
	for (int i = 0; i < 10; i++) {
		VBox vBox2 = new VBox();
		vBox2.getChildren().add(new Text("One"));
		vBox2.getChildren().add(new Text("Two"));
		vBox2.getChildren().add(new Text("Three"));
		vBox2.getChildren().add(new Text("Four"));
		vBox2.getChildren().add(new Text("Five"));
		vBox2.getChildren().add(new Text("Six"));
		
		TitledPane tp = new TitledPane();
		tp.setPrefWidth(200);
		//tp.setExpanded(i%2==0 ? true :false);
		tp.setText("Title Pane "+i);
		tp.setContent(vBox2);
		
		vBox.getChildren().add(tp);
	}
	
	root.getChildren().add(vBox);
}
 
开发者ID:SaiPradeepDandem,项目名称:javafx-demos,代码行数:23,代码来源:AccordianDemo.java

示例2: showResultPane

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void showResultPane(TitledPane resultPane) {
	resultPane.setPrefWidth(outputScrollPane.getViewportBounds().getWidth());
	resultPane.setMaxWidth(outputScrollPane.getViewportBounds().getWidth());
	resultPane.setMinWidth(outputScrollPane.getViewportBounds().getWidth());
	outputScrollPane.viewportBoundsProperty().addListener((observer, oldValue, newValue) -> {			
		resultPane.setPrefWidth(newValue.getWidth());
		resultPane.setMinWidth(newValue.getWidth());
		resultPane.setMaxWidth(newValue.getWidth());
	});
	outputAccordion.getPanes().add(0, resultPane);
	resultPane.setExpanded(true);
	outputScrollPane.setVvalue(0);
}
 
开发者ID:aic-sri-international,项目名称:aic-praise,代码行数:14,代码来源:QueryController.java

示例3: create

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
public AnchorPane create() throws Exception {
    AnchorPane anchorPane = new AnchorPane();
    anchorPane.setId("AnchorPane");
    anchorPane.setMinHeight(Control.USE_PREF_SIZE);
    anchorPane.setMinWidth(Control.USE_PREF_SIZE);
    anchorPane.setPrefHeight(Control.USE_COMPUTED_SIZE);
    anchorPane.setPrefWidth(Control.USE_COMPUTED_SIZE);
    TitledPane titledPane = new TitledPane();
    titledPane.setAnimated(false);
    titledPane.setCollapsible(false);
    titledPane.setPrefHeight(Control.USE_COMPUTED_SIZE);
    titledPane.setPrefWidth(Control.USE_COMPUTED_SIZE);
    titledPane.setText(bundle.getString("GSSCopySection"));
    AnchorPane.setBottomAnchor(titledPane, 0.0);
    AnchorPane.setLeftAnchor(titledPane, 0.0);
    AnchorPane.setRightAnchor(titledPane, 0.0);
    AnchorPane.setTopAnchor(titledPane, 0.0);
    VBox vBox3 = new VBox();
    vBox3.setPrefHeight(Control.USE_COMPUTED_SIZE);
    vBox3.setPrefWidth(Control.USE_COMPUTED_SIZE);
    vBox3.setSpacing(5.0);
    controlCopyrightNotice = new TextArea();
    controlCopyrightNotice.setMinHeight(50.0);
    controlCopyrightNotice.setMinWidth(100.0);
    controlCopyrightNotice.setPrefWidth(Control.USE_COMPUTED_SIZE);
    controlCopyrightNotice.setPromptText(bundle.getString("GSSCopySection_Desc"));
    controlCopyrightNotice.setWrapText(true);
    VBox.setVgrow(controlCopyrightNotice, Priority.ALWAYS);
    vBox3.getChildren().add(controlCopyrightNotice);
    Insets insets5 = new Insets(10.0, 10.0, 10.0, 10.0);
    vBox3.setPadding(insets5);
    titledPane.setContent(vBox3);
    anchorPane.getChildren().add(titledPane);
    initialize(null, bundle);
    return anchorPane;
}
 
开发者ID:DigiArea,项目名称:closurefx-builder,代码行数:37,代码来源:GSSCopySectionController.java

示例4: create

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
public AnchorPane create() throws Exception {
    AnchorPane anchorPane37 = new AnchorPane();
    anchorPane37.setId("AnchorPane");
    anchorPane37.setMinHeight(Control.USE_PREF_SIZE);
    anchorPane37.setMinWidth(Control.USE_PREF_SIZE);
    anchorPane37.setPrefHeight(Control.USE_COMPUTED_SIZE);
    anchorPane37.setPrefWidth(Control.USE_COMPUTED_SIZE);
    TitledPane titledPane33 = new TitledPane();
    titledPane33.setAnimated(false);
    titledPane33.setCollapsible(false);
    titledPane33.setExpanded(true);
    titledPane33.setPrefHeight(Control.USE_COMPUTED_SIZE);
    titledPane33.setPrefWidth(Control.USE_COMPUTED_SIZE);
    titledPane33.setText(bundle.getString("SOYStyleSection"));
    AnchorPane.setBottomAnchor(titledPane33, 0.0);
    AnchorPane.setLeftAnchor(titledPane33, 0.0);
    AnchorPane.setRightAnchor(titledPane33, 0.0);
    AnchorPane.setTopAnchor(titledPane33, 0.0);
    VBox vBox65 = new VBox();
    vBox65.setPrefHeight(Control.USE_COMPUTED_SIZE);
    vBox65.setPrefWidth(Control.USE_COMPUTED_SIZE);
    Label label80 = new Label();
    label80.setMinWidth(100.0);
    label80.setText(bundle.getString("SOYStyleSection_Desc"));
    label80.setWrapText(true);
    vBox65.getChildren().add(label80);
    GridPane gridPane74 = new GridPane();
    gridPane74.setHgap(5.0);
    controlCodeStyleBuilder = new RadioButton();
    controlCodeStyleBuilder.setMnemonicParsing(false);
    controlCodeStyleBuilder.setText(bundle.getString("SOYStyleSection_String"));
    GridPane.setColumnIndex(controlCodeStyleBuilder, 0);
    GridPane.setRowIndex(controlCodeStyleBuilder, 0);
    styleGroup = new ToggleGroup();
    controlCodeStyleBuilder.setToggleGroup(styleGroup);
    gridPane74.getChildren().add(controlCodeStyleBuilder);
    controlCodeStyleConcat = new RadioButton();
    controlCodeStyleConcat.setMnemonicParsing(false);
    controlCodeStyleConcat.setText(bundle.getString("SOYStyleSection_Concatenation"));
    controlCodeStyleConcat.setToggleGroup(styleGroup);
    GridPane.setColumnIndex(controlCodeStyleConcat, 1);
    GridPane.setRowIndex(controlCodeStyleConcat, 0);
    gridPane74.getChildren().add(controlCodeStyleConcat);
    ColumnConstraints columnConstraints168 = new ColumnConstraints();
    columnConstraints168.setHgrow(Priority.NEVER);
    columnConstraints168.setMinWidth(Control.USE_COMPUTED_SIZE);
    columnConstraints168.setPrefWidth(Control.USE_COMPUTED_SIZE);
    gridPane74.getColumnConstraints().add(columnConstraints168);
    ColumnConstraints columnConstraints169 = new ColumnConstraints();
    columnConstraints169.setHgrow(Priority.NEVER);
    columnConstraints169.setMinWidth(Control.USE_COMPUTED_SIZE);
    columnConstraints169.setPrefWidth(Control.USE_COMPUTED_SIZE);
    gridPane74.getColumnConstraints().add(columnConstraints169);
    RowConstraints rowConstraints147 = new RowConstraints();
    rowConstraints147.setMinHeight(10.0);
    rowConstraints147.setPrefHeight(30.0);
    rowConstraints147.setVgrow(Priority.SOMETIMES);
    gridPane74.getRowConstraints().add(rowConstraints147);
    vBox65.getChildren().add(gridPane74);
    Insets insets100 = new Insets(10.0, 10.0, 10.0, 10.0);
    vBox65.setPadding(insets100);
    titledPane33.setContent(vBox65);
    anchorPane37.getChildren().add(titledPane33);
    initialize(null, bundle);
    return anchorPane37;
}
 
开发者ID:DigiArea,项目名称:closurefx-builder,代码行数:67,代码来源:SOYStyleSectionController.java

示例5: create

import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
public AnchorPane create() throws Exception {
    AnchorPane anchorPane11 = new AnchorPane();
    anchorPane11.setId("AnchorPane");
    anchorPane11.setMinHeight(Control.USE_PREF_SIZE);
    anchorPane11.setMinWidth(Control.USE_PREF_SIZE);
    anchorPane11.setPrefHeight(Control.USE_COMPUTED_SIZE);
    anchorPane11.setPrefWidth(Control.USE_COMPUTED_SIZE);
    TitledPane titledPane10 = new TitledPane();
    titledPane10.setAnimated(false);
    titledPane10.setPrefHeight(Control.USE_COMPUTED_SIZE);
    titledPane10.setPrefWidth(Control.USE_COMPUTED_SIZE);
    titledPane10.setText(bundle.getString("GSSVendorSection"));
    AnchorPane.setBottomAnchor(titledPane10, 0.0);
    AnchorPane.setLeftAnchor(titledPane10, 0.0);
    AnchorPane.setRightAnchor(titledPane10, 0.0);
    AnchorPane.setTopAnchor(titledPane10, 0.0);
    GridPane gridPane27 = new GridPane();
    gridPane27.setId("GridPane");
    gridPane27.setMinHeight(Control.USE_PREF_SIZE);
    gridPane27.setMinWidth(Control.USE_PREF_SIZE);
    gridPane27.setVgap(5.0);
    Label label21 = new Label();
    label21.setMaxHeight(Control.USE_COMPUTED_SIZE);
    label21.setMaxWidth(1.7976931348623157E308);
    label21.setMinHeight(Control.USE_COMPUTED_SIZE);
    label21.setMinWidth(100.0);
    label21.setPrefWidth(100.0);
    label21.setText(bundle.getString("GSSVendorSection_Desc"));
    label21.setWrapText(true);
    GridPane.setColumnIndex(label21, 0);
    GridPane.setHalignment(label21, HPos.LEFT);
    GridPane.setRowIndex(label21, 0);
    GridPane.setVgrow(label21, Priority.NEVER);
    gridPane27.getChildren().add(label21);
    controlVendor = new ComboBox();
    controlVendor.setMaxWidth(1.7976931348623157E308);
    controlVendor.setMinWidth(100.0);
    controlVendor.setPrefWidth(100.0);
    GridPane.setColumnIndex(controlVendor, 0);
    GridPane.setRowIndex(controlVendor, 1);
    gridPane27.getChildren().add(controlVendor);
    ColumnConstraints columnConstraints53 = new ColumnConstraints();
    columnConstraints53.setHgrow(Priority.SOMETIMES);
    columnConstraints53.setMaxWidth(1.7976931348623157E308);
    columnConstraints53.setMinWidth(100.0);
    columnConstraints53.setPrefWidth(200.0);
    gridPane27.getColumnConstraints().add(columnConstraints53);
    Insets insets27 = new Insets(10.0, 10.0, 10.0, 10.0);
    gridPane27.setPadding(insets27);
    RowConstraints rowConstraints50 = new RowConstraints();
    rowConstraints50.setMinHeight(Control.USE_PREF_SIZE);
    rowConstraints50.setVgrow(Priority.NEVER);
    gridPane27.getRowConstraints().add(rowConstraints50);
    RowConstraints rowConstraints51 = new RowConstraints();
    rowConstraints51.setMinHeight(Control.USE_PREF_SIZE);
    rowConstraints51.setVgrow(Priority.NEVER);
    gridPane27.getRowConstraints().add(rowConstraints51);
    titledPane10.setContent(gridPane27);
    anchorPane11.getChildren().add(titledPane10);
    initialize(null, bundle);
    return anchorPane11;
}
 
开发者ID:DigiArea,项目名称:closurefx-builder,代码行数:63,代码来源:GSSVendorSectionController.java


注:本文中的javafx.scene.control.TitledPane.setPrefWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。