javafx.beans.value.WritableValue.getValue()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中javafx.beans.value.WritableValue.getValue()方法的一些代码示例,展示了WritableValue.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritableValue.getValue()方法的具体详情如下:
包路径:javafx.beans.value.WritableValue
类名称:WritableValue
方法名:getValue

WritableValue.getValue介绍

暂无

代码示例

代码示例来源: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 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 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

@Override
protected Object doGetValue() {
  return property.getValue();
}

代码示例来源: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

@Override
public int interpolate(int startValue, int endValue, double fraction) {
 return condition.getAsBoolean()
   ? interpolator.interpolate(startValue, endValue, fraction)
   : (int) target.getValue();
}

代码示例来源:origin: com.jfoenix/jfoenix

@Override
public long interpolate(long startValue, long endValue, double fraction) {
 return condition.getAsBoolean()
   ? interpolator.interpolate(startValue, endValue, fraction)
   : (long) target.getValue();
}

代码示例来源: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

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

代码示例来源:origin: com.jfoenix/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: com.google.code.validationframework/validationframework-experimental

@Override
  public void setValue(W w) {
    if (!ValueUtils.areEqual(wrapped.getValue(), w)) {
      wrapped.setValue(w);
    }
  }
}

代码示例来源: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 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: 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: eu.mihosoft.vrl.jcsg/jcsg

|| (prev.first && target.getValue().equals(prev.keyValue.getEndValue()))) {

相关文章