Java Code Examples for javafx.stage.PopupWindow#show()

The following examples show how to use javafx.stage.PopupWindow#show() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FxmlControl.java    From MyBox with Apache License 2.0 4 votes vote down vote up
public static void locateCenter(Region region, PopupWindow window) {
    Bounds bounds = region.localToScreen(region.getBoundsInLocal());
    window.show(region, bounds.getMinX() + bounds.getWidth() / 2, bounds.getMinY() + bounds.getHeight() / 2);
}
 
Example 2
Source File: FxmlControl.java    From MyBox with Apache License 2.0 4 votes vote down vote up
public static void locateBelow(Node node, PopupWindow window) {
    Bounds bounds = node.localToScreen(node.getBoundsInLocal());
    window.show(node, bounds.getMinX() + 2, bounds.getMinY() + bounds.getHeight() + 5);
}
 
Example 3
Source File: FxmlControl.java    From MyBox with Apache License 2.0 4 votes vote down vote up
public static void locateBelow(Region region, PopupWindow window) {
    Bounds bounds = region.localToScreen(region.getBoundsInLocal());
    window.show(region, bounds.getMinX() + 2, bounds.getMinY() + bounds.getHeight() + 5);
}
 
Example 4
Source File: FxmlControl.java    From MyBox with Apache License 2.0 4 votes vote down vote up
public static void locateRightTop(Region region, PopupWindow window) {
    Bounds bounds = region.localToScreen(region.getBoundsInLocal());
    window.show(region, bounds.getMaxX() - window.getWidth() - 20, bounds.getMinY() + 50);
}
 
Example 5
Source File: FxmlControl.java    From MyBox with Apache License 2.0 4 votes vote down vote up
public static void locateUp(Region region, PopupWindow window) {
    Bounds bounds = region.localToScreen(region.getBoundsInLocal());
    window.show(region, bounds.getMinX() + 2, bounds.getMinY() - 50);
}