use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.
the class DAOLoaderController method menuHistoryOnAction.
/**
* 히스토리 이력을 살펴보는경우 사용
*
* @작성자 : KYJ
* @작성일 : 2015. 11. 6.
* @param event
*/
public void menuHistoryOnAction(ActionEvent event) {
Map<String, Object> selectedItem = tbSrchDao.getSelectionModel().getSelectedItem();
if (selectedItem == null)
return;
String packageName = ValueUtil.emptyThan(selectedItem.get("PACKAGE_NAME"), "").toString();
String className = ValueUtil.emptyThan(selectedItem.get("CLASS_NAME"), "").toString();
// Stage primaryStage = SharedMemory.getPrimaryStage();
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("packageName", packageName);
paramMap.put("className", className);
try {
List<TbmSysDaoMethodsHDVO> select = listHistoryItems(paramMap);
CommonsBaseGridView<TbmSysDaoMethodsHDVO> commonsBaseGridView = new CommonsBaseGridView<>(TbmSysDaoMethodsHDVO.class, select);
TableViewSelectionModel<TbmSysDaoMethodsHDVO> selectionModel = commonsBaseGridView.getSelectionModel();
selectionModel.setSelectionMode(SelectionMode.MULTIPLE);
BorderPane borderPane = new BorderPane();
Label value = new Label("History");
value.setStyle("-fx-font-size:75px");
borderPane.setTop(value);
SqlKeywords sqlKeyword = new SqlKeywords();
borderPane.setBottom(sqlKeyword);
SplitPane splitPane = new SplitPane(commonsBaseGridView, sqlKeyword);
splitPane.setOrientation(Orientation.VERTICAL);
borderPane.setCenter(splitPane);
commonsBaseGridView.setOnMouseClicked(ev -> {
if (ev.getClickCount() == 2) {
try {
TbmSysDaoMethodsHDVO selectedItem2 = commonsBaseGridView.getSelectionModel().getSelectedItem();
String histTsp = selectedItem2.getHistTsp();
String sqlBody = getSqlBody(histTsp);
sqlKeyword.setContent(sqlBody);
} catch (Exception e) {
LOGGER.error(ValueUtil.toString(e));
}
}
});
MenuItem compare = new MenuItem("Compare.");
compare.setDisable(true);
compare.setOnAction(ev -> {
ObservableList<TbmSysDaoMethodsHDVO> selectedItems = commonsBaseGridView.getSelectionModel().getSelectedItems();
if (selectedItems.size() == 2) {
compare(selectedItems.get(0), selectedItems.get(1));
}
});
ContextMenu historyContextMenu = new ContextMenu(compare);
historyContextMenu.setOnShowing(ev -> {
if (selectionModel.getSelectedItems().size() == 2) {
compare.setDisable(false);
} else {
compare.setDisable(true);
}
});
commonsBaseGridView.setContextMenu(historyContextMenu);
Scene scene = new Scene(borderPane);
Stage stage = new Stage();
stage.initOwner(SharedMemory.getPrimaryStage());
stage.setScene(scene);
stage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.
the class FxControlsTreeViewExam method start.
@Override
public void start(Stage primaryStage) throws Exception {
CheckBoxFxControlTreeView checkedNodeTreeView = new CheckBoxFxControlTreeView(getTestNod());
checkedNodeTreeView.setOnMouseClicked(event -> {
System.out.println(checkedNodeTreeView.getCheckModel().getCheckedItems());
});
FxControlTreeView simpleNodeTreeView = new FxControlTreeView(getTestNod());
simpleNodeTreeView.setOnMouseClicked(event -> {
System.out.println(simpleNodeTreeView.getSelectionModel().getSelectedItems());
});
Scene scene = new Scene(new SplitPane(simpleNodeTreeView, checkedNodeTreeView));
primaryStage.setScene(scene);
primaryStage.show();
}
use of javafx.scene.control.SplitPane in project intellij-community by JetBrains.
the class SceneBuilderImpl method create.
private void create() {
if (myProject.isDisposed()) {
return;
}
myEditorController = new EditorController();
updateCustomLibrary();
HierarchyTreeViewController componentTree = new HierarchyTreeViewController(myEditorController);
ContentPanelController canvas = new ContentPanelController(myEditorController);
InspectorPanelController propertyTable = new InspectorPanelController(myEditorController);
LibraryPanelController palette = new LibraryPanelController(myEditorController);
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, myPanel.getWidth(), myPanel.getHeight(), true, SceneAntialiasing.BALANCED));
loadFile();
startChangeListener();
if (myProject.isDisposed()) {
return;
}
UsageTrigger.trigger("scene-builder.open");
}
use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.
the class VelocityDocumentExam method start.
/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane pane = new BorderPane();
TextArea root = new TextArea();
TextArea btm = new TextArea();
SplitPane splitPane = new SplitPane(root, btm);
splitPane.setDividerPosition(0, 0.6d);
splitPane.setOrientation(Orientation.VERTICAL);
pane.setCenter(splitPane);
Button value = new Button("Excute");
pane.setBottom(value);
value.setOnAction(ev -> {
String velocityToText = ValueUtil.getVelocityToText(root.getText(), new HashMap<String, Object>(), false);
btm.setText(velocityToText);
});
primaryStage.setScene(new Scene(pane));
primaryStage.show();
}
use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.
the class SliderLineChartExam method start.
@Override
public void start(Stage primaryStage) throws Exception {
SliderLineChartComposite<Person> loadRoot1 = null;
RangeSliderLineChartComposite<Person> loadRoot2 = null;
try {
List<Person> arrayList = new ArrayList<>();
for (int i = 0; i < 30; i++) {
arrayList.add(new Person(i + "", i));
}
loadRoot1 = new SliderLineChartComposite<Person>() {
@Override
public Data<String, Number> converter(Person t) {
return new Data<>(t.name, t.age);
}
};
loadRoot1.getItems().addAll(arrayList);
loadRoot2 = new RangeSliderLineChartComposite<Person>() {
@Override
public Data<String, Number> converter(Person t) {
return new Data<>(t.name, t.age);
}
};
loadRoot2.getItems().addAll(arrayList);
primaryStage.setScene(new Scene(new SplitPane(loadRoot1, loadRoot2)));
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
// System.out.println(loadRoot1 == loadRoot2);
}
Aggregations