ToolBar toolBar = new ToolBar();
ColorPicker colorTB = new ColorPicker(Color.rgb(194, 222, 254));
Separator seperateIt = new Separator();
ToggleGroup toolbarGroup = new ToggleGroup();
ToggleButton sampleButton4 = new ToggleButton("TG1");
sampleButton4.setToggleGroup(toolbarGroup);
sampleButton4.setSelected(true);
AquaFx.createToggleButtonStyler().setType(ButtonType.LEFT_PILL).style(sampleButton4);
ToggleButton sampleButton5 = new ToggleButton("TG2");
sampleButton5.setToggleGroup(toolbarGroup);
sampleButton5.setSelected(true);
AquaFx.createToggleButtonStyler().setType(ButtonType.CENTER_PILL).style(sampleButton5);
ToggleButton sampleButton6 = new ToggleButton("TG3");
sampleButton6.setToggleGroup(toolbarGroup);
sampleButton6.setSelected(true);
AquaFx.createToggleButtonStyler().setType(ButtonType.RIGHT_PILL).style(sampleButton6);
Separator seperateIt2 = new Separator();
Button menuPillButton1 = new Button("PB 1");
AquaFx.createButtonStyler().setType(ButtonType.LEFT_PILL).style(menuPillButton1);
Button menuPillButton2 = new Button("PB 2");
AquaFx.createButtonStyler().setType(ButtonType.CENTER_PILL).style(menuPillButton2);
Button menuPillButton3 = new Button("PB 3");
AquaFx.createButtonStyler().setType(ButtonType.RIGHT_PILL).style(menuPillButton3);
Button sampleButton = new Button("Button");
ToggleButton sampleButton1 = new ToggleButton("Toggle");
sampleButton1.setDisable(true);
ToggleButton sampleButton2 = new ToggleButton("Toggle");
ToggleButton sampleButton3 = new ToggleButton("Toggle2");
sampleButton3.setSelected(true);
toolBar.getItems().addAll(colorTB, sampleButton, sampleButton1, sampleButton2, sampleButton3, seperateIt, sampleButton4,
sampleButton5, sampleButton6, seperateIt2, menuPillButton1, menuPillButton2, menuPillButton3);
pane.setTop(toolBar);
/**
* TabPane
*/
TabPane buttonTabPane = new TabPane();
// Create Tabs
Tab tabD = new Tab();
tabD.setText("Buttons");
VBox buttonBox = new VBox();
buttonBox.setSpacing(10);
buttonBox.setPadding(new Insets(10));
Button b1 = new Button();
b1.setText("Default (push to enable Tab 'Progress')");
b1.setDefaultButton(true);
b1.setTooltip(new Tooltip("This is a ToolTip"));
b1.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent event) {
tabI.setDisable(false);
tabH.setDisable(false);
}
});
buttonBox.getChildren().add(b1);
Button b2 = new Button();
b2.setText("Default");
b2.setDisable(true);
b2.setDefaultButton(true);
buttonBox.getChildren().add(b2);
Button b3 = new Button();
b3.setText("Normal (push to disable Tab 'Progress')");
b3.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent event) {
tabH.setDisable(true);
}
});
buttonBox.getChildren().add(b3);
Button b4 = new Button();
b4.setText("Normal");
b4.setDisable(true);
buttonBox.getChildren().add(b4);
Button helpButton = new Button("?");
AquaFx.createButtonStyler().setType(ButtonType.HELP).style(helpButton);
buttonBox.getChildren().add(helpButton);
Hyperlink link = new Hyperlink("Hyperlink");
Hyperlink link2 = new Hyperlink("disabled Hyperlink");
link2.setDisable(true);
buttonBox.getChildren().add(link);
buttonBox.getChildren().add(link2);
ScrollBar scBar = new ScrollBar();
buttonBox.getChildren().add(scBar);
tabD.setContent(buttonBox);
buttonTabPane.getTabs().add(tabD);
Tab tabE = new Tab();
tabE.setText("RadioButtons");
VBox radioButtonBox = new VBox();
radioButtonBox.setSpacing(10);
radioButtonBox.setPadding(new Insets(10));
RadioButton raBu1 = new RadioButton("Normal");
radioButtonBox.getChildren().add(raBu1);
RadioButton raBu2 = new RadioButton("Normal");
raBu2.setDisable(true);
radioButtonBox.getChildren().add(raBu2);
RadioButton raBu3 = new RadioButton("Selected");
raBu3.setSelected(true);
radioButtonBox.getChildren().add(raBu3);
RadioButton raBu4 = new RadioButton("Selected");
raBu4.setDisable(true);
raBu4.setSelected(true);
radioButtonBox.getChildren().add(raBu4);
tabE.setContent(radioButtonBox);
buttonTabPane.getTabs().add(tabE);
Tab tabF = new Tab();
tabF.setText("CheckBoxes");
VBox checkBoxBox = new VBox();
checkBoxBox.setSpacing(10);
checkBoxBox.setPadding(new Insets(10));
CheckBox box1 = new CheckBox("Normal");
checkBoxBox.getChildren().add(box1);
CheckBox box2 = new CheckBox("Normal");
box2.setDisable(true);
checkBoxBox.getChildren().add(box2);
CheckBox box3 = new CheckBox("Selected");
box3.setSelected(true);
checkBoxBox.getChildren().add(box3);
CheckBox box4 = new CheckBox("Selected");
box4.setSelected(true);
box4.setDisable(true);
checkBoxBox.getChildren().add(box4);
CheckBox box5 = new CheckBox("Indeterminate");
box5.setIndeterminate(true);
checkBoxBox.getChildren().add(box5);
CheckBox box6 = new CheckBox("Indeterminate");
box6.setIndeterminate(true);
box6.setDisable(true);
checkBoxBox.getChildren().add(box6);
tabF.setContent(checkBoxBox);
buttonTabPane.getTabs().add(tabF);
Tab tabG = new Tab();
tabG.setText("Toggles & Pills");
VBox togglesBox = new VBox();
togglesBox.setSpacing(10);
togglesBox.setPadding(new Insets(10));
HBox toggleGroupBox = new HBox();
ToggleGroup group = new ToggleGroup();
ToggleButton tb1 = new ToggleButton("First");
tb1.setToggleGroup(group);
tb1.setSelected(true);
AquaFx.createToggleButtonStyler().setType(ButtonType.LEFT_PILL).style(tb1);
toggleGroupBox.getChildren().add(tb1);
ToggleButton tb2 = new ToggleButton("Second");
tb2.setToggleGroup(group);
AquaFx.createToggleButtonStyler().setType(ButtonType.CENTER_PILL).style(tb2);
toggleGroupBox.getChildren().add(tb2);
ToggleButton tb3 = new ToggleButton("Third");
tb3.setToggleGroup(group);
AquaFx.createToggleButtonStyler().setType(ButtonType.RIGHT_PILL).style(tb3);
toggleGroupBox.getChildren().add(tb3);
togglesBox.getChildren().add(toggleGroupBox);
ToggleButton tb4 = new ToggleButton("Alone");
tb4.setSelected(true);
togglesBox.getChildren().add(tb4);
HBox pillButtonBox = new HBox();
Button pb1 = new Button();
pb1.setText("Button 1");
pb1.setTooltip(new Tooltip("This is a ToolTip"));