本文整理匯總了Java中javafx.scene.control.SplitPane.setMinSize方法的典型用法代碼示例。如果您正苦於以下問題:Java SplitPane.setMinSize方法的具體用法?Java SplitPane.setMinSize怎麽用?Java SplitPane.setMinSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.control.SplitPane
的用法示例。
在下文中一共展示了SplitPane.setMinSize方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawNode
import javafx.scene.control.SplitPane; //導入方法依賴的package包/類
@Override
public Node drawNode() {
SplitPane split_pane = new SplitPane();
Rectangle blue_rect = new Rectangle(SLOT_WIDTH, SLOT_HEIGHT);
blue_rect.setFill(new Color(0, 0, 1, 1));
Rectangle red_rect = new Rectangle(SLOT_WIDTH, SLOT_HEIGHT);
red_rect.setFill(new Color(1, 0, 0, 1));
split_pane.getItems().add(blue_rect);
split_pane.getItems().add(red_rect);
split_pane.setMaxSize(SLOT_WIDTH, SLOT_HEIGHT);
split_pane.setPrefSize(SLOT_WIDTH, SLOT_HEIGHT);
split_pane.setMinSize(SLOT_WIDTH, SLOT_HEIGHT);
split_pane.setStyle("-fx-border-color: darkgray;");
split_pane.setOrientation(orientation);
return split_pane;
}
示例2: createNested
import javafx.scene.control.SplitPane; //導入方法依賴的package包/類
protected SplitPane createNested() {
SplitPane nested_split_pane = (SplitPane) createObject();
nested_split_pane.setId(NESTED_SPLIT);
boolean resizable = false;
for (Node node : nested_split_pane.getItems()) {
SplitPane.setResizableWithParent(node, resizable);
if (SplitPane.isResizableWithParent(node) != resizable) {
reportGetterFailure("SplitPane.isResizableWithParent(node)");
break;
}
resizable = !resizable;
}
nested_split_pane.setOrientation(orientation);
nested_split_pane.setMaxSize(-1, -1);
nested_split_pane.setPrefSize(-1, -1);
nested_split_pane.setMinSize(-1, -1);
return nested_split_pane;
}
示例3: createObject
import javafx.scene.control.SplitPane; //導入方法依賴的package包/類
protected Object createObject(double width, double height, Double tab_width, Double tab_height) {
SplitPane split_pane = new SplitPane();
for (int i = 0; i < SPLITS_NUM; i++) {
VBox box = new VBox();
box.setId(SPLIT_PANE_CONTENT);
Label label = new Label("Split's " + i + " content");
label.setMinSize(0, 0);
box.getChildren().add(label);
split_pane.getItems().add(box);
}
for (int i = 0; i < SPLITS_NUM - 1; i++) {
split_pane.setDividerPosition(i, 1.0 * (i + 1) / SPLITS_NUM);
}
split_pane.setMaxSize(width, height);
split_pane.setPrefSize(width, height);
split_pane.setMinSize(0, 0);
split_pane.setStyle("-fx-border-color: darkgray;");
return split_pane;
}
示例4: initializeDisplayControls
import javafx.scene.control.SplitPane; //導入方法依賴的package包/類
private Node initializeDisplayControls(){
VBox simplecontrols = new VBox();
simplecontrols.setSpacing(5.0);
simplecontrols.setPadding(new Insets(0.0, 0.0, 0.0, 5.0));
simplecontrols.setAlignment(Pos.TOP_CENTER);
controlsSimple_Pane = simplecontrols;
VBox graphiccontrols = new VBox();
graphiccontrols.setSpacing(10.0);
graphiccontrols.setAlignment(Pos.TOP_CENTER);
//SplitPane graphiccontrols = new SplitPane();
//graphiccontrols.setOrientation(Orientation.VERTICAL);
graphiccontrols.setPadding(new Insets(5.0, 5.0, 0.0, 0.0));
controlsGraphic_Pane = graphiccontrols;
SplitPane controlsPane = new SplitPane();
controlsPane.setOrientation(Orientation.HORIZONTAL);
controlsPane.getItems().addAll(graphiccontrols, simplecontrols);
controlsPane.setMinSize(380.0, 300.0);
HBox root = new HBox();
root.setAlignment(Pos.TOP_CENTER);
root.setPadding(new Insets(5.0, 0.0, 5.0, 5.0));
root.setMinWidth(380.0);
root.getChildren().addAll(controlsPane);
return root;
}
示例5: initializeInputControls
import javafx.scene.control.SplitPane; //導入方法依賴的package包/類
private Node initializeInputControls(){
GridPane activatablecontrols = new GridPane();
activatablecontrols.setAlignment(Pos.CENTER);
activatablecontrols.setPadding(new Insets(10.0));
activatablecontrols.setVgap(10.0);
activatablecontrols.setHgap(10.0);
controlsActivatable_Pane = activatablecontrols;
GridPane inputcontrols = new GridPane();
inputcontrols.setAlignment(Pos.CENTER);
inputcontrols.setPadding(new Insets(10.0));
inputcontrols.setVgap(10.0);
inputcontrols.setHgap(15.0);
controlsInput_Pane = inputcontrols;
VBox estopBox = new VBox();
estopBox.setSpacing(5.0);
estopBox.setPadding(new Insets(10.0));
estopBox.setAlignment(Pos.CENTER);
estopBox.getChildren().addAll(Dashboard.getEmergencyStopControl().getRoot());
SplitPane controlsPane = new SplitPane();
controlsPane.setOrientation(Orientation.HORIZONTAL);
controlsPane.getItems().addAll(inputcontrols, activatablecontrols);
controlsPane.setMinSize(800.0, 150.0);
BorderPane root = new BorderPane();
root.setLeft(controlsPane);
root.setRight(estopBox);
return root;
}
示例6: start
import javafx.scene.control.SplitPane; //導入方法依賴的package包/類
@Override
public void start(Stage primaryStage)
{
this.stage = primaryStage;
primaryStage.setTitle(APPLICATION_NAME + " V" + VERSION + "." + REVISION);
ApplicationSettings.initialize();
ApplicationSettings.loadFromFile("settings/plp-tool.settings");
EventRegistry.getGlobalRegistry().register(new ApplicationEventBusEventHandler());
applicationThemeManager = new ApplicationThemeManager();
this.assemblyDetails = new HashMap<>();
this.openFileTabs = new DualHashBidiMap<>();
this.openProjectsPanel = new TabPane();
this.projectExplorer = createProjectTree();
outlineView = createOutlineView();
console = createConsole();
console.println(">> Console Initialized.");
openProjectsPanel.getSelectionModel().selectedItemProperty()
.addListener(this::onTabActivation);
ScrollPane scrollableProjectExplorer = new ScrollPane(projectExplorer);
scrollableProjectExplorer.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
scrollableProjectExplorer.setHbarPolicy(ScrollBarPolicy.AS_NEEDED);
scrollableProjectExplorer.setFitToHeight(true);
scrollableProjectExplorer.setFitToWidth(true);
// Left side holds the project tree and outline view
SplitPane leftSplitPane = new SplitPane();
leftSplitPane.orientationProperty().set(Orientation.VERTICAL);
leftSplitPane.getItems().addAll(scrollableProjectExplorer, outlineView);
leftSplitPane.setDividerPositions(0.5, 1.0);
leftSplitPane.setMinSize(0, 0);
// Right side holds the source editor and the output console
SplitPane rightSplitPane = new SplitPane();
rightSplitPane.orientationProperty().set(Orientation.VERTICAL);
rightSplitPane.getItems().addAll(Components.wrap(openProjectsPanel),
Components.wrap(console));
rightSplitPane.setDividerPositions(0.75, 1.0);
rightSplitPane.setMinSize(0, 0);
// Container for the whole view (everything under the toolbar)
SplitPane explorerEditorSplitPane = new SplitPane();
explorerEditorSplitPane.getItems().addAll(Components.wrap(leftSplitPane),
Components.wrap(rightSplitPane));
explorerEditorSplitPane.setDividerPositions(0.225, 1.0);
explorerEditorSplitPane.setMinSize(0, 0);
SplitPane.setResizableWithParent(leftSplitPane, Boolean.FALSE);
//loadOpenProjects();
Parent menuBar = createMenuBar();
Parent toolbar = createToolbar();
BorderPane mainPanel = new BorderPane();
VBox topContainer = new VBox();
topContainer.getChildren().add(menuBar);
topContainer.getChildren().add(toolbar);
mainPanel.setTop(topContainer);
mainPanel.setCenter(explorerEditorSplitPane);
int width = DEFAULT_WINDOW_WIDTH;
int height = DEFAULT_WINDOW_HEIGHT;
Scene scene = new Scene(Components.wrap(mainPanel), width, height);
primaryStage.setScene(scene);
String themeName = ApplicationSettings.getSetting(
ApplicationSetting.APPLICATION_THEME).get();
EventRegistry.getGlobalRegistry().post(new ThemeRequestEvent(themeName));
primaryStage.show();
}