本文整理汇总了Java中javafx.scene.Node.localToParent方法的典型用法代码示例。如果您正苦于以下问题:Java Node.localToParent方法的具体用法?Java Node.localToParent怎么用?Java Node.localToParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.Node
的用法示例。
在下文中一共展示了Node.localToParent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: click
import javafx.scene.Node; //导入方法依赖的package包/类
@Override public void click(int button, Node target, PickResult pickResult, int clickCount, double xoffset, double yoffset) {
Node cell = getPseudoComponent();
target = getTextObj((TableCell<?, ?>) cell);
Point2D targetXY = target.localToParent(xoffset, yoffset);
targetXY = node.localToScene(targetXY);
super.click(button, target, new PickResult(target, targetXY.getX(), targetXY.getY()), clickCount, xoffset, yoffset);
}
示例2: _getMidpoint
import javafx.scene.Node; //导入方法依赖的package包/类
@Override public Point2D _getMidpoint() {
TreeView<?> treeView = (TreeView<?>) getComponent();
Node cell = getCellAt(treeView, getPath(treeView, path));
Bounds boundsInParent = cell.getBoundsInParent();
double x = boundsInParent.getWidth() / 2;
double y = boundsInParent.getHeight() / 2;
return cell.localToParent(x, y);
}
示例3: _getMidpoint
import javafx.scene.Node; //导入方法依赖的package包/类
@Override public Point2D _getMidpoint() {
Node cell = getPseudoComponent();
Bounds boundsInParent = cell.getBoundsInParent();
double x = boundsInParent.getWidth() / 2;
double y = boundsInParent.getHeight() / 2;
return cell.localToParent(x, y);
}
示例4: click
import javafx.scene.Node; //导入方法依赖的package包/类
@Override public void click(int button, Node target, PickResult pickResult, int clickCount, double xoffset, double yoffset) {
Node cell = getPseudoComponent();
target = getTextObj((TreeTableCell<?, ?>) cell);
Point2D targetXY = target.localToParent(xoffset, yoffset);
targetXY = node.localToScene(targetXY);
super.click(button, target, new PickResult(target, targetXY.getX(), targetXY.getY()), clickCount, xoffset, yoffset);
}
示例5: _moveto
import javafx.scene.Node; //导入方法依赖的package包/类
@Override public void _moveto(double xoffset, double yoffset) {
Node cell = getPseudoComponent();
Point2D pCoords = cell.localToParent(xoffset, yoffset);
parent._moveto(pCoords.getX(), pCoords.getY());
}
示例6: _moveto
import javafx.scene.Node; //导入方法依赖的package包/类
@Override public void _moveto(double xoffset, double yoffset) {
Node cell = getCellAt((ListView<?>) getComponent(), itemIndex);
Point2D pCoords = cell.localToParent(xoffset, yoffset);
parent._moveto(pCoords.getX(), pCoords.getY());
}