當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。