本文整理了Java中javafx.scene.Node.getBoundsInLocal()
方法的一些代码示例,展示了Node.getBoundsInLocal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getBoundsInLocal()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:getBoundsInLocal
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
OverLayRipple() {
super();
setOverLayBounds(this);
this.getStyleClass().add("jfx-rippler-overlay");
// update initial position
if(JFXRippler.this.getChildrenUnmodifiable().contains(control)) {
double diffMinX = Math.abs(control.getBoundsInLocal().getMinX() - control.getLayoutBounds().getMinX());
double diffMinY = Math.abs(control.getBoundsInLocal().getMinY() - control.getLayoutBounds().getMinY());
Bounds bounds = control.getBoundsInParent();
this.setX(bounds.getMinX() + diffMinX - snappedLeftInset());
this.setY(bounds.getMinY() + diffMinY - snappedTopInset());
}
// set initial attributes
setOpacity(0);
setCache(true);
setCacheHint(CacheHint.SPEED);
setCacheShape(true);
setManaged(false);
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
double width = control.getLayoutBounds().getWidth();
double height = control.getLayoutBounds().getHeight();
double diffMinX = Math.abs(control.getBoundsInLocal().getMinX() - control.getLayoutBounds().getMinX());
double diffMinY = Math.abs(control.getBoundsInLocal().getMinY() - control.getLayoutBounds().getMinY());
double diffMaxX = Math.abs(control.getBoundsInLocal().getMaxX() - control.getLayoutBounds().getMaxX());
double diffMaxY = Math.abs(control.getBoundsInLocal().getMaxY() - control.getLayoutBounds().getMaxY());
Node mask;
switch (getMaskType()) {
代码示例来源:origin: stackoverflow.com
Node chartArea = chart.lookup(".chart-plot-background");
Bounds chartAreaBounds = chartArea.localToScene(chartArea.getBoundsInLocal());
代码示例来源:origin: jfoenixadmin/JFoenix
(burgerHeight / 2) - burger.getChildren()
.get(0)
.getBoundsInLocal()
.getHeight() / 2,
Interpolator.EASE_BOTH),
-((burgerHeight / 2) - burger.getChildren()
.get(0)
.getBoundsInLocal()
.getHeight() / 2),
Interpolator.EASE_BOTH),
代码示例来源:origin: jfoenixadmin/JFoenix
(burgerHeight / 2) - burger.getChildren()
.get(0)
.getBoundsInLocal()
.getHeight() / 2,
Interpolator.EASE_BOTH),
-((burgerHeight / 2) - burger.getChildren()
.get(2)
.getBoundsInLocal()
.getHeight() / 2),
Interpolator.EASE_BOTH),
代码示例来源:origin: stackoverflow.com
Bounds chartAreaBounds = chartArea.localToScene(chartArea.getBoundsInLocal());
代码示例来源:origin: org.refcodes/refcodes-checkerboard-alt-javafx
/**
* Gets the scale Y.
*
* @param aSprite the sprite
* @param aCheckerboard the checkerboard
* @return the scale Y
*/
protected static double getScaleY( Node aSprite, FxCheckerboardViewer<?, ?> aCheckerboard ) {
return aCheckerboard.getFieldHeight() / aSprite.getBoundsInLocal().getHeight();
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public RNode<T> moveToCenter() {
Bounds bounds = node.getBoundsInLocal();
moveTo(bounds.getWidth() / 2, bounds.getHeight() / 2);
return this;
}
代码示例来源:origin: org.fxmisc.richtext/richtextfx
public <T extends Node & Caret> Bounds getCaretBoundsOnScreen(T caret) {
layout(); // ensure layout, is a no-op if not dirty
checkWithinParagraph(caret);
Bounds localBounds = caret.getBoundsInLocal();
return caret.localToScreen(localBounds);
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public RNode<T> moveToCenter(Duration d) {
Bounds bounds = node.getBoundsInLocal();
return moveTo(d, bounds.getWidth() / 2, bounds.getHeight() / 2);
}
代码示例来源:origin: org.jfxtras/jfxtras-common
/**
*
* @param node
* @return The Y scene coordinate of the node.
*/
static public double sceneY(Node node) {
return node.localToScene(node.getBoundsInLocal()).getMinY() + node.getScene().getY();
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public RNode<T> moveTo(Duration d, double x, double y) {
Bounds bounds = node.localToScreen(node.getBoundsInLocal());
controller.run(Move.to(d,bounds.getMinX() + x, bounds.getMinY() + y));
return null;
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public RNode<T> dragTo(double x, double y) {
Bounds bounds = node.localToScreen(node.getBoundsInLocal());
controller.run(Drag.to(bounds.getWidth() / 2, bounds.getHeight() / 2, x, y));
return this;
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public RNode<T> dragTo(Duration d, double x, double y) {
Bounds bounds = node.localToScreen(node.getBoundsInLocal());
controller.run(Drag.to(d, bounds.getWidth() / 2, bounds.getHeight() / 2, x, y));
return this;
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public Point2D center() {
Bounds bounds = node.localToScreen(node.getBoundsInLocal());
return new Point2D(bounds.getMinX() + bounds.getWidth()/2, bounds.getMinY() + bounds.getHeight()/2);
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
/**
*
* @param node
* @return The Y screen coordinate of the node.
*/
static public double screenY(Node node) {
return node.localToScene(node.getBoundsInLocal()).getMinY() + node.getScene().getY() + node.getScene().getWindow().getY();
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
/**
*
* @param node
* @return The X screen coordinate of the node.
*/
static public double screenX(Node node) {
return node.localToScene(node.getBoundsInLocal()).getMinX()
+ node.getScene().getX() + node.getScene().getWindow().getX();
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
/**
*
* @param node
* @return The X screen coordinate of the node.
*/
static public double screenX(Node node) {
return node.localToScene(node.getBoundsInLocal()).getMinX() + node.getScene().getX() + node.getScene().getWindow().getX();
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public RNode<T> dragBy(Duration d, double dx, double dy) {
Bounds bounds = node.localToScreen(node.getBoundsInLocal());
controller.run(Drag.by(d, bounds.getMinX() + bounds.getWidth() / 2, bounds.getMinY() + bounds.getHeight() / 2, dx, dy));
return this;
}
代码示例来源:origin: at.bestsolution.fx.test/at.bestsolution.fx.test.rcontrol
@Override
public RNode<T> dragBy(double dx, double dy) {
Bounds bounds = node.localToScreen(node.getBoundsInLocal());
controller.run(Drag.by( bounds.getMinX() + bounds.getWidth() / 2, bounds.getMinY() + bounds.getHeight() / 2, dx, dy));
return this;
}
内容来源于网络,如有侵权,请联系作者删除!