public boolean getHasErrors() { return hasErrors.get(); }
public class MyController { @FXML private Node node1 ; @FXML private Node node2 ; private final ReadOnlyBooleanWrapper injected = new ReadOnlyBooleanWrapper(this, "injected", false); public boolean isInjected() { return injected.get(); } public ReadOnlyBooleanProperty injectedProperty() { return injected.getReadOnlyProperty(); } public void initialize() { injected.set(true); // other initialization... } } // elsewhere... FXMLLoader loader = new FXMLLoader(getClass().getResource(...)); MyController controller = new MyController(); loader.setController(controller); controller.injectedProperty().addListener( /* will be invoked after injection....*/ ); Parent root = (Parent) loader.load();
public final boolean isArmed() { return armed.get(); }
public final boolean isDirty() { return dirty.get(); } public final ReadOnlyBooleanProperty dirtyProperty() { return dirty.getReadOnlyProperty(); }
/** * this method will update the source control after evaluating the validation condition */ protected void onEval() { Node control = getSrcControl(); if (hasErrors.get()) { control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, true); if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if (controlTooltip != null && !controlTooltip.getStyleClass().contains("error-tooltip")) { tooltip = ((Control) control).getTooltip(); } errorTooltip.setText(getMessage()); ((Control) control).setTooltip(errorTooltip); } } else { if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if ((controlTooltip != null && controlTooltip.getStyleClass().contains("error-tooltip")) || (controlTooltip == null && tooltip != null)) { ((Control) control).setTooltip(tooltip); } tooltip = null; } control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, false); } }
return selected.get();
/** * Returns true if an action invocation is running (see {@link #invoke(String, Param...)}) * @return true if an action invocation is running */ public boolean isActionInProcess() { return actionInProcess.get(); }
/** * Entity is "active" from the moment it is added to the world * and until it is removed from the world. * * @return true if entity is active, else false */ public final boolean isActive() { return active.get(); }
/** * Returns true if an action invocation is running (see {@link #invoke(String, Param...)}) * * @return true if an action invocation is running */ public boolean isActionInProcess() { return actionInProcess.get(); }
/** * * @return whether the notification bar is currently showing. */ public final boolean isShowing() { return showing.get(); }
@Override public boolean isChangeable() { if (changeableProperty != null) { return changeableProperty.get(); } return changeable; }
/** * Entity is "active" from the moment it is added to the world * and until it is removed from the world. * * @return true if entity is active, else false */ public final boolean isActive() { return active.get(); }
public boolean isConnectionActive() { return connectionActive.get(); }
public final boolean isExpanded() { return expandedProperty.get(); }
public boolean getHasErrors() { return hasErrors.get(); }
public final boolean isExpanded() { return expandedProperty.get(); }
public final boolean isExpanded() { return expandedProperty.get(); }
/** * Register the title bar which is the area used to drag the window around * * @param node * the node */ protected void registerTitleBar(Node node) { node.setOnMousePressed(event -> { this.mouseDragDeltaX = event.getSceneX(); this.mouseDragDeltaY = event.getSceneY(); }); node.setOnMouseDragged(event -> { getStage().setX(event.getScreenX() - this.mouseDragDeltaX); getStage().setY(event.getScreenY() - this.mouseDragDeltaY); }); node.setOnMouseClicked(e -> { if (e.getClickCount() > 1) { if (this.maximized.get()) { restore(); } else { maximize(); } } }); }
/** * Register the title bar which is the area used to drag the window around * * @param node * the node */ protected void registerTitleBar(Node node) { node.setOnMousePressed(event -> { this.mouseDragDeltaX = event.getSceneX(); this.mouseDragDeltaY = event.getSceneY(); }); node.setOnMouseDragged(event -> { getStage().setX(event.getScreenX() - this.mouseDragDeltaX); getStage().setY(event.getScreenY() - this.mouseDragDeltaY); }); node.setOnMouseClicked(e -> { if (e.getClickCount() > 1) { if (this.maximized.get()) { restore(); } else { maximize(); } } }); }
/** * this method will update the source control after evaluating the validation condition */ protected void onEval() { Node control = getSrcControl(); if (hasErrors.get()) { control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, true); if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if (controlTooltip != null && !controlTooltip.getStyleClass().contains("error-tooltip")) { tooltip = ((Control) control).getTooltip(); } errorTooltip.setText(getMessage()); ((Control) control).setTooltip(errorTooltip); } } else { if (control instanceof Control) { Tooltip controlTooltip = ((Control) control).getTooltip(); if ((controlTooltip != null && controlTooltip.getStyleClass().contains("error-tooltip")) || (controlTooltip == null && tooltip != null)) { ((Control) control).setTooltip(tooltip); } tooltip = null; } control.pseudoClassStateChanged(PSEUDO_CLASS_ERROR, false); } }