javafx.scene.control.SplitPane.Divider Java Examples
The following examples show how to use
javafx.scene.control.SplitPane.Divider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Tools.java From logbook-kai with MIT License | 6 votes |
/** * SplitPaneの分割サイズを設定する * * @param pane SplitPane * @param key SplitPaneのキー */ public static void setSplitWidth(SplitPane pane, String key) { Double position = AppConfig.get().getDividerPositionMap() .get(key); Iterator<Divider> ite = pane.getDividers() .iterator(); if (ite.hasNext()) { Divider divider = ite.next(); if (position != null) { divider.setPosition(position); } // 幅が変更された時に設定を保存する divider.positionProperty().addListener((ob, o, n) -> { AppConfig.get().getDividerPositionMap().put(key, n.doubleValue()); }); } }
Example #2
Source File: EditorGUI.java From phoebus with Eclipse Public License 1.0 | 5 votes |
/** @param show Show widget tree? */ public void showWidgetTree(final boolean show) { if (show == isWidgetTreeShown()) return; double tdiv = prefs.getDouble(DisplayEditorInstance.TREE_DIVIDER, 0.2); double pdiv = prefs.getDouble(DisplayEditorInstance.PROP_DIVIDER, 0.8); if (show) { center_split.getItems().add(0, tree_box); if (arePropertiesShown()) Platform.runLater(() -> setDividerPositions(tdiv, pdiv)); else Platform.runLater(() -> setDividerPositions(tdiv)); } else { center_split.getItems().remove(tree_box); if (arePropertiesShown()) Platform.runLater(() -> setDividerPositions(pdiv)); } for (Divider div : center_split.getDividers()) { div.positionProperty().removeListener(divider_listener); div.positionProperty().addListener(divider_listener); } // Update pref about last tree state prefs.putBoolean(SHOW_TREE, show); }
Example #3
Source File: EditorGUI.java From phoebus with Eclipse Public License 1.0 | 5 votes |
/** @param show Show properties? */ public void showProperties(final boolean show) { if (show == arePropertiesShown()) return; if (show) { double tdiv = prefs.getDouble(DisplayEditorInstance.TREE_DIVIDER, 0.2); double pdiv = prefs.getDouble(DisplayEditorInstance.PROP_DIVIDER, 0.8); center_split.getItems().add(properties_box); if (isWidgetTreeShown()) Platform.runLater(() -> setDividerPositions(tdiv, pdiv)); else Platform.runLater(() -> setDividerPositions(pdiv)); } else center_split.getItems().remove(properties_box); for (Divider div : center_split.getDividers()) { div.positionProperty().removeListener(divider_listener); div.positionProperty().addListener(divider_listener); } // Update pref about last prop state prefs.putBoolean(SHOW_PROPS, show); }
Example #4
Source File: ErlyBerly.java From erlyberly with GNU General Public License v3.0 | 5 votes |
private void hideProcsPane(){ Divider div = splitPane.getDividers().get(0); entopDivPosition = div.getPosition(); div.setPosition(0d); splitPane.getItems().remove(0); }
Example #5
Source File: ErlyBerly.java From erlyberly with GNU General Public License v3.0 | 4 votes |
private void showProcsPane(){ splitPane.getItems().add(0, entopPane); Divider div = splitPane.getDividers().get(0); div.setPosition(entopDivPosition); }