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


Java NodeOrientation类代码示例

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


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

示例1: initUi

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
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());
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:20,代码来源:KeyFrameComponent.java

示例2: setDataNode

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

	}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:17,代码来源:SVNViewer.java

示例3: initialize

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
/**
 * 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");
		}
	});
	
}
 
开发者ID:goxr3plus,项目名称:XR3Capture,代码行数:24,代码来源:SettingsWindowController.java

示例4: GeneratorAppView

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
/**
   * 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);
  }
 
开发者ID:de-luxe,项目名称:burstcoin-address-generator,代码行数:27,代码来源:GeneratorAppView.java

示例5: MetroIndetermineSpinner

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

}
 
开发者ID:fireandfuel,项目名称:MetroProgressIndicator,代码行数:20,代码来源:MetroProgressIndicatorSkin.java

示例6: initToolBar

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

示例7: initComponents

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

示例8: Tile

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
public Tile(final SkinType SKIN_TYPE) {
    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    skinType = SKIN_TYPE;
    getStyleClass().add("tile");

    init();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:tilesfx,代码行数:9,代码来源:Tile.java

示例9: callAction

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
@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);
	}
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:29,代码来源:DockTabPaneBehavior.java

示例10: Clock

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
public Clock(final ClockSkinType SKIN, final ZonedDateTime TIME) {
    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    skinType = SKIN;
    getStyleClass().add("clock");

    init(TIME);
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:9,代码来源:Clock.java

示例11: Gauge

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
public Gauge(final SkinType SKIN) {
    setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
    skinType = SKIN;
    getStyleClass().add("gauge");

    init();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:9,代码来源:Gauge.java

示例12: FilteredColumnHeader

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

}
 
开发者ID:maimArt,项目名称:TableFilterFX,代码行数:29,代码来源:FilteredColumnHeader.java

示例13: start

import javafx.geometry.NodeOrientation; //导入依赖的package包/类
@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);
}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:32,代码来源:MedusaTempGauge.java

示例14: setFocusedSquare

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

示例15: IndeterminateSpinner

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

}
 
开发者ID:fflewddur,项目名称:archivo,代码行数:15,代码来源:TaskProgressIndicatorSkin.java


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