本文整理匯總了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);
}