本文整理汇总了Java中javafx.scene.layout.AnchorPane.setBottomAnchor方法的典型用法代码示例。如果您正苦于以下问题:Java AnchorPane.setBottomAnchor方法的具体用法?Java AnchorPane.setBottomAnchor怎么用?Java AnchorPane.setBottomAnchor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.layout.AnchorPane
的用法示例。
在下文中一共展示了AnchorPane.setBottomAnchor方法的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);
}
示例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;
}
示例3: createRightYAxis
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
private Axis createRightYAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) {
Axis axis = new Axis(MIN, MAX, Orientation.VERTICAL, AxisType.LOGARITHMIC, Position.RIGHT);
axis.setPrefWidth(AXIS_WIDTH);
axis.setAutoScale(AUTO_SCALE);
AnchorPane.setRightAnchor(axis, 0d);
AnchorPane.setTopAnchor(axis, 0d);
AnchorPane.setBottomAnchor(axis, 25d);
return axis;
}
示例4: 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);
}
示例5: 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;
}
示例6: createCenterYAxis
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
private Axis createCenterYAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) {
Axis axis = new Axis(Orientation.VERTICAL, Position.CENTER);
axis.setMinValue(MIN);
axis.setMaxValue(MAX);
axis.setPrefWidth(AXIS_WIDTH);
axis.setAutoScale(AUTO_SCALE);
AnchorPane.setTopAnchor(axis, 0d);
AnchorPane.setBottomAnchor(axis, 25d);
AnchorPane.setLeftAnchor(axis, axis.getZeroPosition());
return axis;
}
示例7: createBottomXAxis
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
private Axis createBottomXAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) {
Axis axis = new Axis(MIN, MAX, Orientation.HORIZONTAL, AxisType.LOGARITHMIC, Position.BOTTOM);
axis.setPrefHeight(AXIS_WIDTH);
axis.setAutoScale(AUTO_SCALE);
AnchorPane.setBottomAnchor(axis, 0d);
AnchorPane.setLeftAnchor(axis, 25d);
AnchorPane.setRightAnchor(axis, 25d);
return axis;
}
示例8: createLeftYAxis
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
private Axis createLeftYAxis(final double MIN, final double MAX, final boolean AUTO_SCALE) {
Axis axis = new Axis(Orientation.VERTICAL, Position.LEFT);
axis.setMinValue(MIN);
axis.setMaxValue(MAX);
axis.setPrefWidth(AXIS_WIDTH);
axis.setAutoScale(AUTO_SCALE);
AnchorPane.setTopAnchor(axis, 0d);
AnchorPane.setBottomAnchor(axis, 25d);
AnchorPane.setLeftAnchor(axis, 0d);
return axis;
}
示例9: setTaskViewParent
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
public void setTaskViewParent(AnchorPane parent) {
AnchorPane.setTopAnchor(taskViewToolBar, 0.0);
AnchorPane.setRightAnchor(taskViewToolBar, 0.0);
AnchorPane.setLeftAnchor(taskViewToolBar, 0.0);
AnchorPane.setTopAnchor(taskView, TOOLBAR_HEIGHT);
AnchorPane.setBottomAnchor(taskView, 0.0);
AnchorPane.setRightAnchor(taskView, 0.0);
AnchorPane.setLeftAnchor(taskView, 0.0);
parent.getChildren().addAll(taskViewToolBar, taskView);
}
示例10: displayView
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
default void displayView(final AnchorPane anchorPane, final Node view)
{
// Remove anything already there.
anchorPane.getChildren().removeAll(anchorPane.getChildren());
// Make the view fill the anchor pane.
AnchorPane.setTopAnchor(view, 0.0);
AnchorPane.setLeftAnchor(view, 0.0);
AnchorPane.setRightAnchor(view, 0.0);
AnchorPane.setBottomAnchor(view, 0.0);
// Add the view into the anchor pane.
anchorPane.getChildren().add(view);
}
示例11: 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;
}
示例12: init
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
@Override public void init() {
xAxisBottom = new Axis(0, 1000, Orientation.HORIZONTAL, AxisType.LOGARITHMIC, Position.BOTTOM);
xAxisBottom.setPrefHeight(20);
AnchorPane.setLeftAnchor(xAxisBottom, 20d);
AnchorPane.setRightAnchor(xAxisBottom, 20d);
AnchorPane.setBottomAnchor(xAxisBottom, 0d);
yAxisLeft = new Axis(0, 1000, Orientation.VERTICAL, AxisType.LOGARITHMIC, Position.LEFT);
yAxisLeft.setPrefWidth(20);
AnchorPane.setLeftAnchor(yAxisLeft, 0d);
AnchorPane.setTopAnchor(yAxisLeft, 20d);
AnchorPane.setBottomAnchor(yAxisLeft, 20d);
}
示例13: adjustGridAnchors
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
private void adjustGridAnchors() {
if (null == grid) return;
AnchorPane.setLeftAnchor(grid, hasLeftYAxis ? leftAxisWidth : 0d);
AnchorPane.setRightAnchor(grid, hasRightYAxis ? rightAxisWidth : 0d);
AnchorPane.setTopAnchor(grid, hasTopXAxis ? topAxisHeight : 0d);
AnchorPane.setBottomAnchor(grid, hasBottomXAxis ? bottomAxisHeight : 0d);
}
示例14: createRightYAxis
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
private Axis createRightYAxis(final double MIN, final double MAX, final boolean AUTO_SCALE, final double AXIS_WIDTH) {
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, AXIS_WIDTH);
return axis;
}
示例15: centerNode
import javafx.scene.layout.AnchorPane; //导入方法依赖的package包/类
public static void centerNode(final Node node, final Double marginSize) {
AnchorPane.setTopAnchor(node, marginSize);
AnchorPane.setBottomAnchor(node, marginSize);
AnchorPane.setLeftAnchor(node, marginSize);
AnchorPane.setRightAnchor(node, marginSize);
}