Java 类javafx.geometry.NodeOrientation 实例源码

项目:fx-animation-editor    文件:KeyFrameComponent.java   
private void initUi() {
    timeLabel.setValue(model.getTime());

    // Use weak listener here so view can be garbage collected when key frame is deleted, because model instance will hang around in command stack.
    ChangeListener<Number> timeChangeListener = (v, o, n) -> timeLabel.setValue(n.doubleValue());
    timeLabel.getProperties().put(TIME_CHANGE_LISTENER_KEY, timeChangeListener);
    model.timeProperty().addListener(new WeakChangeListener<>(timeChangeListener));

    incrementButton.setGraphic(createArrowGraphic(NodeOrientation.LEFT_TO_RIGHT));
    decrementButton.setGraphic(createArrowGraphic(NodeOrientation.RIGHT_TO_LEFT));
    deleteButton.setGraphic(Svg.MINUS_TINY.node());

    leftButtonBox.visibleProperty().bind(model.timeProperty().greaterThan(0));
    rightButtonBox.visibleProperty().bind(model.timeProperty().greaterThan(0));
    plusLabel.visibleProperty().bind(model.timeProperty().greaterThan(0));
    plusLabel.managedProperty().bind(plusLabel.visibleProperty());

    highlight.visibleProperty().bind(model.selectedProperty());
}
项目:Gargoyle    文件:SVNViewer.java   
private void setDataNode(SVNLogEntry entry, Data<String, String> data) {

        Group group = new Group();
        group.setManaged(false);
        Text value = new Text(entry.getRevision() + "");
        value.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
        value.translateYProperty().set(-15);
        Circle circle = new Circle(4, Color.WHITE);
        circle.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
        circle.setStroke(Color.web("#f3622d"));
        StackPane stackPane = new StackPane(value, circle);
        stackPane.setPrefSize(30, 60);
        group.getChildren().add(stackPane);
        data.setNode(group);

    }
项目:XR3Capture    文件:SettingsWindowController.java   
/**
 * Will be called as soon as FXML file is loaded.
 */
@FXML
private void initialize() {

    setTitle("Settings");
    getIcons().add(new Image(getClass().getResourceAsStream("/image/icon.png")));
    setScene(new Scene(root));
    centerOnScreen();

    // orientation
    orientation.selectedProperty().addListener((observable , oldValue , newValue) -> {
        if (newValue) { // selected
            mainWindowController.getRoot().setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
            orientation.setText("Current : LEFT  -> TO  -> RIGHT");
        } else {
            mainWindowController.getRoot().setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
            orientation.setText("Current : RIGHT  -> TO  -> LEFT");
        }
    });

}
项目:burstcoin-address-generator    文件:GeneratorAppView.java   
/**
   * Instantiates a new Generator app view.
   *
   * @param action the action
   */
  public GeneratorAppView(Action action)
  {
//    AeroFX.style();
//    AquaFx.style();

    tabLookup = new HashMap<>();
    this.action = action;
    ToolBar mainBar = new ToolBar();
    Label appLabel = new Label("BURST Address Generator");
    mainBar.getItems().add(appLabel);

    tabPane = new TabPane();

    ToolBar statusBar = new ToolBar();
    statusBar.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
    statusBar.getItems().add(new Label("Version: 0.2.3-SNAPSHOT"));

    setTop(mainBar);
    setCenter(tabPane);
    setBottom(statusBar);
  }
项目:MetroProgressIndicator    文件:MetroProgressIndicatorSkin.java   
private MetroIndetermineSpinner(boolean spinEnabled, Paint fillOverride)
{
    // does not need to be a weak listener since it only listens to its
    // own property
    // this.impl_treeVisibleProperty().addListener(
    //      MetroProgressIndicatorSkin.this.parentTreeVisibleChangedListener);
    this.spinEnabled = spinEnabled;
    this.fillOverride = fillOverride;

    this.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    this.getStyleClass().setAll("spinner");

    this.pathsG = new IndicatorPaths();
    this.getChildren().add(this.pathsG);
    this.rebuild();

    this.rebuildTimeline();

}
项目:marathonv5    文件:ResultPane.java   
private void initToolBar() {
    toolBar.setId("toolBar");
    toolBar.getItems().addAll(clearButton, showMessageButton);
    toolBar.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
    resultPaneLayout.setTop(toolBar);

    if (failuresList.isEmpty()) {
        clearButton.setDisable(true);
    }
    clearButton.setOnAction(e -> clear());
    showMessageButton.setDisable(true);
    showMessageButton.setOnAction(e -> showMessage());
}
项目:marathonv5    文件:TextAreaOutput.java   
private void initComponents() {
    toolBar.setId("toolBar");
    toolBar.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
    toolBar.getItems().addAll(clearButton, exportButton, wordWrapButton);
    clearButton.setDisable(true);
    exportButton.setDisable(true);
    clearButton.setOnAction((e) -> clear());
    exportButton.setOnAction(e -> onExport());
    wordWrapButton.setOnAction((e) -> textArea.setWrapText(wordWrapButton.isSelected()));
    content.setTop(toolBar);
    content.setCenter(textArea);
}
项目:tilesfx    文件:Tile.java   
public Tile(final SkinType SKIN_TYPE) {
    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    skinType = SKIN_TYPE;
    getStyleClass().add("tile");

    init();
    registerListeners();
}
项目:Gargoyle    文件:DockTabPaneBehavior.java   
@Override
protected void callAction(String name) {
    boolean rtl = (getControl().getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT);

    if (("TraverseLeft".equals(name) && !rtl) || ("TraverseRight".equals(name) && rtl) || "TraverseUp".equals(name)) {
        if (getControl().isFocused()) {
            selectPreviousTab();
        }
    } else if (("TraverseRight".equals(name) && !rtl) || ("TraverseLeft".equals(name) && rtl) || "TraverseDown".equals(name)) {
        if (getControl().isFocused()) {
            selectNextTab();
        }
    } else if (CTRL_TAB.equals(name) || CTRL_PAGE_DOWN.equals(name)) {
        selectNextTab();
    } else if (CTRL_SHIFT_TAB.equals(name) || CTRL_PAGE_UP.equals(name)) {
        selectPreviousTab();
    } else if (HOME.equals(name)) {
        if (getControl().isFocused()) {
            moveSelection(0, 1);
        }
    } else if (END.equals(name)) {
        if (getControl().isFocused()) {
            moveSelection(getControl().getTabs().size() - 1, -1);
        }
    } else {
        super.callAction(name);
    }
}
项目:Medusa    文件:Clock.java   
public Clock(final ClockSkinType SKIN, final ZonedDateTime TIME) {
    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    skinType = SKIN;
    getStyleClass().add("clock");

    init(TIME);
    registerListeners();
}
项目:Medusa    文件:Gauge.java   
public Gauge(final SkinType SKIN) {
    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    skinType = SKIN;
    getStyleClass().add("gauge");

    init();
    registerListeners();
}
项目:TableFilterFX    文件:FilteredColumnHeader.java   
public FilteredColumnHeader(TableColumn<?, ?> column) {
    super();
    // init nodes
    this.prefWidthProperty().bind(column.widthProperty());
    if (column.isSortable()) {
        setPadding(new Insets(0, 30, 0, 0));
    }
    this.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    this.setAlignment(Pos.CENTER_LEFT);
    this.getStyleClass().add("filteredColumnHeader");
    this.label = new Label();
    label.textProperty().bind(column.textProperty());
    this.label.setMaxWidth(Double.MAX_VALUE);
    HBox.setHgrow(this.label, Priority.ALWAYS);
    this.filterButton = buildFilterButton();
    this.getChildren().addAll(this.label, filterButton);

    // handle button icon
    buttonIcon.setImage(isNotFilteredIcon);
    isFiltered.addListener((ChangeListener<Boolean>) (observable, oldValue, newValue) -> {
        if (newValue) {
            buttonIcon.setImage(isFilteredIcon);
        } else {
            buttonIcon.setImage(isNotFilteredIcon);
        }
    });

}
项目:mars-sim    文件:MedusaTempGauge.java   
@Override public void start(Stage stage) {
    StackPane pane = new StackPane(gauge);
    pane.setPadding(new Insets(20));
    pane.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
    LinearGradient gradient = new LinearGradient(0, 0, 0, pane.getLayoutBounds().getHeight(),
                                                 false, CycleMethod.NO_CYCLE,
                                                 new Stop(0.0, Color.rgb(38, 38, 38)),
                                                 new Stop(1.0, Color.rgb(15, 15, 15)));
    //pane.setBackground(new Background(new BackgroundFill(gradient, CornerRadii.EMPTY, Insets.EMPTY)));
    //pane.setBackground(new Background(new BackgroundFill(Color.rgb(39,44,50), CornerRadii.EMPTY, Insets.EMPTY)));
    //pane.setBackground(new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY)));
    //pane.setBackground(new Background(new BackgroundFill(Gauge.DARK_COLOR, CornerRadii.EMPTY, Insets.EMPTY)));

    Scene scene = new Scene(pane);
    scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);

    stage.setTitle("mars-sim");
    stage.setScene(scene);
    stage.show();

    //gauge.setValue(50);

    // Calculate number of nodes
    calcNoOfNodes(pane);
    System.out.println(noOfNodes + " Nodes in SceneGraph");

    timer.start();

    //gauge.getSections().get(0).setStart(10);
    //gauge.getSections().get(0).setStop(90);
}
项目:JFoenix    文件:JFXColorPalette.java   
private void setFocusedSquare(ColorSquare square) {
    hoverSquare.setVisible(square != null);

    if (square == focusedSquare) {
        return;
    }
    focusedSquare = square;

    hoverSquare.setVisible(focusedSquare != null);
    if (focusedSquare == null) {
        return;
    }

    if (!focusedSquare.isFocused()) {
        focusedSquare.requestFocus();
    }

    hoverSquare.rectangle.setFill(focusedSquare.rectangle.getFill());

    Bounds b = square.localToScene(square.getLayoutBounds());

    double x = b.getMinX();
    double y = b.getMinY();

    double xAdjust;
    double scaleAdjust = hoverSquare.getScaleX() == 1.0 ? 0 : hoverSquare.getWidth() / 4.0;

    if (colorPicker.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
        x = focusedSquare.getLayoutX();
        xAdjust = -focusedSquare.getWidth() + scaleAdjust;
    } else {
        xAdjust = focusedSquare.getWidth() / 2.0 + scaleAdjust;
    }

    hoverSquare.setLayoutX(snapPosition(x) - xAdjust);
    hoverSquare.setLayoutY(snapPosition(y) - focusedSquare.getHeight() / 2.0 + (hoverSquare.getScaleY() == 1.0 ? 0 : focusedSquare
        .getHeight() / 4.0));
}
项目:archivo    文件:TaskProgressIndicatorSkin.java   
private IndeterminateSpinner(boolean spinEnabled, Paint fillOverride) {
    this.spinEnabled = spinEnabled;
    this.fillOverride = fillOverride;

    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    getStyleClass().setAll("spinner");

    pathsG = new IndicatorPaths();
    getChildren().add(pathsG);
    rebuild();

    rebuildTimeline();

}
项目:exchange    文件:StaticProgressIndicatorSkin.java   
public IndeterminateSpinner(TxConfidenceIndicator control, StaticProgressIndicatorSkin s,
                            boolean spinEnabled, Paint fillOverride) {
    this.control = control;
    this.skin = s;
    this.spinEnabled = spinEnabled;
    this.fillOverride = fillOverride;

    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    getStyleClass().setAll("spinner");

    pathsG = new IndicatorPaths(this);
    getChildren().add(pathsG);

    rebuild();
}
项目:JFX8CustomControls    文件:SlideCheckBoxSkin.java   
private void initGraphics() {
    markBox = new Region();
    markBox.getStyleClass().setAll("mark");
    markBox.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    markBox.setTranslateX(-27);

    crossBox = new Region();
    crossBox.getStyleClass().setAll("cross");
    crossBox.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
    crossBox.setTranslateX(27);

    thumb = new Region();
    thumb.getStyleClass().setAll("thumb");
    thumb.setMinSize(48, 34);
    thumb.setPrefSize(48, 34);
    thumb.setMaxSize(48, 34);

    if (getSkinnable().isSelected()) {
        crossBox.setOpacity(0);
        thumb.setTranslateX(24);
    } else {
        markBox.setOpacity(0);
        thumb.setTranslateX(-24);
    }

    box.getStyleClass().setAll("box");
    box.getChildren().addAll(markBox, crossBox, thumb);
    updateChildren();
}
项目:fx-animation-editor    文件:KeyFrameComponent.java   
private Node createArrowGraphic(NodeOrientation direction) {
    StackPane arrow = new StackPane();
    arrow.getStyleClass().add(ARROW_STYLE_CLASS);
    arrow.setNodeOrientation(direction);
    return arrow;
}
项目:XR3Capture    文件:CaptureWindow.java   
/**
 * This method is starting a Thread which is running all the time and is fixing the position of the application on the screen.
 */
private void startPositionFixThread() {
    if (positionFixerThread != null && positionFixerThread.isAlive())
        return;

    // Check frequently for the Primary Screen Bounds
    positionFixerThread = new Thread(() -> {
        try {
            //Run until it is interrupted
            while (true) {

                // CountDownLatch
                CountDownLatch count = new CountDownLatch(1);

                // Get VisualBounds of the Primary Screen
                Rectangle2D bounds = Screen.getPrimary().getVisualBounds();
                Platform.runLater(() -> {

                    //Fix the window position
                    stage.setX(mainWindowController.getRoot().getNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT ? bounds.getMinX() : bounds.getMaxX() - stage.getWidth());
                    stage.setY(bounds.getMaxY() / 2 - stage.getHeight() / 2);
                    count.countDown();
                });

                // Wait until the Platform.runLater has run
                count.await();
                // Sleep some time
                Thread.sleep(500);

            }
        } catch (@SuppressWarnings("unused") InterruptedException ex) {
            positionFixerThread.interrupt();
            //fuck dis error it is not fatal
            //Logger.getLogger(CaptureWindow.class.getName()).log(Level.WARNING, null, ex)
        }

        //System.out.println("XR3Positioning Thread exited")
    });

    positionFixerThread.setDaemon(true);
    positionFixerThread.start();
}