本文整理汇总了Java中javafx.scene.control.SplitPane.setResizableWithParent方法的典型用法代码示例。如果您正苦于以下问题:Java SplitPane.setResizableWithParent方法的具体用法?Java SplitPane.setResizableWithParent怎么用?Java SplitPane.setResizableWithParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.SplitPane
的用法示例。
在下文中一共展示了SplitPane.setResizableWithParent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: create
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
private void create() {
myEditorController = new EditorController();
HierarchyTreeViewController componentTree = new HierarchyTreeViewController(myEditorController);
ContentPanelController canvas = new ContentPanelController(myEditorController);
InspectorPanelController propertyTable = new InspectorPanelController(myEditorController);
LibraryPanelController palette = new LibraryPanelController(myEditorController);
loadFile();
startChangeListener();
SplitPane leftPane = new SplitPane();
leftPane.setOrientation(Orientation.VERTICAL);
leftPane.getItems().addAll(palette.getPanelRoot(), componentTree.getPanelRoot());
leftPane.setDividerPositions(0.5, 0.5);
SplitPane.setResizableWithParent(leftPane, Boolean.FALSE);
SplitPane.setResizableWithParent(propertyTable.getPanelRoot(), Boolean.FALSE);
SplitPane mainPane = new SplitPane();
mainPane.getItems().addAll(leftPane, canvas.getPanelRoot(), propertyTable.getPanelRoot());
mainPane.setDividerPositions(0.11036789297658862, 0.8963210702341137);
myPanel.setScene(new Scene(mainPane, -1, -1, true, SceneAntialiasing.BALANCED));
}
示例3: setDividerAlignment
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setDividerAlignment(int pDividerAlignment)
{
dividerAlignment = pDividerAlignment;
SplitPane.setResizableWithParent(firstContainer, Boolean.TRUE);
SplitPane.setResizableWithParent(secondContainer, Boolean.TRUE);
if (dividerAlignment == DIVIDER_TOP_LEFT)
{
SplitPane.setResizableWithParent(firstContainer, Boolean.FALSE);
}
else if (dividerAlignment == DIVIDER_BOTTOM_RIGHT)
{
SplitPane.setResizableWithParent(secondContainer, Boolean.FALSE);
}
}
示例4: layoutContent
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
private Node layoutContent() {
final VBox optionCardLayout = new VBox(5);
optionCardLayout.getChildren().addAll(categoryNameLabel, optionsView);
optionCardLayout.setPadding(new Insets(0, 5, 0, 15));
final SplitPane mainLayout = new SplitPane();
mainLayout.setOrientation(Orientation.HORIZONTAL);
mainLayout.setDividerPosition(0, 0.20);
mainLayout.getItems().addAll(optionCategoriesTreeView, optionCardLayout);
mainLayout.setPrefSize(770, 500);
categoryNameLabel.prefWidthProperty().bind(mainLayout.widthProperty());
SplitPane.setResizableWithParent(optionCategoriesTreeView, Boolean.FALSE);
return mainLayout;
}
示例5: start
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
SplitPane root = new SplitPane();
final Pane paneFixed = new StackPane();
paneFixed.getChildren().add(new Text("fixed"));
SplitPane.setResizableWithParent(paneFixed, Boolean.FALSE);
Pane paneFree = new StackPane();
paneFree.getChildren().add(new Text("free"));
root.getItems().addAll(paneFree, paneFixed);
root.setStyle(".split-pane > .split-pane-divider { -fx-background-insets: 0, 0 1 0 1; } ");
stage.setScene(new Scene(root, 300, 200));
stage.show();
}
示例6: createContent
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
@Override
public Node createContent() {
// MasterDetailPane pane = new MasterDetailPane();
dataEditor.reset();
SplitPane splitPane = new SplitPane();
splitPane.setOrientation(orientation);
tableView.setItems(dataView.dataList());
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
TableColumn<T, String> test = new TableColumn<>("Data");
test.setCellValueFactory(param -> param.getValue().internal().getDisplayTextObservable());
tableView.getColumns().add(test);
tableView.getStyleClass().add("hidden-tableview-headers");
BorderPane borderPaneWrapper = new BorderPane();
borderPaneWrapper.setCenter(tableView);
SplitPane.setResizableWithParent(borderPaneWrapper, Boolean.FALSE);
splitPane.getItems().add(borderPaneWrapper);
Node dataEditorWidget = this.dataEditor.createContent();
SplitPane.setResizableWithParent(dataEditorWidget, Boolean.TRUE);
splitPane.getItems().add(dataEditorWidget);
splitPane.setDividerPositions(dividerPosition);
tableView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
dataEditor.edit(newValue);
dataEditor.resetHistory();
});
TableControlWidget tableControlWidget= new TableControlWidget<>(tableView, uniformDesign);
borderPaneWrapper.setBottom(tableControlWidget.createContent());
return splitPane;
}
示例7: createContent
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
@Override
public Node createContent() {
// MasterDetailPane pane = new MasterDetailPane();
SplitPane splitPane = new SplitPane();
splitPane.setOrientation(Orientation.VERTICAL);
TableView<T> tableView = new TableView<>();
tableView.setItems(tableDataView.dataList());
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
for (TableDataColumnSpec<T> col : columns) {
tableView.getColumns().add(col.create());
}
BorderPane borderPaneWrapper = new BorderPane();
borderPaneWrapper.setCenter(tableView);
splitPane.getItems().add(borderPaneWrapper);
Node dataEditorWidget = this.dataEditor.createContent();
SplitPane.setResizableWithParent(dataEditorWidget, Boolean.FALSE);
splitPane.getItems().add(dataEditorWidget);
splitPane.setDividerPositions(dividerPosition);
tableView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
dataEditor.edit(newValue);
dataEditor.resetHistory();
});
TableControlWidget tableControlWidget= new TableControlWidget<>(tableView, uniformDesign);
borderPaneWrapper.setBottom(tableControlWidget.createContent());
return splitPane;
}
示例8: initialize
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
private void initialize() {
BorderPane panelMainEditor = new BorderPane();
editor = getNewEditor();
editor.textProperty().addListener((v, o, n) -> {
updateUndoActionState();
updateIsModified();
});
editor.selectedTextProperty().addListener((v, o, n) -> updateCutCopyActionState());
editor.focusedProperty().addListener((v, o, n) -> maybeRefreshTab(this));
panelMainEditor.setCenter(editor.getControl());
console = getNewConsole();
ContextMenu popup = new ContextMenu();
popup.getItems().add(ActionUtils.createMenuItem(new Action("Clear console", e -> console.setText(""))));
console.getControl().setContextMenu(popup);
splitEditor = new SplitPane();
splitEditor.setOrientation(Orientation.VERTICAL);
splitEditor.getItems().addAll(
panelMainEditor,
console.getControl());
SplitPane.setResizableWithParent(console.getControl(), Boolean.FALSE);
splitEditor.setDividerPosition(0, 0.75);
updateIsModified();
}
示例9: buildLayout
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
private void buildLayout() {
getChildren().clear();
contentMainSp.getItems().clear();
getChildren().addAll(menuZone, contentMainSp, statusBar);
contentMainSp.getItems().addAll(sp2, resourceZone);
sp2.getItems().addAll(editZone);
sp2.setOrientation(Orientation.VERTICAL);
SplitPane.setResizableWithParent(textZone, Boolean.FALSE);
// -- zone size
prefHeightProperty().bind(root.heightProperty());
prefWidthProperty().bind(root.widthProperty());
contentMainSp.prefHeightProperty().bind(heightProperty().subtract(menuZone.heightProperty()).subtract(statusBar.heightProperty()));
resourceZone.prefHeightProperty().bind(contentMainSp.heightProperty());
editZone.prefHeightProperty().bind(contentMainSp.heightProperty());
statusBar.prefWidthProperty().bind(widthProperty());
// remove20170107,起到效果,原因不明,可能和JFXPanel与Swing的整合有关。必须使用下面的特殊方式处理:
// contentZone.setDividerPositions(0.2f);
// SplitPane.setResizableWithParent(resourceZone, Boolean.FALSE);
// 特殊方式限制resourceZone在初始化的时候为200的宽度,
// 并在延迟一帧后去除resourceZone限制并取消自动宽度, 这样resourceZone不会随着父窗口的放大而拉大。
resourceZone.setMinWidth(250);
resourceZone.setMaxWidth(250);
Jfx.runOnJfx(() -> {
resourceZone.setMinWidth(0);
resourceZone.setMaxWidth(Integer.MAX_VALUE);
SplitPane.setResizableWithParent(resourceZone, Boolean.FALSE);
});
}
示例10: create
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
/** Create UI elements
* @return Root Node
*/
public Parent create ()
{
model_root = toolkit.createModelRoot();
autoScrollHandler = new AutoScrollHandler(model_root);
final Group scroll_body = (Group) model_root.getContent();
widget_parent = (Pane) scroll_body.getChildren().get(0);
scroll_body.getChildren().add(edit_tools);
palette = new Palette(this);
final Node palette_node = palette.create();
final SplitPane model_and_palette = new SplitPane(model_root, palette_node);
model_and_palette.setDividerPositions(1);
SplitPane.setResizableWithParent(palette_node, false);
edit_tools.getChildren().addAll(selection_tracker);
hookListeners();
toolbar = createToolbar();
final BorderPane root = new BorderPane(model_and_palette);
root.setTop(toolbar);
return root;
}
示例11: initialize
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
@Override
public void initialize(URL url, ResourceBundle r) {
modFuncContextMenu = new ModFuncContextMenu(dbgController);
modFuncContextMenu.setModuleTraceMenuText("Trace All Functions in Module");
modFuncContextMenu.rootProperty().bind(modulesTree.rootProperty());
modulesTree
.getSelectionModel()
.selectedItemProperty()
.addListener((o, old, newItem) -> {
modFuncContextMenu.selectedTreeItemProperty().set(newItem);
if(newItem != null)
modFuncContextMenu.selectedItemProperty().set(newItem.getValue());
});
sortedTreeModules.setComparator(treeItemModFuncComparator());
SplitPane.setResizableWithParent(modulesBox, Boolean.TRUE);
ErlyBerly.nodeAPI().connectedProperty().addListener(this::onConnected);
modulesTree.setCellFactory(new ModFuncTreeCellFactory(dbgController));
modulesTree.setContextMenu(modFuncContextMenu);
addModulesFloatySearchControl();
dbgController.initialize(url, r);
dbgController.setModuleLoadedCallback((tuple) -> {
createModuleTreeItem(tuple);
});
tabPane = new TabPane();
TabPaneDetacher.create()
.stylesheets("/floatyfield/floaty-field.css", "/erlyberly/erlyberly.css")
.makeTabsDetachable(tabPane);
Tab traceViewTab;
traceViewTab = new Tab("Traces");
traceViewTab.setContent(new DbgTraceView(dbgController));
traceViewTab.setClosable(false);
getTabPane().getTabs().add(traceViewTab);
dbgSplitPane.getItems().add(getTabPane());
}
示例12: MainContent
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
public MainContent(final Application application) {
super();
logger = LoggerFactory.getLogger(MainWindow.class);
logger.trace("Craeting {}", MainWindow.class);
setId(ID);
setOrientation(Orientation.HORIZONTAL);
this.application = application;
oneColumnPane = new CardPane();
twoColumnPane = new SplitPaneEx();
leftPane = new CardPane();
navigators = new CardPane();
contents = new CardPane();
inspectors = new CardPane();
navigators.getStyleClass().add(NavigatorPanel.STYLE_CLASS);
contents.getStyleClass().add(ContentPanel.STYLE_CLASS);
inspectors.getStyleClass().add(InspectorPanel.STYLE_CLASS);
leftPane.getStyleClass().add(LEFT_PANE_CLASS);
SplitPane.setResizableWithParent(leftPane, true);
SplitPane.setResizableWithParent(inspectors, false);
getItems().addAll(leftPane, inspectors);
setDividerPositions(0.8); // FIXME
createNavigators();
createContents();
createInspectors();
configLeftPane();
}
示例13: configLeftPane
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
private void configLeftPane() {
oneColumnPane.addCard(contents.getCard(Page.READER.ordinal()));
SplitPane.setResizableWithParent(navigators, false);
SplitPane.setResizableWithParent(contents, true);
twoColumnPane.getItems().addAll(navigators, contents);
twoColumnPane.setDividerPositions(0.25); // FIXME
leftPane.addAllCards(oneColumnPane, twoColumnPane);
}
示例14: init
import javafx.scene.control.SplitPane; //导入方法依赖的package包/类
private void init() {
// content
ContentPane content = new ContentPane(gui, this, false);
components.add(content);
getItems().add(content);
// lists
SplitPane verticalPane = new SplitPane();
getItems().add(verticalPane);
// class list
classList.setCellFactory(new MatchableListCellFactory<ClassInstance>());
classList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
if (oldValue == newValue) return;
onClassSelect(newValue != null ? newValue.getSubject() : null);
});
verticalPane.getItems().add(classList);
// member list
memberList.setCellFactory(new MatchableListCellFactory<MemberInstance<?>>());
memberList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
if (oldValue == newValue) return;
boolean wasMethod = oldValue != null && oldValue.getSubject() instanceof MethodInstance;
boolean wasField = oldValue != null && oldValue.getSubject() instanceof FieldInstance;
boolean isMethod = newValue != null && newValue.getSubject() instanceof MethodInstance;
boolean isField = newValue != null && newValue.getSubject() instanceof FieldInstance;
if (wasMethod && isField
|| wasField && isMethod) {
if (wasMethod) {
onMethodSelect(null);
} else {
onFieldSelect(null);
}
}
if (isMethod || newValue == null && wasMethod) {
onMethodSelect(isMethod ? (MethodInstance) newValue.getSubject() : null);
} else {
onFieldSelect(isField ? (FieldInstance) newValue.getSubject() : null);
}
});
verticalPane.getItems().add(memberList);
// positioning
verticalPane.setOrientation(Orientation.VERTICAL);
verticalPane.setDividerPosition(0, 0.65);
SplitPane.setResizableWithParent(verticalPane, false);
setDividerPosition(0, 1 - 0.25);
srcPane.addListener(srcListener);
}
示例15: 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();
}