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); }
final ScrollPane scrollPane = new ScrollPane(); scrollPane.setContent(contentContainer); scrollPane.setFitToWidth(true); scrollPane.vvalueProperty().addListener((o, oldVal, newVal) -> { if (minHeight == -1) { minHeight = bottomBar.getBoundsInParent().getMinY(); scale.setY(map(opacity, 0, 1, 1, 0.75)); }); scrollPane.setPannable(true); getChildren().setAll(scrollPane, header);
DashboardItemPane(DashboardItem item) { requireNotNull(item, "Dashboard item cannot be null"); this.item = item; this.item.pane().getStyleClass().addAll(Style.DEAULT_CONTAINER.css()); this.item.pane().getStyleClass().addAll(Style.CONTAINER.css()); ScrollPane scroll = new ScrollPane(this.item.pane()); scroll.getStyleClass().addAll(Style.DEAULT_CONTAINER.css()); scroll.setFitToWidth(true); scroll.setHbarPolicy(ScrollBarPolicy.NEVER); scroll.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); setCenter(scroll); eventStudio().add(SetActiveModuleRequest.class, enableFooterListener, Integer.MAX_VALUE, ReferenceStrength.STRONG); }
private void showLicensePopup() { Alert licenseAlert = new Alert(AlertType.INFORMATION); licenseAlert.setWidth(500); licenseAlert.setHeaderText("License"); ScrollPane scroll = new ScrollPane(); try { scroll.setContent(new TextArea(IOUtils.toString(getClass().getResourceAsStream("LICENSE"), StandardCharsets.UTF_8))); } catch (IOException e) { e.printStackTrace(); } licenseAlert.getDialogPane().setContent(scroll); licenseAlert.showAndWait(); }
private ScrollPane allGlyphs() { List<SVGGlyph> glyphs = SVGGlyphLoader.getAllGlyphsIDs() .stream() .map(glyphName -> { try { return SVGGlyphLoader.getIcoMoonGlyph(glyphName); } catch (Exception e) { return null; } }) .collect(Collectors.toList()); glyphs.sort(Comparator.comparing(SVGGlyph::getName)); glyphs.forEach(glyph -> glyph.setSize(16)); List<Button> iconButtons = glyphs.stream().map(this::createIconButton).collect(Collectors.toList()); // important to improve the performance of animation in scroll pane so buttons are treated as images iconButtons.forEach(button -> button.setCache(true)); Platform.runLater(()->iconButtons.get(0).fire()); FlowPane glyphLayout = new FlowPane(); glyphLayout.setHgap(10); glyphLayout.setVgap(10); glyphLayout.setPadding(new Insets(10)); glyphLayout.getChildren().setAll(iconButtons); glyphLayout.setPrefSize(600, 300); ScrollPane scrollableGlyphs = new ScrollPane(glyphLayout); scrollableGlyphs.setFitToWidth(true); return scrollableGlyphs; }
/** * 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; }
@Override protected void drawStepContent() { Text textWidget = new Text(textToShow); textWidget.setId("stepText"); ScrollPane scrollPane = new ScrollPane(); scrollPane.setId("stepScrollPane"); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPane.setFitToWidth(true); scrollPane.setContent(new TextFlow(textWidget)); this.addToContentPane(scrollPane); VBox.setVgrow(scrollPane, Priority.ALWAYS); }
/** * @{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); } }
/** * 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.); } }
/** * @{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"); }
@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); } }); }
public NoticeBoard() { setManaged(false); String cssFileName = NoticeBoard.class.getSimpleName()+".css"; URL resource = NoticeBoard.class.getResource(cssFileName); getStylesheets().add(resource.toExternalForm()); getStyleClass().add("noticeBoardText"); ScrollPane scrollPane = new ScrollPane(); scrollPane.setLayoutX(20); scrollPane.setLayoutY(11); scrollPane.setMaxWidth(DEFAULT_WIDTH); scrollPane.setMinWidth(216); scrollPane.setMaxHeight(216); scrollPane.setMinHeight(216); scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); nbScrollPane = new NoticeBoardScrollPaneContent(); scrollPane.setContent(nbScrollPane); getChildren().addAll(scrollPane); }
ScrollPane scrollPaneBreadCrumbBar = new ScrollPane(); scrollPaneBreadCrumbBar.setContent(breadCrumbBar); scrollPaneBreadCrumbBar.setHvalue(1.0); scrollPaneBreadCrumbBar.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPaneBreadCrumbBar.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPaneBreadCrumbBar.getStyleClass().add("transparent-scroll-pane"); scrollPaneBreadCrumbBar.hvalueProperty().addListener((observable, oldValue, newValue) -> { if (newValue!=null && newValue.doubleValue()<1.0){ scrollPaneBreadCrumbBar.setHvalue(1);
@Override public void start(Stage primaryStage) throws Exception { FlowPane iconsPane = new FlowPane(3, 3); for (WeatherIcon icon : WeatherIcon.values()) { iconsPane.getChildren().add(new WeatherIconView(icon, "3em")); } Scene scene = new Scene(new ScrollPane(iconsPane), 500, 500); primaryStage.setScene(scene); primaryStage.setTitle("FontAwesomeFX: WeatherIcons Demo"); primaryStage.show(); }
add(new Label(RESOURCE_BUNDLE.getString("Parameters")), 0, 1, 1, 1); add(new Separator(), 1, 1, 2, 1); ScrollPane scrollPane = new ScrollPane(); scrollPane.setContent(parametersBox); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED); parametersBox.setPrefHeight(250); parametersBox.setPadding(new Insets(5, 5, 5, 5));
final ScrollPane scrollPane = new ScrollPane(); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); // the TilePane adjusts the number of columns verbsContentPane.prefWidthProperty().bind(scrollPane.widthProperty()); verbsContentPane.prefHeightProperty().bind(scrollPane.heightProperty()); scrollPane.setBackground(verbsContentPane.getBackground()); scrollPane.setContent(verbsPane);
/** * @{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"); }
@EventListener public void onSetActiveModule(SetActiveModuleRequest request) { request.getActiveModuleId().ifPresent(id -> { Module requested = modules.get(id); if (requested != null) { current = Optional.of(requested); center.setContent(requested.modulePanel()); fade.play(); } }); eventStudio().broadcast(new SetTitleEvent(current.map(m -> m.descriptor().getName()).orElse(""))); } }
/** * {@inheritDoc} */ @Override public void initialise() { final ScrollPane scrollPane = new ScrollPane(); scrollPane.getStyleClass().add("iconListWidget"); scrollPane.setCache(true); scrollPane.setCacheHint(CacheHint.QUALITY); scrollPane.setContent(createContent(scrollPane)); getChildren().addAll(scrollPane); }
/** * {@inheritDoc} */ @Override public void initialise() { final Text title = new Text(tr("Engine tools")); title.getStyleClass().add("title"); final FlowPane toolButtonContainer = createToolButtonContainer(); final VBox toolsPane = new VBox(title, toolButtonContainer); toolsPane.getStyleClass().addAll("containerConfigurationPane"); final ScrollPane scrollPane = new ScrollPane(toolsPane); scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); scrollPane.setFitToWidth(true); getChildren().addAll(scrollPane); }