if (verticalRightButton){
VBox vbox = new VBox();
vbox.setAlignment(Pos.TOP_LEFT);
vbox.setSpacing(3);
Region spacer = new Region();
VBox.setMargin(spacer, new Insets(1.5));
vbox.getChildren().add(spacer);
buttonsPane=vbox;
} else {
HBox hbox = new HBox();
hbox.setAlignment(Pos.CENTER);
hbox.setSpacing(3);
buttonsPane=hbox;
}
Orientation orientation = verticalRightButton?Orientation.HORIZONTAL:Orientation.VERTICAL;
buttonsPane.getChildren().addAll(resultForm.getController().getContributedButtons(messageProvider));
buttonsPane.getChildren().add(new Separator(orientation));
MenuButton defaultFilterButton = new MenuButton("",new ImageView(new Image(getClass().getResourceAsStream("/de/scoopgmbh/copper/gui/icon/filter.png"))));
defaultFilterButton.setPrefWidth(20);
CustomMenuItem defaultFilterContent = new CustomMenuItem();
defaultFilterContent.setHideOnClick(false);
defaultFilterButton.getItems().add(defaultFilterContent);
defaultFilterContent.getStyleClass().setAll("noSelectAnimationMenueItem","menu-item");
buttonsPane.getChildren().add(defaultFilterButton);
if (filterForm.getController().createDefaultFilter()!=null){
defaultFilterContent.setContent(filterForm.getController().createDefaultFilter());
} else {
defaultFilterButton.setDisable(true);
}
buttonsPane.getChildren().add(new Separator(orientation));
final Button clearButton = new Button("",new ImageView(new Image(getClass().getResourceAsStream("/de/scoopgmbh/copper/gui/icon/clear.png"))));
clearButton.setTooltip(new Tooltip(messageProvider.getText(MessageKey.filterAbleForm_button_clear)));
clearButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
resultForm.getController().clear();
}
});
if(resultForm.getController().supportsClear()) {
buttonsPane.getChildren().add(clearButton);
}
final Button refreshButton = new Button("",new ImageView(new Image(getClass().getResourceAsStream("/de/scoopgmbh/copper/gui/icon/refresh.png"))));
refreshButton.setId(REFRESH_BUTTON_ID);
HBox.setMargin(refreshButton, new Insets(4,0,4,0));
refreshButton.setTooltip(new Tooltip(messageProvider.getText(MessageKey.filterAbleForm_button_refresh)));
refreshButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
refresh();