< prev index next >
functional/ControlsTests/src/javafx/scene/control/test/tabpane/NewTabPaneApp.java
Print this page
*** 89,115 ****
pane = new Pane();
pane.setMinSize(220, 220);
pane.setPrefSize(220, 220);
pane.setStyle("-fx-border-color : red;");
! testedTabPane = TabPaneBuilder.create().id(TESTED_TABPANE_ID).build();
pane.getChildren().add(testedTabPane);
tb = new PropertiesTable(testedTabPane);
PropertyTablesFactory.explorePropertiesList(testedTabPane, tb);
! Button btnResetHardly = ButtonBuilder.create().id(RESET_BUTTON_ID).text("Reset").build();
btnResetHardly.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
HBox hb = (HBox) getRoot();
hb.getChildren().clear();
prepareMainSceneStructure();
prepareScene();
}
});
! Button btnResetSoftly = ButtonBuilder.create().id(RESET_SOFTLY_BUTTON_ID).text("Reset softly").build();
btnResetSoftly.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
tb.refresh();
--- 89,118 ----
pane = new Pane();
pane.setMinSize(220, 220);
pane.setPrefSize(220, 220);
pane.setStyle("-fx-border-color : red;");
! testedTabPane = new TabPane();
! testedTabPane.setId(TESTED_TABPANE_ID);
pane.getChildren().add(testedTabPane);
tb = new PropertiesTable(testedTabPane);
PropertyTablesFactory.explorePropertiesList(testedTabPane, tb);
! Button btnResetHardly = new Button("Reset");
! btnResetHardly.setId(RESET_BUTTON_ID);
btnResetHardly.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
HBox hb = (HBox) getRoot();
hb.getChildren().clear();
prepareMainSceneStructure();
prepareScene();
}
});
! Button btnResetSoftly = new Button("Reset softly");
! btnResetSoftly.setId(RESET_SOFTLY_BUTTON_ID);
btnResetSoftly.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
tb.refresh();
*** 174,197 ****
column2.setPercentWidth(60);
grid.getColumnConstraints().addAll(column1, column2);
//row #1
grid.add(new Label("Tab ID"), 0, 0);
! final TextField newTabId = TextFieldBuilder.create()
! .id(NEW_TAB_ID_TEXT_FIELD_ID)
! .text("ID")
! .prefWidth(40d)
! .build();
grid.add(newTabId, 1, 0);
//row #2
grid.add(new Label("Index"), 0, 1);
! final TextField newTabIndex = TextFieldBuilder.create()
! .id(TABPANE_ADD_INDEX_TEXT_FIELD_ID)
! .text("0")
! .prefWidth(40)
! .build();
grid.add(newTabIndex, 1, 1);
//row #3
grid.add(new Label("Content"), 0, 2);
final ChoiceBox<NodeFactory> cb = new ChoiceBox<NodeFactory>();
--- 177,196 ----
column2.setPercentWidth(60);
grid.getColumnConstraints().addAll(column1, column2);
//row #1
grid.add(new Label("Tab ID"), 0, 0);
! final TextField newTabId = new TextField("ID");
! newTabId.setPrefWidth(40d);
! newTabId.setId(NEW_TAB_ID_TEXT_FIELD_ID);
grid.add(newTabId, 1, 0);
//row #2
grid.add(new Label("Index"), 0, 1);
! final TextField newTabIndex = new TextField("0");
! newTabIndex.setId(TABPANE_ADD_INDEX_TEXT_FIELD_ID);
! newTabIndex.setPrefWidth(40);
grid.add(newTabIndex, 1, 1);
//row #3
grid.add(new Label("Content"), 0, 2);
final ChoiceBox<NodeFactory> cb = new ChoiceBox<NodeFactory>();
*** 204,229 ****
//row #4
/*
* If true then there will be created a properties pane
* for tab content each time a tab is added
*/
! final CheckBox createPropsTab = CheckBoxBuilder
! .create()
! .text("Create additional panes\n with content properties")
! .build();
grid.add(createPropsTab, 0, 3, 2, 1);
//row #5
/*
* If true then there will be created a properties pane
* for tab content each time a tab is added
*/
! final CheckBox vetoOnClose = CheckBoxBuilder
! .create()
! .text("Veto tab request on close.")
! .id(VETO_CHECKBOX_ID)
! .build();
grid.add(vetoOnClose, 0, 4, 2, 1);
//row #6
Button actionButton = new Button("Create new tab");
actionButton.setId(NODE_CHOOSER_ACTION_BUTTON_ID);
--- 203,222 ----
//row #4
/*
* If true then there will be created a properties pane
* for tab content each time a tab is added
*/
! final CheckBox createPropsTab = new CheckBox("Create additional panes\n with content properties");
grid.add(createPropsTab, 0, 3, 2, 1);
//row #5
/*
* If true then there will be created a properties pane
* for tab content each time a tab is added
*/
! final CheckBox vetoOnClose = new CheckBox("Veto tab request on close.");
! vetoOnClose.setId(VETO_CHECKBOX_ID);
grid.add(vetoOnClose, 0, 4, 2, 1);
//row #6
Button actionButton = new Button("Create new tab");
actionButton.setId(NODE_CHOOSER_ACTION_BUTTON_ID);
< prev index next >