Java Code Examples for javafx.scene.layout.StackPane#setMouseTransparent()
The following examples show how to use
javafx.scene.layout.StackPane#setMouseTransparent() .
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: Pin.java From BlockMap with MIT License | 6 votes |
@Override protected Node initBottomGui() { StackPane stack = new StackPane(); stack.getChildren().setAll(maps.stream().map(map -> map.getScale()).distinct().map(scale -> { int size = 128 * (1 << scale); Rectangle rect = new Rectangle(size, size, new Color(0.9f, 0.15f, 0.15f, 0.02f)); rect.setStroke(new Color(0.9f, 0.15f, 0.15f, 0.4f)); rect.setMouseTransparent(true); rect.setPickOnBounds(false); getTopGui().hoverProperty().addListener(e -> { if (getTopGui().isHover()) rect.setFill(new Color(0.9f, 0.15f, 0.15f, 0.2f)); else rect.setFill(new Color(0.9f, 0.15f, 0.15f, 0.02f)); }); return rect; }).collect(Collectors.toList())); Translate t = new Translate(); t.xProperty().bind(stack.widthProperty().multiply(-0.5)); t.yProperty().bind(stack.heightProperty().multiply(-0.5)); stack.getTransforms().addAll(t, new Translate(position.x(), position.y())); stack.setPickOnBounds(false); stack.setMouseTransparent(true); stack.setViewOrder(1); return stack; }
Example 2
Source File: JFXSliderSkin.java From JFoenix with Apache License 2.0 | 5 votes |
public JFXSliderSkin(JFXSlider slider) { super(slider); track = (StackPane) getSkinnable().lookup(".track"); thumb = (StackPane) getSkinnable().lookup(".thumb"); coloredTrack = new StackPane(); coloredTrack.getStyleClass().add("colored-track"); coloredTrack.setMouseTransparent(true); sliderValue = new Text(); sliderValue.getStyleClass().setAll("slider-value"); animatedThumb = new StackPane(); animatedThumb.getStyleClass().add("animated-thumb"); animatedThumb.getChildren().add(sliderValue); animatedThumb.setMouseTransparent(true); animatedThumb.setScaleX(0); animatedThumb.setScaleY(0); getChildren().add(getChildren().indexOf(thumb), coloredTrack); getChildren().add(getChildren().indexOf(thumb), animatedThumb); getChildren().add(0, mouseHandlerPane); registerChangeListener(slider.valueFactoryProperty(), "VALUE_FACTORY"); initListeners(); }
Example 3
Source File: JFXRippler.java From JFoenix with Apache License 2.0 | 5 votes |
protected final void createRippleUI() { // create rippler panels rippler = new RippleGenerator(); ripplerPane = new StackPane(); ripplerPane.setMouseTransparent(true); ripplerPane.getChildren().add(rippler); getChildren().add(ripplerPane); }