Tabnine Logo
WritableValue
Code IndexAdd Tabnine to your IDE (free)

How to use
WritableValue
in
javafx.beans.value

Best Java code snippets using javafx.beans.value.WritableValue (Showing top 20 results out of 315)

origin: jfoenixadmin/JFoenix

public void applyEndValues() {
  for (JFXKeyValue keyValue : keyValues) {
    if (keyValue.isValid()) {
      final WritableValue target = keyValue.getTarget();
      if (target != null) {
        final Object endValue = keyValue.getEndValue();
        if (endValue != null && !target.getValue().equals(endValue)) {
          target.setValue(endValue);
        }
      }
    }
  }
}
origin: jfoenixadmin/JFoenix

public void applyCloseValues(){
  target.setValue(getCloseValueSupplier().get());
}
origin: jfoenixadmin/JFoenix

void reverse(double now) {
  currentDuration = duration - (currentDuration - now);
  // update initial values
  for (JFXKeyValue keyValue : keyValues) {
    final WritableValue target = keyValue.getTarget();
    if (target != null) {
      initialValuesMap.put(target, target.getValue());
      endValuesMap.put(target, keyValue.getEndValue());
    }
  }
}
origin: jfoenixadmin/JFoenix

public void applyOpenValues() {
  target.setValue(getOpenValueSupplier().get());
}
origin: jfoenixadmin/JFoenix

public void init() {
  finished = false;
  for (JFXKeyValue keyValue : keyValues) {
    if (keyValue.getTarget() != null) {
      // replaced putIfAbsent for mobile compatibility
      if (!initialValuesMap.containsKey(keyValue.getTarget())) {
        initialValuesMap.put(keyValue.getTarget(), keyValue.getTarget().getValue());
      }
      if (!endValuesMap.containsKey(keyValue.getTarget())) {
        endValuesMap.put(keyValue.getTarget(), keyValue.getEndValue());
      }
    }
  }
}
origin: jfoenixadmin/JFoenix

public void animate(double now) {
  if (now <= currentDuration) {
    for (JFXKeyValue keyValue : keyValues) {
      if (keyValue.isValid()) {
        final WritableValue target = keyValue.getTarget();
        final Object endValue = endValuesMap.get(target);
        if (endValue != null && target != null && !target.getValue().equals(endValue)) {
          target.setValue(keyValue.getInterpolator().interpolate(initialValuesMap.get(target), endValue, now / currentDuration));
        }
      }
    }
  } else {
    if (!finished) {
      finished = true;
      for (JFXKeyValue keyValue : keyValues) {
        if (keyValue.isValid()) {
          final WritableValue target = keyValue.getTarget();
          if (target != null) {
            // set updated end value instead of cached
            final Object endValue = keyValue.getEndValue();
            if (endValue != null) {
              target.setValue(endValue);
            }
          }
        }
      }
      currentDuration = duration;
    }
  }
}
origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.core.databinding

  @SuppressWarnings("unchecked")
  @Override
  protected void doSetValue(Object value) {
    property.setValue((T) value);
  }
};
origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.core.databinding

@Override
protected Object doGetValue() {
  return property.getValue();
}
origin: com.google.code.validationframework/validationframework-experimental

  @Override
  public void setValue(W w) {
    if (!ValueUtils.areEqual(wrapped.getValue(), w)) {
      wrapped.setValue(w);
    }
  }
}
origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.core.databinding

  @Override
  public void changed(ObservableValue<? extends E> observable, E oldValue, E newValue) {
    if (this.syncing) {
      return;
    }
    try {
      this.syncing = true;
      if (observable == fxObs) {
        dbObs.setValue(newValue);
      } else {
        fxObs.setValue(newValue);
      }
    } finally {
      this.syncing = false;
    }
  }
});
origin: com.jfoenix/jfoenix

@Override
public boolean interpolate(boolean startValue, boolean endValue, double fraction) {
 return condition.getAsBoolean()
   ? interpolator.interpolate(startValue, endValue, fraction)
   : (boolean) target.getValue();
}
origin: com.jfoenix/jfoenix

public void applyEndValues() {
  for (JFXKeyValue keyValue : keyValues) {
    if (keyValue.isValid()) {
      final WritableValue target = keyValue.getTarget();
      if (target != null) {
        final Object endValue = keyValue.getEndValue();
        if (endValue != null && !target.getValue().equals(endValue)) {
          target.setValue(endValue);
        }
      }
    }
  }
}
origin: com.jfoenix/jfoenix

public void applyOpenValues() {
  target.setValue(getOpenValueSupplier().get());
}
origin: com.jfoenix/jfoenix

@Override
public Object interpolate(Object startValue, Object endValue, double fraction) {
 return condition.getAsBoolean()
   ? interpolator.interpolate(startValue, endValue, fraction)
   : target.getValue();
}
origin: com.jfoenix/jfoenix

public void animate(double now) {
  if (now <= currentDuration) {
    for (JFXKeyValue keyValue : keyValues) {
      if (keyValue.isValid()) {
        final WritableValue target = keyValue.getTarget();
        final Object endValue = endValuesMap.get(target);
        if (endValue != null && target != null && !target.getValue().equals(endValue)) {
          target.setValue(keyValue.getInterpolator().interpolate(initialValuesMap.get(target), endValue, now / currentDuration));
        }
      }
    }
  } else {
    if (!finished) {
      finished = true;
      for (JFXKeyValue keyValue : keyValues) {
        if (keyValue.isValid()) {
          final WritableValue target = keyValue.getTarget();
          if (target != null) {
            // set updated end value instead of cached
            final Object endValue = keyValue.getEndValue();
            if (endValue != null) {
              target.setValue(endValue);
            }
          }
        }
      }
      currentDuration = duration;
    }
  }
}
origin: com.jfoenix/jfoenix

public void applyCloseValues(){
  target.setValue(getCloseValueSupplier().get());
}
origin: com.jfoenix/jfoenix

@Override
public double interpolate(double startValue, double endValue, double fraction) {
 return condition.getAsBoolean()
   ? interpolator.interpolate(startValue, endValue, fraction)
   : (double) target.getValue();
}
origin: com.canoo.dolphin-platform/dolphin-platform-client-javafx

  @Override
  public <T> Binding to(Property<T> dolphinProperty, Converter<? super T, ? extends S> converter) {
    Assert.requireNonNull(dolphinProperty, "dolphinProperty");
    Assert.requireNonNull(converter, "converter");
    final Subscription subscription = dolphinProperty.onChanged(event -> javaFxValue.setValue(converter.convert(dolphinProperty.get())));
    javaFxValue.setValue(converter.convert(dolphinProperty.get()));
    return () -> subscription.unsubscribe();
  }
}
origin: com.jfoenix/jfoenix

@Override
public int interpolate(int startValue, int endValue, double fraction) {
 return condition.getAsBoolean()
   ? interpolator.interpolate(startValue, endValue, fraction)
   : (int) target.getValue();
}
origin: dev.rico/rico-remoting-client-javafx

  @Override
  public <T> Binding to(final Property<T> remotingProperty, final Converter<? super T, ? extends S> converter) {
    Assert.requireNonNull(remotingProperty, "remotingProperty");
    Assert.requireNonNull(converter, "converter");
    final Subscription subscription = remotingProperty.onChanged(event -> javaFxValue.setValue(converter.convert(remotingProperty.get())));
    javaFxValue.setValue(converter.convert(remotingProperty.get()));
    return () -> subscription.unsubscribe();
  }
}
javafx.beans.valueWritableValue

Most used methods

  • setValue
  • getValue

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JLabel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now