private ToolBarPanel createToolBar() { ToolBarPanel toolBarPanel = new ToolBarPanel(net.sourceforge.marathon.fxdocking.ToolBarContainer.Orientation.RIGHT); VLToolBar vlToolBar = new VLToolBar(); vlToolBar.add(nextFailureAction.getButton()); vlToolBar.add(prevFailureAction.getButton()); failuresToggleButton = failuresAction.getToggleButton(); vlToolBar.add(failuresToggleButton); historyRunButton.setGraphic(runAction.getButton().getGraphic()); historyRunButton.setOnAction(runAction.getButton().getOnAction()); historyRunButton.showingProperty().addListener((obs, wasShowing, isNowShowing) -> { if (isNowShowing) { populateMenuItems(); } }); vlToolBar.add(historyRunButton); vlToolBar.add(stopAction.getButton()); vlToolBar.add(runSelected.getButton()); vlToolBar.add(reportAction.getButton()); toolBarPanel.add(vlToolBar); return toolBarPanel; }
private SplitPane createChartPane() { CategoryDataset3D dataset = SampleData.createCompanyRevenueDataset(); Chart3D chart = AreaChart3DFXDemo1.createChart(dataset); Chart3DViewer viewer = new Chart3DViewer(chart); this.splitter = new SplitPane(); splitter.setOrientation(Orientation.VERTICAL); final BorderPane borderPane = new BorderPane(); borderPane.setCenter(viewer); // Bind canvas size to stack pane size. viewer.prefWidthProperty().bind(borderPane.widthProperty()); viewer.prefHeightProperty().bind(borderPane.heightProperty()); final StackPane sp2 = new StackPane(); this.chartDescription = new WebView(); WebEngine webEngine = chartDescription.getEngine(); webEngine.load(AreaChart3DFXDemo1.class.getResource("AreaChart3DFXDemo1.html").toString()); sp2.getChildren().add(chartDescription); splitter.getItems().addAll(borderPane, sp2); splitter.setDividerPositions(0.70f, 0.30f); return splitter; }
@Override protected Node createControl() { RecurrenceView view = new RecurrenceView(); Label label = new Label("Rule: " + view.getRecurrenceRule()); label.setMaxWidth(300); label.setWrapText(true); view.recurrenceRuleProperty().addListener(it -> label.setText(view.getRecurrenceRule())); Separator separator = new Separator(Orientation.HORIZONTAL); VBox box = new VBox(20); box.setFillWidth(true); box.getChildren().addAll(view, separator, label); box.setAlignment(Pos.CENTER); return box; }
/** @inheritDoc */ @Override protected void dataItemChanged(Data<X, Y> item) { double barVal; double currentVal; if (orientation == Orientation.VERTICAL) { barVal = ((Number) item.getYValue()).doubleValue(); currentVal = ((Number) item.getCurrentY()).doubleValue(); } else { barVal = ((Number) item.getXValue()).doubleValue(); currentVal = ((Number) item.getCurrentX()).doubleValue(); } if (currentVal > 0 && barVal < 0) { // going from positive to negative // add style class negative item.getNode().getStyleClass().add(NEGATIVE_STYLE); } else if (currentVal < 0 && barVal > 0) { // going from negative to positive // remove style class negative // RT-21164 upside down bars: was adding NEGATIVE_STYLE styleclass // instead of removing it; when going from negative to positive item.getNode().getStyleClass().remove(NEGATIVE_STYLE); } }
public Son(Clavier clavier) { this.clavier = clavier; slider = new Slider(0, 127, 60); slider.setOrientation(Orientation.VERTICAL); slider.setTranslateY(35); slider.valueProperty().addListener(new ChangeListener() { @Override public void changed(ObservableValue o, Object oldVal, Object newVal) { clavier.requestFocus(); } }); ProgressIndicator indicateur = new ProgressIndicator(0.0); indicateur.progressProperty().bind(slider.valueProperty().divide(127.0)); indicateur.setTranslateX(-15); this.getChildren().add(slider); this.getChildren().add(indicateur); this.setTranslateY(260); this.setTranslateX(60); }
private void addToolBar() { TextField textField = new TextField(); textField.getStyleClass().add("search-field"); textField.textProperty().bindBidirectional(getSkinnable().filterTextProperty()); Text clearIcon = FontAwesomeIconFactory.get().createIcon(FontAwesomeIcon.TIMES_CIRCLE, "18"); CustomTextField customTextField = new CustomTextField(); customTextField.getStyleClass().add("search-field"); customTextField.setLeft(FontAwesomeIconFactory.get().createIcon(FontAwesomeIcon.SEARCH, "18px")); customTextField.setRight(clearIcon); customTextField.textProperty().bindBidirectional(getSkinnable().filterTextProperty()); clearIcon.setOnMouseClicked(evt -> customTextField.setText("")); FlipPanel searchFlipPanel = new FlipPanel(); searchFlipPanel.setFlipDirection(Orientation.HORIZONTAL); searchFlipPanel.getFront().getChildren().add(textField); searchFlipPanel.getBack().getChildren().add(customTextField); searchFlipPanel.visibleProperty().bind(getSkinnable().enableSortingAndFilteringProperty()); getSkinnable().useControlsFXProperty().addListener(it -> { if (getSkinnable().isUseControlsFX()) { searchFlipPanel.flipToBack(); } else { searchFlipPanel.flipToFront(); } }); showTrailerButton = new Button("Show Trailer"); showTrailerButton.getStyleClass().add("trailer-button"); showTrailerButton.setMaxHeight(Double.MAX_VALUE); showTrailerButton.setOnAction(evt -> showTrailer()); BorderPane toolBar = new BorderPane(); toolBar.setLeft(showTrailerButton); toolBar.setRight(searchFlipPanel); toolBar.getStyleClass().add("movie-toolbar"); container.add(toolBar, 1, 0); }
public PrettyListView() { super(); skinProperty().addListener(it -> { // first bind, then add new scrollbars, otherwise the new bars will be found bindScrollBars(); getChildren().addAll(vBar, hBar); }); getStyleClass().add("pretty-list-view"); vBar.setManaged(false); vBar.setOrientation(Orientation.VERTICAL); vBar.getStyleClass().add("pretty-scroll-bar"); vBar.visibleProperty().bind(vBar.visibleAmountProperty().isNotEqualTo(0)); hBar.setManaged(false); hBar.setOrientation(Orientation.HORIZONTAL); hBar.getStyleClass().add("pretty-scroll-bar"); hBar.visibleProperty().bind(hBar.visibleAmountProperty().isNotEqualTo(0)); }
public FormDialog(Stage owner) { VBox root = new VBox(10); root.setPadding(new Insets(10)); root.getChildren().addAll( getContentPane(), new Separator(Orientation.HORIZONTAL), getButtonsPane() ); root.getStylesheets().add("css/style.css"); root.setMinWidth(200); root.setMinHeight(100); setScene(new Scene(root)); if (owner != null) { this.initModality(Modality.WINDOW_MODAL); this.initOwner(owner); } Icons.Logo.setToStage(this); okButton.setOnAction(this::okButtonClicked); cancelButton.setOnAction(this::cancelButtonClicked); this.setOnCloseRequest(this::closeButtonClicked); }
private void buildForm(Stage primaryStage) { textAreaClassifiableText = new TextArea(); textAreaClassifiableText.setWrapText(true); btnClassify = new Button("Classify"); btnClassify.setOnAction(new ClassifyBtnPressEvent()); lblCharacteristics = new Label(""); root = new FlowPane(Orientation.VERTICAL, 10, 10); root.setAlignment(Pos.BASELINE_CENTER); root.getChildren().addAll(textAreaClassifiableText, btnClassify, lblCharacteristics); primaryStage.setScene(new Scene(root, 500, 300)); primaryStage.show(); }
@Override public void start(Stage primaryStage) throws Exception { Label left = new Label("foo"); TextField tf0 = new TextField(); HBox hBox = new HBox(left, tf0); Label right = new Label("bar"); ListView<String> listView = new ListView<>(); VBox vBox = new VBox(right, listView); TableView<String> tableView = new TableView<>(); SplitPane rightPane = new SplitPane(vBox, tableView); rightPane.setOrientation(Orientation.VERTICAL); SplitPane splitPane = new SplitPane(hBox, rightPane); Scene scene = new Scene(splitPane); primaryStage.setScene(scene); primaryStage.setOnCloseRequest(e -> { Platform.exit(); System.exit(0); }); primaryStage.show(); }
private void initBar() { length.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> t.length())); lines.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> StringUtil.countLine(t))); caretLine.textProperty().bind( map(getCodeAreaValue(c -> c.caretPositionProperty()), t -> StringUtil.countLine(area.getValue().getText().substring(0, t)))); caretColumn.textProperty().bind(map(getCodeAreaValue(c -> c.caretColumnProperty()), t -> t)); select.textProperty().bind(mapString(getCodeAreaValue(c -> c.selectedTextProperty()), t -> t.length() + " | " + StringUtil.countLine(t))); charset.textProperty().bind(mapString(Options.charset.property(), t -> t.toString())); inputType.textProperty().bind(Bindings.when(yep(overrideProperty)).then("Override").otherwise("Insert")); bar.getRightItems().addAll( margin(new Text("lines"), 0, 5), minWidth(lines, 60), margin(new Text("length"), 0, 5), minWidth(length, 70), new Separator(Orientation.VERTICAL), margin(new Text("Col"), 0, 5), minWidth(caretColumn, 60), margin(new Text("Line"), 0, 5), minWidth(caretLine, 60), new Separator(Orientation.VERTICAL), margin(new Text("Sel"), 0, 5), minWidth(select, 90), new Separator(Orientation.VERTICAL), minWidth(charset, 60), new Separator(Orientation.VERTICAL), minWidth(inputType, 60), new Separator(Orientation.VERTICAL) ); }
/** * <p> * Creates an editable EditorPane with the given code as initial source code text. * </p> * * @param code the string to initialize the {@link CodeArea} to * @param syntaxErrors the initial list of {@link SyntaxError}s. * @param showLineNumbers whether to show line numbers in the {@link CodeArea} */ public EditorPane(String code, ObservableList<SyntaxError> syntaxErrors, boolean showLineNumbers) { super(); this.syntaxErrors = syntaxErrors; ViewUtils.setupView(this); codeArea = new CodeArea(code); lineNumberFactory = LineNumberFactory.get(codeArea); if (showLineNumbers) { codeArea.setParagraphGraphicFactory(this::createLinePrefixForLine); } this.getItems().addAll(codeArea); this.setOrientation(Orientation.VERTICAL); this.setDividerPositions(0.8); }
private Node createExtractedVarsTextArea(VariableCollectionController controller, FreeVariableListValidator validator) { final TextArea textArea = new TextArea(); textArea.getStyleClass().addAll("model-text-area"); textArea.setEditable(false); FreeVariableList set = controller.getFreeVariableList(); updateText(textArea, set.getVariables()); set.getVariables().addListener((ListChangeListener<? super FreeVariable>) c -> updateText(textArea, set.getVariables())); final TextArea problemsArea = new TextArea(); problemsArea.getStyleClass().addAll("model-text-area"); textArea.setEditable(false); updateProblemsText(problemsArea, validator); validator.problemsProperty().addListener((Observable o) -> updateProblemsText(problemsArea, validator)); SplitPane splitPane = new SplitPane(textArea, problemsArea); splitPane.setOrientation(Orientation.VERTICAL); return splitPane; }
private FlowPane getCenterPane() { FlowPane timerLabelPane = new FlowPane(); timerLabelPane.getChildren().add(timerLabel); timerLabelPane.setVgap(10); timerLabelPane.setAlignment(Pos.CENTER); FlowPane taskLabelPane = new FlowPane(); taskLabelPane.getChildren().addAll(currentTaskLabel, selectedTaskLabel); taskLabelPane.setVgap(10); taskLabelPane.setAlignment(Pos.CENTER); FlowPane taskPane = new FlowPane(); taskPane.setHgap(10); taskPane.setVgap(10); taskPane.setAlignment(Pos.CENTER); taskPane.getChildren().add(setTaskButton); taskPane.getChildren().add(taskLabelPane); FlowPane centerPane = new FlowPane(); centerPane.setOrientation(Orientation.VERTICAL); centerPane.setVgap(10); centerPane.setAlignment(Pos.CENTER); centerPane.getChildren().add(timerLabelPane); centerPane.getChildren().add(taskPane); return centerPane; }
private ScrollBar getListViewScrollBar(ListView<?> listView) { ScrollBar scrollbar = null; for (Node node : listView.lookupAll(".scroll-bar")) { if (node instanceof ScrollBar) { ScrollBar bar = (ScrollBar) node; if (bar.getOrientation().equals(Orientation.VERTICAL)) { scrollbar = bar; } } } return scrollbar; }
private Axis createRightYAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) { Axis axis = new Axis(Orientation.VERTICAL, Position.RIGHT); axis.setMinValue(MIN); axis.setMaxValue(MAX); axis.setPrefWidth(AXIS_WIDTH); axis.setAutoScale(AUTO_SCALE); AnchorPane.setRightAnchor(axis, 0d); AnchorPane.setTopAnchor(axis, 0d); AnchorPane.setBottomAnchor(axis, 25d); return axis; }
private void initialize() { thumb = new StackPane(); thumb.getStyleClass().setAll("thumb"); track = new StackPane(); track.getStyleClass().setAll("track"); fill = new StackPane(); fill.getStyleClass().setAll("fill"); // horizontal = getSkinnable().isVertical(); getChildren().clear(); getChildren().addAll(track, fill, thumb); setShowTickMarks(getSkinnable().isShowTickMarks(), getSkinnable().isShowTickLabels()); track.setOnMousePressed(me -> mousePressedOnTrack(me)); track.setOnMouseDragged(me -> mouseDraggedOnTrack(me)); fill.setOnMousePressed(me -> mousePressedOnTrack(me)); fill.setOnMouseDragged(me -> mouseDraggedOnTrack(me)); thumb.setOnMousePressed(me -> { getBehavior().thumbPressed(me, 0.0f); dragStart = thumb.localToParent(me.getX(), me.getY()); preDragThumbPos = (getSkinnable().getValue() - getSkinnable().getMin()) / (getSkinnable().getMax() - getSkinnable().getMin()); }); thumb.setOnMouseReleased(me -> getBehavior().thumbReleased(me)); thumb.setOnMouseDragged(me -> { Point2D cur = thumb.localToParent(me.getX(), me.getY()); double dragPos = (getSkinnable().getOrientation() == Orientation.HORIZONTAL) ? cur.getX() - dragStart.getX() : -(cur.getY() - dragStart.getY()); getBehavior().thumbDragged(me, preDragThumbPos + dragPos / trackLength); }); }
private void mousePressedOnTrack(MouseEvent mouseEvent) { if (!thumb.isPressed()) { if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) { getBehavior().trackPress(mouseEvent, (mouseEvent.getX() / trackLength)); } else { getBehavior().trackPress(mouseEvent, (mouseEvent.getY() / trackLength)); } } }
private Axis createLeftYAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) { Axis axis = new Axis(MIN, MAX, Orientation.VERTICAL, AxisType.LOGARITHMIC, Position.LEFT); axis.setPrefWidth(AXIS_WIDTH); axis.setAutoScale(AUTO_SCALE); AnchorPane.setTopAnchor(axis, 0d); AnchorPane.setBottomAnchor(axis, 25d); AnchorPane.setLeftAnchor(axis, 0d); return axis; }
/** * Called when ever either min, max or value changes, so thumb's layoutX, Y is recomputed. */ void positionThumb(final boolean animate) { Slider s = getSkinnable(); if (s.getValue() > s.getMax()) return;// this can happen if we are bound to something boolean horizontal = s.getOrientation() == Orientation.HORIZONTAL; final double endX = (horizontal) ? trackStart + (((trackLength * ((s.getValue() - s.getMin()) / (s.getMax() - s.getMin()))) - thumbWidth / 2)) : thumbLeft; final double endY = (horizontal) ? thumbTop : snappedTopInset() + trackLength - (trackLength * ((s.getValue() - s.getMin()) / (s.getMax() - s.getMin()))); // - thumbHeight/2 if (animate) { // lets animate the thumb transition final double startX = thumb.getLayoutX(); final double startY = thumb.getLayoutY(); Transition transition = new Transition() { { setCycleDuration(Duration.millis(200)); } @Override protected void interpolate(double frac) { if (!Double.isNaN(startX)) { thumb.setLayoutX(startX + frac * (endX - startX)); } if (!Double.isNaN(startY)) { thumb.setLayoutY(startY + frac * (endY - startY)); } } }; transition.play(); } else { thumb.setLayoutX(endX); thumb.setLayoutY(endY); } }
private Axis createTopXAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) { Axis axis = new Axis(Orientation.HORIZONTAL, Position.TOP); axis.setMinValue(MIN); axis.setMaxValue(MAX); axis.setPrefHeight(AXIS_WIDTH); axis.setAutoScale(AUTO_SCALE); AnchorPane.setTopAnchor(axis, 25d); AnchorPane.setLeftAnchor(axis, 25d); AnchorPane.setRightAnchor(axis, 25d); return axis; }
private Axis createBottomXAxis(final double MIN, final double MAX, final boolean AUTO_SCALE, final double AXIS_WIDTH) { Axis axis = new Axis(Orientation.HORIZONTAL, Position.BOTTOM); axis.setMinValue(MIN); axis.setMaxValue(MAX); axis.setPrefHeight(AXIS_WIDTH); axis.setAutoScale(AUTO_SCALE); AnchorPane.setBottomAnchor(axis, 0d); AnchorPane.setLeftAnchor(axis, AXIS_WIDTH); AnchorPane.setRightAnchor(axis, AXIS_WIDTH); return axis; }
@Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { final Slider s = getSkinnable(); if (s.getOrientation() == Orientation.HORIZONTAL) { if (showTickMarks) { return Math.max(140, tickLine.prefWidth(-1)); } else { return 140; } } else { return leftInset + Math.max(thumb.prefWidth(-1), track.prefWidth(-1)) + ((showTickMarks) ? (trackToTickGap + tickLine.prefWidth(-1)) : 0) + rightInset; } }
@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { final Slider s = getSkinnable(); if (s.getOrientation() == Orientation.HORIZONTAL) { return topInset + Math.max(thumb.prefHeight(-1), track.prefHeight(-1)) + ((showTickMarks) ? (trackToTickGap + tickLine.prefHeight(-1)) : 0) + bottomInset; } else { if (showTickMarks) { return Math.max(140, tickLine.prefHeight(-1)); } else { return 140; } } }
@Override protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) { return Double.MAX_VALUE; } else { return getSkinnable().prefWidth(-1); } }
@Override protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) { return getSkinnable().prefHeight(width); } else { return Double.MAX_VALUE; } }
public HorizontalListViewSample() { ListView horizontalListView = new ListView(); horizontalListView.setOrientation(Orientation.HORIZONTAL); horizontalListView.setItems(FXCollections.observableArrayList( "Row 1", "Row 2", "Long Row 3", "Row 4", "Row 5", "Row 6", "Row 7", "Row 8", "Row 9", "Row 10", "Row 11", "Row 12", "Row 13", "Row 14", "Row 15", "Row 16", "Row 17", "Row 18", "Row 19", "Row 20" )); getChildren().add(horizontalListView); }
private void initComponents() { mainSplitPane.setDividerPositions(0.35); mainSplitPane.getItems().addAll(createTree(), functionSplitPane); expandAllBtn.setOnAction((e) -> expandAll()); collapseAllBtn.setOnAction((e) -> collapseAll()); refreshButton.setOnAction((e) -> refresh()); topButtonBar.setId("topButtonBar"); topButtonBar.setButtonMinWidth(Region.USE_PREF_SIZE); topButtonBar.getButtons().addAll(expandAllBtn, collapseAllBtn, refreshButton); functionSplitPane.setDividerPositions(0.4); functionSplitPane.setOrientation(Orientation.VERTICAL); documentArea = functionInfo.getEditorProvider().get(false, 0, IEditorProvider.EditorType.OTHER, false); Platform.runLater(() -> { documentArea.setEditable(false); documentArea.setMode("ruby"); }); argumentPane = new VBox(); ScrollPane scrollPane = new ScrollPane(argumentPane); scrollPane.setHbarPolicy(ScrollBarPolicy.AS_NEEDED); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); functionSplitPane.getItems().addAll(documentArea.getNode(), scrollPane); okButton.setOnAction(new OkHandler()); okButton.setDisable(true); cancelButton.setOnAction((e) -> dispose()); buttonBar.getButtons().addAll(okButton, cancelButton); buttonBar.setButtonMinWidth(Region.USE_PREF_SIZE); }
private Axis createBottomXAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) { Axis axis = new Axis(Orientation.HORIZONTAL, Position.BOTTOM); axis.setMinValue(MIN); axis.setMaxValue(MAX); axis.setPrefHeight(AXIS_WIDTH); axis.setAutoScale(AUTO_SCALE); AnchorPane.setBottomAnchor(axis, 0d); AnchorPane.setLeftAnchor(axis, 25d); AnchorPane.setRightAnchor(axis, 25d); return axis; }
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 180, 180); scene.setFill(Color.BLACK); stage.setScene(scene); stage.setTitle("Scrollbar"); root.getChildren().addAll(vb, sc); shadow.setColor(Color.GREY); shadow.setOffsetX(2); shadow.setOffsetY(2); vb.setLayoutX(5); vb.setSpacing(10); sc.setLayoutX(scene.getWidth()-sc.getWidth()); sc.setMin(0); sc.setOrientation(Orientation.VERTICAL); sc.setPrefHeight(180); sc.setMax(360); for (int i = 0; i < 5; i++) { final Image image = images[i] = new Image(getClass().getResourceAsStream("fw" +(i+1)+ ".jpg")); final ImageView pic = pics[i] = new ImageView(images[i]); pic.setEffect(shadow); vb.getChildren().add(pics[i]); } sc.valueProperty().addListener((ObservableValue<? extends Number> ov, Number old_val, Number new_val) -> { vb.setLayoutY(-new_val.doubleValue()); }); stage.show(); }
@Override protected void initView () { mySelectedView.getListView() .setPlaceholder(new Label(myLabel.getString("DragAttributeLabel"))); mySelectedView.getListView().setOrientation(Orientation.HORIZONTAL); mySelectedView.getListView() .setCellFactory(c -> new DraggableRemoveCellImage<AttributeDefinition>(myAttributeSelector .getListView())); myAttributeSelector.getListView() .setCellFactory(c -> new DraggableAddCell<AttributeDefinition>(mySelectedView .getListView())); myContainer = getMyUIFactory().makeHBox(20, Pos.CENTER, myAttributeSelector.draw(), mySelectedView.draw()); }
@FXML private void initialize() { eventBus.register(this); messageBox.setDisable(client.getSelectedRoom() == null); eventListView.setCellFactory(listView -> { EventListItemView memberListItemView = new EventListItemView(); memberListItemView.getView(); return (EventListItemPresenter)memberListItemView.getPresenter(); }); eventListView.itemsProperty().addListener((observable, oldValue, newValue) -> { if(eventListScrollBar != null) { eventListScrollBar.valueProperty().removeListener(scrollListener); } this.eventListScrollBar = getListViewScrollBar(eventListView, Orientation.VERTICAL); if(eventListScrollBar != null) { eventListScrollBar.valueProperty().addListener(scrollListener); } }); // Buffering icon animations bufferIconAnimation = new RotateTransition(Duration.millis(1000), bufferingIcon); bufferIconAnimation.setCycleCount(Timeline.INDEFINITE); bufferIconAnimation.setByAngle(360); bufferFadeIn = new FadeTransition(Duration.millis(200), bufferingIcon); bufferFadeIn.setFromValue(0.0); bufferFadeIn.setToValue(1.0); bufferFadeOut = new FadeTransition(Duration.millis(200), bufferingIcon); bufferFadeOut.setFromValue(1.0); bufferFadeOut.setToValue(0.0); }
public static Separator createSeparator(Orientation orientation, double width, Insets padding) { Separator separator = new Separator(orientation); separator.setPrefWidth(width); separator.setPadding(padding); return separator; }
private void layoutComponents() { horizontalSplit.prefWidthProperty().bind(widthProperty()); horizontalSplit.prefHeightProperty().bind(heightProperty()); verticalSplit.setOrientation(Orientation.VERTICAL); verticalSplit.prefWidthProperty().bind(widthProperty()); verticalSplit.prefHeightProperty().bind(heightProperty()); VBox upper = new VBox(); upper.getChildren().add(catInfoView); VBox lower = new VBox(); lower.getChildren().add(groupView); verticalSplit.getItems().addAll(upper, lower); verticalSplit.setDividerPositions(0.5); leftContent.getChildren().add(verticalSplit); rightContent.setPadding(new Insets(10)); rightContent.setSpacing(10); rightContent.prefHeightProperty().bind(heightProperty()); tabPane.setPadding(new Insets(10)); tabPane.getStylesheets().add("style.css"); rightContent.getChildren().addAll(tabPane); // TODO Iff no catalogue loaded display usage message like intellij VBox.setVgrow(tabPane, Priority.ALWAYS); horizontalSplit.setDividerPositions(0.33); horizontalSplit.getItems().addAll(leftContent, rightContent); getChildren().addAll(horizontalSplit); }
private void mouseDraggedOnTrack(MouseEvent mouseEvent) { if (!thumb.isPressed()) { if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) { getBehavior().trackPress(mouseEvent, (mouseEvent.getX() / trackLength)); } else { getBehavior().trackPress(mouseEvent, (mouseEvent.getY() / trackLength)); } } }