当前位置: 首页>>代码示例>>Java>>正文


Java Orientation类代码示例

本文整理汇总了Java中javafx.geometry.Orientation的典型用法代码示例。如果您正苦于以下问题:Java Orientation类的具体用法?Java Orientation怎么用?Java Orientation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Orientation类属于javafx.geometry包,在下文中一共展示了Orientation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createToolBar

import javafx.geometry.Orientation; //导入依赖的package包/类
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;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:23,代码来源:TestRunner.java

示例2: createChartPane

import javafx.geometry.Orientation; //导入依赖的package包/类
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;
}
 
开发者ID:jfree,项目名称:jfree-fxdemos,代码行数:26,代码来源:OrsonChartsFXDemo.java

示例3: createControl

import javafx.geometry.Orientation; //导入依赖的package包/类
@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;
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:20,代码来源:HelloRecurrenceView.java

示例4: dataItemChanged

import javafx.geometry.Orientation; //导入依赖的package包/类
/** @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);
	}
}
 
开发者ID:JKostikiadis,项目名称:MultiAxisCharts,代码行数:23,代码来源:MultiAxisBarChart.java

示例5: Son

import javafx.geometry.Orientation; //导入依赖的package包/类
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);

    }
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:25,代码来源:Son.java

示例6: addToolBar

import javafx.geometry.Orientation; //导入依赖的package包/类
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);
}
 
开发者ID:hendrikebbers,项目名称:ExtremeGuiMakeover,代码行数:40,代码来源:MovieViewSkin.java

示例7: PrettyListView

import javafx.geometry.Orientation; //导入依赖的package包/类
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));
}
 
开发者ID:hendrikebbers,项目名称:ExtremeGuiMakeover,代码行数:22,代码来源:PrettyListView.java

示例8: FormDialog

import javafx.geometry.Orientation; //导入依赖的package包/类
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);
}
 
开发者ID:yiding-he,项目名称:redisfx,代码行数:25,代码来源:FormDialog.java

示例9: createBottomXAxis

import javafx.geometry.Orientation; //导入依赖的package包/类
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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:14,代码来源:ChartTest.java

示例10: start

import javafx.geometry.Orientation; //导入依赖的package包/类
@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();
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:24,代码来源:SplitPaneDemo.java

示例11: initBar

import javafx.geometry.Orientation; //导入依赖的package包/类
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)
      );
}
 
开发者ID:XDean,项目名称:CSS-Editor-FX,代码行数:26,代码来源:StatusBarManager.java

示例12: EditorPane

import javafx.geometry.Orientation; //导入依赖的package包/类
/**
 * <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);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:25,代码来源:EditorPane.java

示例13: createExtractedVarsTextArea

import javafx.geometry.Orientation; //导入依赖的package包/类
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;
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:25,代码来源:VariableCollectionDemo.java

示例14: getCenterPane

import javafx.geometry.Orientation; //导入依赖的package包/类
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;
}
 
开发者ID:softish,项目名称:KetchupDesktop,代码行数:27,代码来源:KetchupDesktopView.java

示例15: getListViewScrollBar

import javafx.geometry.Orientation; //导入依赖的package包/类
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;
}
 
开发者ID:ashoknailwal,项目名称:desktop-gmail-client,代码行数:13,代码来源:MainUI3Controller.java


注:本文中的javafx.geometry.Orientation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。