Search in sources :

Example 71 with BorderPane

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();
    });
}
Also used : BorderPane(javafx.scene.layout.BorderPane) LettersPane(com.kyj.fx.voeditor.visual.component.LettersPane) Button(javafx.scene.control.Button) Scene(javafx.scene.Scene) Border(javafx.scene.layout.Border) StackPane(javafx.scene.layout.StackPane) BlinkBorderTransition(com.kyj.fx.voeditor.visual.framework.animation.BlinkBorderTransition)

Example 72 with BorderPane

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();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) ButtonStyleViewComposite(com.kyj.fx.voeditor.visual.component.config.skin.ButtonStyleViewComposite) Scene(javafx.scene.Scene)

Example 73 with BorderPane

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();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) CellDataFeatures(javafx.scene.control.TableColumn.CellDataFeatures) ObservableValue(javafx.beans.value.ObservableValue) Scene(javafx.scene.Scene) TableColumn(javafx.scene.control.TableColumn) TableCell(javafx.scene.control.TableCell) CheckBoxTableCell(javafx.scene.control.cell.CheckBoxTableCell) SampleVO(com.kyj.fx.voeditor.visual.example.CheckBoxTableCellExam.SampleVO) TableView(javafx.scene.control.TableView)

Example 74 with BorderPane

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();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) DynamicImageViewItem(com.kyj.fx.voeditor.visual.component.grid.DynamicImageViewItem) DynamicLabelItem(com.kyj.fx.voeditor.visual.component.grid.DynamicLabelItem) DynamicItemListView(com.kyj.fx.voeditor.visual.component.grid.DynamicItemListView) Scene(javafx.scene.Scene)

Example 75 with BorderPane

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;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) HBox(javafx.scene.layout.HBox) TextArea(javafx.scene.control.TextArea) Button(javafx.scene.control.Button) ScrollPane(javafx.scene.control.ScrollPane) HTMLEditor(javafx.scene.web.HTMLEditor)

Aggregations

BorderPane (javafx.scene.layout.BorderPane)95 Scene (javafx.scene.Scene)58 Button (javafx.scene.control.Button)19 Label (javafx.scene.control.Label)17 FXMLLoader (javafx.fxml.FXMLLoader)14 Stage (javafx.stage.Stage)14 StackPane (javafx.scene.layout.StackPane)12 IOException (java.io.IOException)11 Parameter (aima.gui.fx.framework.Parameter)10 SimulationPaneBuilder (aima.gui.fx.framework.SimulationPaneBuilder)10 File (java.io.File)10 HBox (javafx.scene.layout.HBox)9 HashMap (java.util.HashMap)8 Insets (javafx.geometry.Insets)8 TextField (javafx.scene.control.TextField)8 Map (java.util.Map)6 MenuItem (javafx.scene.control.MenuItem)6 TableColumn (javafx.scene.control.TableColumn)6 TableView (javafx.scene.control.TableView)6 List (java.util.List)5