當前位置: 首頁>>代碼示例>>Java>>正文


Java AnchorPane.setRightAnchor方法代碼示例

本文整理匯總了Java中javafx.scene.layout.AnchorPane.setRightAnchor方法的典型用法代碼示例。如果您正苦於以下問題:Java AnchorPane.setRightAnchor方法的具體用法?Java AnchorPane.setRightAnchor怎麽用?Java AnchorPane.setRightAnchor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.layout.AnchorPane的用法示例。


在下文中一共展示了AnchorPane.setRightAnchor方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createIconContent

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
public static Node createIconContent() {
    StackPane sp = new StackPane();
    AnchorPane anchorPane = new AnchorPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    anchorPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle r1 = new Rectangle(14, 14, Color.web("#1c89f4"));
    Rectangle r2 = new Rectangle(45, 10, Color.web("#349b00"));
    Rectangle r3 = new Rectangle(35, 14, Color.web("#349b00"));

    anchorPane.getChildren().addAll(r1, r2, r3);
    AnchorPane.setTopAnchor(r1, Double.valueOf(1));
    AnchorPane.setLeftAnchor(r1, Double.valueOf(1));
    AnchorPane.setTopAnchor(r2, Double.valueOf(20));
    AnchorPane.setLeftAnchor(r2, Double.valueOf(1));
    AnchorPane.setBottomAnchor(r3, Double.valueOf(1));
    AnchorPane.setRightAnchor(r3, Double.valueOf(5));

    sp.getChildren().addAll(rectangle, anchorPane);
    return new Group(sp);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:24,代碼來源:AnchorPaneSample.java

示例2: createBottomXAxis

import javafx.scene.layout.AnchorPane; //導入方法依賴的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

示例3: start

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
@Override
public void start(final Stage stage) throws Exception {
    fonts = Font.getFamilies().toArray(fonts);
    
    pagination = new Pagination(fonts.length/itemsPerPage(), 0);
    pagination.getStyleClass().add(Pagination.STYLE_CLASS_BULLET);       
    pagination.setPageFactory((Integer pageIndex) -> createPage(pageIndex));
    AnchorPane anchor = new AnchorPane();
    AnchorPane.setTopAnchor(pagination, 10.0);
    AnchorPane.setRightAnchor(pagination, 10.0);
    AnchorPane.setBottomAnchor(pagination, 10.0);
    AnchorPane.setLeftAnchor(pagination, 10.0);
    anchor.getChildren().addAll(pagination);
    Scene scene = new Scene(anchor);
    stage.setScene(scene);
    stage.setTitle("PaginationSample");
    scene.getStylesheets().add("paginationsample/ControlStyle.css");
    stage.show();
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:20,代碼來源:PaginationSample.java

示例4: SpecificationsPane

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
/**
 * Creates an empty instance.
 */
public SpecificationsPane() {
  this.tabPane = new TabPane();
  this.addButton = new Button("+");
  ViewUtils.setupClass(this);


  AnchorPane.setTopAnchor(tabPane, 0.0);
  AnchorPane.setLeftAnchor(tabPane, 0.0);
  AnchorPane.setRightAnchor(tabPane, 0.0);
  AnchorPane.setBottomAnchor(tabPane, 0.0);
  AnchorPane.setTopAnchor(addButton, 5.0);
  AnchorPane.setRightAnchor(addButton, 5.0);

  this.getChildren().addAll(tabPane, addButton);
}
 
開發者ID:VerifAPS,項目名稱:stvs,代碼行數:19,代碼來源:SpecificationsPane.java

示例5: createTopXAxis

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
private Axis createTopXAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) {
    Axis axis = new Axis(MIN, MAX, Orientation.HORIZONTAL, AxisType.LOGARITHMIC, Position.TOP);
    axis.setPrefHeight(AXIS_WIDTH);
    axis.setAutoScale(AUTO_SCALE);

    AnchorPane.setTopAnchor(axis, 25d);
    AnchorPane.setLeftAnchor(axis, 25d);
    AnchorPane.setRightAnchor(axis, 25d);

    return axis;
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:12,代碼來源:LogChartTest.java

示例6: ViewPane

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
public ViewPane(MyGraphView graphView) {

        // Setup Main Pane
        AnchorPane.setBottomAnchor(this, 0.0);
        AnchorPane.setTopAnchor(this, 0.0);
        AnchorPane.setLeftAnchor(this, 0.0);
        AnchorPane.setRightAnchor(this, 0.0);
        this.setStyle("-fx-background-color : whitesmoke");

        // Create new scene with graphView
        this.myGraphView = graphView;
        bottomPane = new Pane();
        topPane = new Pane();
        topPane.setPickOnBounds(false);

        stackPane = new StackPane(bottomPane, myGraphView, topPane);
        viewScene = new SubScene(stackPane, this.getWidth(), this.getHeight());
        viewScene.widthProperty().bind(this.widthProperty());
        viewScene.heightProperty().bind(this.heightProperty());
        viewScene.setPickOnBounds(false);

        // Add StackPane in SubScene and add content.
        getChildren().addAll(viewScene);

        // Bind LayoutWidth to this here
        myGraphView.animationService.widthProperty.bind(this.widthProperty());
        myGraphView.animationService.heightProperty.bind(this.heightProperty());

        hoverInfo = new SimpleStringProperty("");
        this.groupNodeInitLocation = new HashMap<>();

        // Setup interactions and view elements
        setupTransforms();
        initRectangle();
        addMouseInteractions();
    }
 
開發者ID:jmueller95,項目名稱:CORNETTO,代碼行數:37,代碼來源:ViewPane.java

示例7: setAnchorBounds

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
/**
    * Sets the bounds for the contents of the anchor pane.
    * @param contents
    */
   private void setAnchorBounds(Node contents) {
   	AnchorPane.setTopAnchor(contents, 0.0);
	AnchorPane.setRightAnchor(contents, 0.0);
	AnchorPane.setBottomAnchor(contents, 0.0);
	AnchorPane.setLeftAnchor(contents, 0.0);
}
 
開發者ID:nonilole,項目名稱:Conan,代碼行數:11,代碼來源:InstructionsView.java

示例8: createTopXAxis

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
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;
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:14,代碼來源:GridTest.java

示例9: addSeparator

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
/**
 * Adds a separator on the list of tasks as the next element.
 */
private void addSeparator() {
    Separator separator = new Separator();
    AnchorPane.setLeftAnchor(separator, 17.0);
    AnchorPane.setRightAnchor(separator, 17.0);
    separator.setLayoutY(lastLayoutYLists + DISTANCE_BETWEEN_SEPARATOR);
    separator.setPrefWidth(200.0);
    taskListsAnchorPane.getChildren().add(separator);
    lastLayoutYLists += 15;
}
 
開發者ID:Soheibooo,項目名稱:EMBER,代碼行數:13,代碼來源:MainController.java

示例10: createCenterXAxis

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
private Axis createCenterXAxis(final double MIN, final double MAX, final boolean AUTO_SCALE, final double AXIS_WIDTH) {
    Axis axis = new Axis(Orientation.HORIZONTAL, Position.CENTER);
    axis.setMinValue(MIN);
    axis.setMaxValue(MAX);
    axis.setPrefHeight(AXIS_WIDTH);
    axis.setAutoScale(AUTO_SCALE);

    AnchorPane.setBottomAnchor(axis, axis.getZeroPosition());
    AnchorPane.setLeftAnchor(axis, AXIS_WIDTH);
    AnchorPane.setRightAnchor(axis, AXIS_WIDTH);

    return axis;
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:14,代碼來源:LineChartTest.java

示例11: addTab

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
private void addTab(TreeMap treeMap) {
    AnchorPane treeMapContainer = new AnchorPane();
    treeMapContainer.setPrefSize(0, 0);
    Tab tab = new Tab(treeMap.getData().getName(), treeMapContainer);
    Node treeMapNode = treeMap.getNode();
    treeMapContainer.getChildren().add(treeMapNode);
    AnchorPane.setBottomAnchor(treeMapNode, 0.0);
    AnchorPane.setLeftAnchor(treeMapNode, 0.0);
    AnchorPane.setRightAnchor(treeMapNode, 0.0);
    AnchorPane.setTopAnchor(treeMapNode, 0.0);
    tabPane.getTabs().add(tab);
}
 
開發者ID:PtitNoony,項目名稱:FxTreeMap,代碼行數:13,代碼來源:SampleViewController.java

示例12: createCenterXAxis

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
private Axis createCenterXAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) {
    Axis axis = new Axis(Orientation.HORIZONTAL, Position.CENTER);
    axis.setMinValue(MIN);
    axis.setMaxValue(MAX);
    axis.setPrefHeight(AXIS_WIDTH);
    axis.setAutoScale(AUTO_SCALE);

    AnchorPane.setBottomAnchor(axis, axis.getZeroPosition());
    AnchorPane.setLeftAnchor(axis, 25d);
    AnchorPane.setRightAnchor(axis, 25d);

    return axis;
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:14,代碼來源:ChartTest.java

示例13: createBottomTimeAxis

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
private Axis createBottomTimeAxis(final LocalDateTime START, final LocalDateTime END, final String PATTERN, final boolean AUTO_SCALE) {
    Axis axis = new Axis(START, END, Orientation.HORIZONTAL, Position.BOTTOM);
    axis.setDateTimeFormatPattern(PATTERN);
    axis.setPrefHeight(AXIS_WIDTH);

    AnchorPane.setBottomAnchor(axis, 0d);
    AnchorPane.setLeftAnchor(axis, 25d);
    AnchorPane.setRightAnchor(axis, 25d);

    return axis;
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:12,代碼來源:TimeAxisTest.java

示例14: createRightYAxis

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
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;
}
 
開發者ID:HanSolo,項目名稱:charts,代碼行數:14,代碼來源:SingleChartTest.java

示例15: TimeIndicator

import javafx.scene.layout.AnchorPane; //導入方法依賴的package包/類
public TimeIndicator(DayPane dayPane, Node indicator) {
    AnchorPane.setLeftAnchor(dayPane, 0.0);
    AnchorPane.setTopAnchor(dayPane, 0.0);
    AnchorPane.setRightAnchor(dayPane, 0.0);
    AnchorPane.setBottomAnchor(dayPane, 0.0);
    this.getChildren().add(dayPane);

    this.startTime = dayPane.dayStartTimeProperty();
    this.endTime = dayPane.dayEndTimeProperty();
    this.date = dayPane.getDayDate();

    this.indicator = indicator;
    AnchorPane.setLeftAnchor(indicator, 0.0);
    AnchorPane.setRightAnchor(indicator, 0.0);

    // update position if the DayPane's time window changes
    startTime.addListener(observable -> setIndicatorPosition(indicator));
    endTime.addListener(observable -> setIndicatorPosition(indicator));

    // updates the position every minute
    Timeline indicatorupdate = new Timeline(new KeyFrame(javafx.util.Duration.minutes(1), actionEvent -> setIndicatorPosition(indicator)));
    indicatorupdate.setCycleCount(Animation.INDEFINITE);
    indicatorupdate.play();

    // initial position
    setIndicatorPosition(indicator);
}
 
開發者ID:Jibbow,項目名稱:FastisFX,代碼行數:28,代碼來源:TimeIndicator.java


注:本文中的javafx.scene.layout.AnchorPane.setRightAnchor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。