use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class LetterExam method start.
/**
* @inheritDoc
*/
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane borderPane = new BorderPane();
Button button = new Button("Play");
LettersPane lettersPane = new LettersPane();
borderPane.setTop(new StackPane(button));
borderPane.setCenter(lettersPane);
primaryStage.setScene(new Scene(borderPane));
primaryStage.show();
// lettersPane.setStyle("-fx-border-color : blue; -fx-border-width : 1px");
// button.setCache(true);
// button.setCacheHint(CacheHint.SPEED);
// Border fromBorder = new Border(new BorderStroke(Color.RED, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT));
// Border toBorder = new Border(new BorderStroke(Color.RED, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT));
// StringBinding createStringBinding = Bindings.createStringBinding(new Callable<String>() {
//
// @Override
// public String call() throws Exception {
// return "-fx-border-color : red ; -fx-border-width : 1px";
// }
// }, button.styleProperty());
Border border = button.getBorder();
button.setOnAction(ev -> {
new BlinkBorderTransition(lettersPane, border, Color.RED).play();
});
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class ButtonStylingExam method start.
/*
* (non-Javadoc)
*
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane root = new ButtonStyleViewComposite();
Scene scene = new Scene(root);
// HBox hboxSample = new HBox(new Button("Button"));
// hboxSample.setAlignment(Pos.CENTER);
// root.setTop(hboxSample);
//
// TextArea textArea = new TextArea();
// root.setCenter(textArea);
// Button btnApply = new Button("Apply");
//
// root.setBottom(btnApply);
// btnApply.setOnAction(ev -> {
// String text = textArea.getText();
// scene.getStylesheets().clear();
// try {
// File createUserCustomSkin = SkinManager.getInstance().createUserCustomSkin(text, false);
// scene.getStylesheets().add(createUserCustomSkin.toURI().toURL().toExternalForm());
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
//
// });
primaryStage.setScene(scene);
primaryStage.show();
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class CheckBoxTableCellExam method start.
/*
* (non-Javadoc)
*
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
TableView<SampleVO> center = new TableView<>();
center.setEditable(true);
TableColumn<SampleVO, Boolean> e = new TableColumn<SampleVO, Boolean>();
e.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<SampleVO, Boolean>, ObservableValue<Boolean>>() {
@Override
public ObservableValue<Boolean> call(CellDataFeatures<SampleVO, Boolean> param) {
return param.getValue().checked;
}
});
e.setCellFactory(new Callback<TableColumn<SampleVO, Boolean>, TableCell<SampleVO, Boolean>>() {
@Override
public TableCell<SampleVO, Boolean> call(TableColumn<SampleVO, Boolean> param) {
return new CheckBoxTableCell<SampleVO, Boolean>() {
/*
* (non-Javadoc)
*
* @see
* javafx.scene.control.cell.CheckBoxTableCell#updateItem(
* java.lang.Object, boolean)
*/
@Override
public void updateItem(Boolean item, boolean empty) {
super.updateItem(item, empty);
}
/*
* (non-Javadoc)
*
* @see
* javafx.scene.control.Cell#isItemChanged(java.lang.Object,
* java.lang.Object)
*/
@Override
protected boolean isItemChanged(Boolean oldItem, Boolean newItem) {
System.out.println(oldItem + " : " + newItem);
return super.isItemChanged(oldItem, newItem);
}
};
}
});
e.setEditable(true);
TableColumn<SampleVO, String> e2 = new TableColumn<SampleVO, String>();
e2.setCellValueFactory(new PropertyValueFactory<SampleVO, String>("name"));
center.getColumns().add(e);
center.getColumns().add(e2);
center.getItems().add(new SampleVO(true, "kim"));
center.getItems().add(new SampleVO(true, "young"));
BorderPane borderPane = new BorderPane(center);
primaryStage.setScene(new Scene(borderPane));
primaryStage.show();
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class DynamicListViewExample method start.
@Override
public void start(Stage primaryStage) throws Exception {
DynamicItemListView dynamicListView = new DynamicItemListView();
dynamicListView.getItems().add(new DynamicLabelItem("테스트"));
dynamicListView.getItems().add(new DynamicImageViewItem("C:\\Users\\KYJ\\Pictures\\98.jpg"));
BorderPane root = new BorderPane(dynamicListView);
root.setPrefSize(800, 600);
Scene value = new Scene(root, 800, 600);
primaryStage.setScene(value);
primaryStage.show();
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class FxControlsTreeViewExam method getTestNod.
Node getTestNod() {
/* [시작] 분석하고자하는 UI구조 */
BorderPane borderPane = new BorderPane();
ScrollPane scrollPane2 = new ScrollPane();
scrollPane2.setContent(new TextArea());
borderPane.setTop(new HBox(new Button(), new Button(), new HTMLEditor()));
borderPane.setCenter(new BorderPane(scrollPane2));
/* [끝] 분석하고자하는 UI구조 */
return borderPane;
}
Aggregations