KeywordsTab() { VBox content = new VBox(); content.getStyleClass().add("info-props"); setText(DefaultI18nContext.getInstance().i18n("Keywords")); setClosable(false); keywords.setWrapText(true); keywords.getStyleClass().add("info-property-value"); content.getChildren().add(keywords); ScrollPane scroll = new ScrollPane(content); scroll.setFitToHeight(true); scroll.setFitToWidth(true); setContent(scroll); eventStudio().addAnnotatedListeners(this); }
@Inject public WorkArea(List<Module> modules, QuickbarModuleButtonsPane modulesButtons) { getStyleClass().addAll(Style.CONTAINER.css()); setId("work-area"); for (Module module : modules) { this.modules.put(module.id(), module); } fade.setFromValue(0); fade.setToValue(1); center.setHbarPolicy(ScrollBarPolicy.NEVER); center.setFitToWidth(true); center.setFitToHeight(true); setCenter(center); setLeft(new QuickbarPane(modulesButtons)); eventStudio().addAnnotatedListeners(this); }
BaseInfoTab() { setClosable(false); grid.getStyleClass().add("info-props"); grid.setAlignment(Pos.TOP_CENTER); ColumnConstraints column1 = new ColumnConstraints(); column1.setPercentWidth(25); ColumnConstraints column2 = new ColumnConstraints(); column2.setPercentWidth(75); grid.getColumnConstraints().addAll(column1, column2); ScrollPane scroll = new ScrollPane(grid); scroll.setFitToHeight(true); scroll.setFitToWidth(true); setContent(scroll); }
public NewsPanel() { getStyleClass().add("news-panel"); getStyleClass().addAll(Style.CONTAINER.css()); Button closeButton = FontAwesomeIconFactory.get().createIconButton(FontAwesomeIcon.TIMES); closeButton.getStyleClass().addAll("close-button"); closeButton.setOnAction(e -> eventStudio().broadcast(HideNewsPanelRequest.INSTANCE)); Label titleLabel = new Label(DefaultI18nContext.getInstance().i18n("What's new")); titleLabel.setPrefWidth(Integer.MAX_VALUE); titleLabel.getStyleClass().add("news-panel-title"); StackPane top = new StackPane(titleLabel, closeButton); top.setAlignment(Pos.TOP_RIGHT); scroll.getStyleClass().add("scrollable-news"); scroll.setHbarPolicy(ScrollBarPolicy.NEVER); scroll.setFitToHeight(true); scroll.setFitToWidth(true); getChildren().addAll(top, scroll); eventStudio().addAnnotatedListeners(this); }
/** * Default Constructor */ public Content() { getChildren().add(scroll); scroll.setFitToHeight(true); scroll.setFitToWidth(true); }
@Override public void start(Stage stage) { TableView<ObservableList<String>> table = new TableView<ObservableList<String>>(); table.setMinWidth(400); ScrollPane sp = new ScrollPane(table); sp.setFitToHeight(true); sp.setFitToWidth(true); stage.setScene(new Scene(table, 800, 600)); stage.show(); } public static void main(String[] args) { launch(); }
/** * @{inheritedDoc} */ @Override public void displayAll() { if (scroll) { scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(content); getChildren().add(scrollPane); } else { getChildren().add(content); NodeHelper.setHVGrow(content); } }
/** * @{inheritedDoc} */ @Override public void setRootConfig(VLViewComponentXML fieldsetListConfig) { boolean scroll = fieldsetListConfig.getBooleanProperty("scroll", true); if (scroll) { fieldsetBottomLayoutCenter.getChildren().add(scrollPane); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(contentLayout); } else { NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "styleClass", "fieldset-group-selector-top-tabed-content"); fieldsetBottomLayoutCenter.getChildren().add(contentLayout); } }
/** * Constructor */ public NotifsPane() { setAlignment(Pos.TOP_CENTER); notifsContainer.getStyleClass().add("notifications-pane"); NodeHelper.setVgrow(notifsContainer); // getChildren().addAll(notifsContainer, notifsFilter); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); getChildren().addAll(scrollPane); scrollPane.setContent(notifsContainer); }
/** * @{inheritedDoc} */ @Override public void setRootConfig(VLViewComponentXML fieldsetListConfig) { this.fieldsetConfiguration = fieldsetListConfig; boolean scroll = fieldsetListConfig.getBooleanProperty("scroll", true); if (scroll) { fieldsetTopLayoutCenter.getChildren().add(scrollPane); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(contentLayout); scrollPane.setVbarPolicy(ScrollBarPolicy.NEVER); NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentStyleClass", "fieldset-group-selector-top-tabed-content"); } else { NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentStyleClass", "fieldset-group-selector-top-tabed-content"); fieldsetTopLayoutCenter.getChildren().add(contentLayout); } NodeHelper.styleClassAddAll(header, fieldsetConfiguration, "headerStyleClass", "fieldset-group-selector-top-tabed-header"); }
/** * {@inheritDoc} */ @Override protected void initView() { node().setFitToWidth(true); node().setFitToHeight(true); final FlowPane pane = new FlowPane(Orientation.HORIZONTAL); pane.setPadding(new Insets(10)); pane.setHgap(4.0); pane.setVgap(4.0); pane.setAlignment(Pos.CENTER); pane.maxWidthProperty().bind(((Region) node().getParent()).widthProperty()); final Class<? extends IconFont> c = model().object(); Stream.of(c.getEnumConstants()).filter(c::isInstance).map(c::cast).forEach(iconFont -> pane.getChildren().add(buildTile(iconFont))); // pane.setStyle("-fx-background-color:blue;"); node().setContent(pane); }
/** * Wrap a node into a scrollpane, this scrollpane is attended to be in the center of the view. Because a padding of 32 is set in the right side of the scrollpane. * * @param node * @return */ public static ScrollPane makeCentralScrollable(Node node) { final ScrollPane scrollPane = new ScrollPane(); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollPane.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollPane.setContent(node); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setFocusTraversable(false); scrollPane.setStyle("-fx-background-color: transparent;" + "-fx-padding:0 ;" + "-fx-border-color:transparent;"); return scrollPane; }
/** * @{inheritedDoc} */ @Override public void setRootConfig(VLViewComponentXML fieldsetListConfig) { this.fieldsetConfiguration = fieldsetListConfig; boolean scroll = fieldsetListConfig.getBooleanProperty("scroll", true); if (scroll) { fieldsetTopLayoutCenter.getChildren().add(scrollPane); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(contentLayout); scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); NodeHelper.styleClassAddAll(scrollPane, fieldsetListConfig, "contentStyleClass", "fieldset-group-selector-top-tabed-content"); NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentLayoutStyleClass"); } else { NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentLayoutStyleClass", "fieldset-group-selector-top-tabed-content"); fieldsetTopLayoutCenter.getChildren().add(contentLayout); } NodeHelper.styleClassAddAll(header, fieldsetConfiguration, "headerStyleClass", "fieldset-group-selector-top-tabed-header"); }
/** * Wrap a node into a scrollpane * * @param node * @return */ public static ScrollPane makeScrollable(Node node) { final ScrollPane scrollPane = new ScrollPane(); final StackPane stackPane = new StackPane(); stackPane.getChildren().add(node); final Group scrollPaneContent = new Group(stackPane); scrollPaneContent.setAutoSizeChildren(true); scrollPane.setContent(scrollPaneContent); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollPane.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollPane.setFitToHeight(false); scrollPane.setFitToWidth(true); scrollPane.setFocusTraversable(false); scrollPane.setStyle("-fx-background-color:white;-fx-padding:0 0 0 0;" + "-fx-border-color:transparent;"); return scrollPane; }
public FeatureOutlinePanel(AppSession session) { this.session = session; this.units = session.getScenarioExecutionUnits(); setPadding(App.PADDING_HOR); scrollPane = new ScrollPane(); scrollPane.setFitToWidth(true); scrollPane.setFitToHeight(true); VBox header = new VBox(App.PADDING); header.setPadding(App.PADDING_VER); setTop(header); Feature feature = session.getFeatureExecutionUnit().exec.featureContext.feature; Path path = feature.getPath(); Label featureLabel = new Label(path == null ? "" : path.getFileName().toString()); header.getChildren().add(featureLabel); HBox hbox = new HBox(App.PADDING); header.getChildren().add(hbox); Button resetButton = new Button("Reset"); resetButton.setOnAction(e -> session.resetAll()); Button runAllButton = new Button("Run All Scenarios"); hbox.getChildren().add(resetButton); hbox.getChildren().add(runAllButton); setCenter(scrollPane); refresh(); Platform.runLater(() -> { listView.getSelectionModel().select(0); listView.requestFocus(); }); runAllButton.setOnAction(e -> Platform.runLater(() -> session.runAll())); }
@FXML private ImageView image; @FXML private Button back; @FXML private AnchorPane Instructions; @FXML private ScrollPane sp; private void setScrollPane() { sp.setContent(image); sp.setHbarPolicy(ScrollBarPolicy.NEVER); sp.setVbarPolicy(ScrollBarPolicy.ALWAYS); sp.setFitToWidth(true); sp.setFitToHeight(true); sp.vvalueProperty().addListener((ObservableValue<? extends Number> ov, Number old_val, Number new_val) -> { if (new_val.doubleValue() >= sp.getVmax()) { back.setVisible(true); } if (new_val.doubleValue() < sp.getVmax()) { back.setVisible(false); } }); }
/** * Builds the content */ private void buildContent() { String contentImpl = configuration.getPropertyValue(CONTENT_IMPL); if (StringUtils.isEmpty(contentImpl)) { contentImpl = WIZARD_STEP_CONTENT; } stepContent = (IWizardStepContent) Services.getBean(contentImpl); stepContent.buildFrom(controller, configuration); Node setCenter = stepContent.getDisplay(); ScrollPane pane = new ScrollPane(); pane.setContent(setCenter); pane.setFitToHeight(true); pane.setFitToWidth(true); pane.setVbarPolicy(ScrollBarPolicy.NEVER); pane.setHbarPolicy(ScrollBarPolicy.NEVER); getChildren().add(pane); AnchorPane.setBottomAnchor(pane, 100.); AnchorPane.setLeftAnchor(pane, 0.); AnchorPane.setRightAnchor(pane, 0.); boolean displayHeader = configuration.booleanPropertyValueOf("displayHeader").orElse(true); if(displayHeader) { AnchorPane.setTopAnchor(pane, 120.); } else { AnchorPane.setTopAnchor(pane, 0.); } }
scrollPane.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE); scrollPane.setFitToWidth(true); scrollPane.setFitToHeight(true); scrollPane.setStyle("-fx-focus-color: transparent;");
scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(content);
scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true);