java类javafx.geometry.Orientation的实例源码

TestRunner.java 文件源码 项目:marathonv5 阅读 26 收藏 0 点赞 0 评论 0
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;
}
OrsonChartsFXDemo.java 文件源码 项目:jfree-fxdemos 阅读 27 收藏 0 点赞 0 评论 0
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;
}
HelloRecurrenceView.java 文件源码 项目:CalendarFX 阅读 20 收藏 0 点赞 0 评论 0
@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;
}
MultiAxisBarChart.java 文件源码 项目:MultiAxisCharts 阅读 23 收藏 0 点赞 0 评论 0
/** @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);
    }
}
Son.java 文件源码 项目:GazePlay 阅读 26 收藏 0 点赞 0 评论 0
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);

    }
MovieViewSkin.java 文件源码 项目:ExtremeGuiMakeover 阅读 28 收藏 0 点赞 0 评论 0
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);
}
PrettyListView.java 文件源码 项目:ExtremeGuiMakeover 阅读 22 收藏 0 点赞 0 评论 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));
}
FormDialog.java 文件源码 项目:redisfx 阅读 21 收藏 0 点赞 0 评论 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);
}
MainWindow.java 文件源码 项目:TextClassifier 阅读 26 收藏 0 点赞 0 评论 0
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();
}
SplitPaneDemo.java 文件源码 项目:vars-annotation 阅读 36 收藏 0 点赞 0 评论 0
@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();
}
StatusBarManager.java 文件源码 项目:CSS-Editor-FX 阅读 31 收藏 0 点赞 0 评论 0
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)
      );
}
EditorPane.java 文件源码 项目:stvs 阅读 26 收藏 0 点赞 0 评论 0
/**
 * <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);
}
VariableCollectionDemo.java 文件源码 项目:stvs 阅读 21 收藏 0 点赞 0 评论 0
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;
}
KetchupDesktopView.java 文件源码 项目:KetchupDesktop 阅读 21 收藏 0 点赞 0 评论 0
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;
}
MainUI3Controller.java 文件源码 项目:desktop-gmail-client 阅读 30 收藏 0 点赞 0 评论 0
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;
}
LogGridTest.java 文件源码 项目:charts 阅读 29 收藏 0 点赞 0 评论 0
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;
}
FilledSliderSkin.java 文件源码 项目:FEFEditor 阅读 42 收藏 0 点赞 0 评论 0
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);
        });
    }
FilledSliderSkin.java 文件源码 项目:FEFEditor 阅读 273 收藏 0 点赞 0 评论 0
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));
        }
    }
}
LogChartTest.java 文件源码 项目:charts 阅读 21 收藏 0 点赞 0 评论 0
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;
}
FilledSliderSkin.java 文件源码 项目:FEFEditor 阅读 33 收藏 0 点赞 0 评论 0
/**
 * 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);
    }
}
ChartTest.java 文件源码 项目:charts 阅读 24 收藏 0 点赞 0 评论 0
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;
}
LineChartTest.java 文件源码 项目:charts 阅读 30 收藏 0 点赞 0 评论 0
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;
}
FilledSliderSkin.java 文件源码 项目:FEFEditor 阅读 33 收藏 0 点赞 0 评论 0
@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;
    }
}
FilledSliderSkin.java 文件源码 项目:FEFEditor 阅读 35 收藏 0 点赞 0 评论 0
@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;
        }
    }
}
FilledSliderSkin.java 文件源码 项目:FEFEditor 阅读 24 收藏 0 点赞 0 评论 0
@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);
    }
}
FilledSliderSkin.java 文件源码 项目:FEFEditor 阅读 26 收藏 0 点赞 0 评论 0
@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;
    }
}
TimeAxisTest.java 文件源码 项目:charts 阅读 24 收藏 0 点赞 0 评论 0
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;
}
HorizontalListViewSample.java 文件源码 项目:marathonv5 阅读 24 收藏 0 点赞 0 评论 0
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);
}
FunctionStage.java 文件源码 项目:marathonv5 阅读 32 收藏 0 点赞 0 评论 0
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);
}
LogGridTest.java 文件源码 项目:charts 阅读 29 收藏 0 点赞 0 评论 0
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;
}


问题


面经


文章

微信
公众号

扫码关注公众号