@Test public void setOnClickWithNode() { final Button testButton = new Button("Test button"); final Label testLabel = new Label("Test label"); Buttons.setOnClickWithNode(testButton, testLabel, label -> label.setVisible(false)); withNodes(testButton, testLabel) .startWhen(() -> point(testButton).query() != null) .willDo(() -> clickOn(testButton, PRIMARY)) .andAwaitFor(() -> !testLabel.isVisible()); assertThat(testLabel.isVisible()).isFalse(); }
public static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action) { setOnClick(button, () -> action.accept(node)); }
Buttons { public static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action) { setOnClick(button, () -> action.accept(node)); } }
Buttons { public static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action) { setOnClick(button, () -> action.accept(node)); } private  Buttons(); }
Buttons { public static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action) { setOnClick(button, () -> action.accept(node)); } private  Buttons(); static void setOnClick(final Button button, final Runnable action); static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action); }
Buttons { public static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action) { setOnClick(button, () -> action.accept(node)); } private  Buttons(); static void setOnClick(final Button button, final Runnable action); static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action);  }