/** * Returns whether this feature is enabled for the control. * * @return true if enabled */ protected boolean isEnabled() { return condition.getAsBoolean() && control.getProperties().containsKey(ENABLED); }
@Override public boolean containsKey(Object key) { return getDelegate().containsKey(key); }
/** * Deregisters the receiver for the given adress. * @param address the adress * @param receiver the receiver */ public void removeReceiver(String address, Consumer<Event> receiver) { if (asyncConsumers.containsKey(address)) { asyncConsumers.get(address).remove(receiver); } if (consumers.containsKey(address)) { consumers.get(address).remove(receiver); } }
/** * Registers a receiver for all events that will be send to the given <tt>adress</tt>. The receiver can get * the events on the JavaFX application thread or on a background thread. * @param address the adress * @param receiver the receiver * @param type defines if the receiver will get the events on the JavaFX application thread or on * a background thread. */ public void addReceiver(String address, Consumer<Event> receiver, ThreadType type) { if (type.equals(ThreadType.EXECUTOR)) { if (!asyncConsumers.containsKey(address)) { asyncConsumers.put(address, FXCollections.observableArrayList()); } asyncConsumers.get(address).add(receiver); } else { if (!consumers.containsKey(address)) { consumers.put(address, FXCollections.observableArrayList()); } consumers.get(address).add(receiver); } }
private void configureMnemonicTarget( Node target ){ if( target.getProperties().containsKey("mnemonicTarget") ){ getLabel().setMnemonicParsing(true); getLabel().setLabelFor(target); } }
private static void updateManagedProperty(Node n, DeviceType type) { // first time we've set this invisible => store the preset if (!n.getProperties().containsKey(PROP_MANAGED_STATE)) { n.getProperties().put(PROP_MANAGED_STATE, n.isManaged()); } // don't track changes through this n.managedProperty().removeListener(MANAGED_LISTENER); // If it's visible we use the stored value for "managed" property n.setManaged(n.isVisible() ? (Boolean) n.getProperties().get(PROP_MANAGED_STATE) : false); // need to track changes through API n.managedProperty().addListener(MANAGED_LISTENER); }