當前位置: 首頁>>代碼示例>>Java>>正文


Java SplitPane.setResizableWithParent方法代碼示例

本文整理匯總了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;
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:22,代碼來源:SplitPaneApp.java

示例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));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:26,代碼來源:SceneBuilderImpl.java

示例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);
	}
}
 
開發者ID:ivartanian,項目名稱:JVx.javafx,代碼行數:21,代碼來源:JavaFXSplitPanel.java

示例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;
}
 
開發者ID:veroslav,項目名稱:jfx-torrent,代碼行數:17,代碼來源:PreferencesWindow.java

示例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();
	}
 
開發者ID:ntenhoeve,項目名稱:Introspect-Framework,代碼行數:18,代碼來源:RfxDrawerTest2.java

示例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;
    }
 
開發者ID:factoryfx,項目名稱:factoryfx,代碼行數:39,代碼來源:DataViewWidget.java

示例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;
    }
 
開發者ID:factoryfx,項目名稱:factoryfx,代碼行數:35,代碼來源:TableDataViewWidget.java

示例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();
}
 
開發者ID:qupath,項目名稱:qupath,代碼行數:29,代碼來源:DefaultScriptEditor.java

示例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);
        });
    }
 
開發者ID:huliqing,項目名稱:LuoYing,代碼行數:33,代碼來源:MainLayout.java

示例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;
}
 
開發者ID:kasemir,項目名稱:org.csstudio.display.builder,代碼行數:32,代碼來源:DisplayEditor.java

示例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());
}
 
開發者ID:andytill,項目名稱:erlyberly,代碼行數:41,代碼來源:DbgView.java

示例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();
}
 
開發者ID:Haixing-Hu,項目名稱:iLibrary,代碼行數:32,代碼來源:MainContent.java

示例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);
}
 
開發者ID:Haixing-Hu,項目名稱:iLibrary,代碼行數:9,代碼來源:MainContent.java

示例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);
}
 
開發者ID:sfPlayer1,項目名稱:Matcher,代碼行數:63,代碼來源:MatchPaneDst.java

示例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();
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:79,代碼來源:Main.java


注:本文中的javafx.scene.control.SplitPane.setResizableWithParent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。