本文整理汇总了Java中javafx.beans.value.ObservableValue.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java ObservableValue.getValue方法的具体用法?Java ObservableValue.getValue怎么用?Java ObservableValue.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.beans.value.ObservableValue
的用法示例。
在下文中一共展示了ObservableValue.getValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public String _getValue() {
CheckBoxTreeTableCell cell = (CheckBoxTreeTableCell) node;
Callback selectedStateCallback = cell.getSelectedStateCallback();
String cbText;
if (selectedStateCallback != null) {
ObservableValue<Boolean> call = (ObservableValue<Boolean>) selectedStateCallback.call(cell.getItem());
int selection = call.getValue() ? 2 : 0;
cbText = JavaFXCheckBoxElement.states[selection];
} else {
Node cb = cell.getGraphic();
JavaFXElement comp = (JavaFXElement) JavaFXElementFactory.createElement(cb, driver, window);
cbText = comp._getValue();
}
String cellText = cell.getText();
if (cellText == null) {
cellText = "";
}
String text = cellText + ":" + cbText;
return text;
}
示例2: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@Override public String _getValue() {
@SuppressWarnings("rawtypes")
CheckBoxTreeCell cell = (CheckBoxTreeCell) node;
@SuppressWarnings("unchecked")
ObservableValue<Boolean> call = (ObservableValue<Boolean>) cell.getSelectedStateCallback().call(cell.getTreeItem());
String cbText;
if (call != null) {
int selection = call.getValue() ? 2 : 0;
cbText = JavaFXCheckBoxElement.states[selection];
} else {
Node cb = cell.getGraphic();
RFXComponent comp = getFinder().findRawRComponent(cb, null, null);
cbText = comp._getValue();
}
return cbText;
}
示例3: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public String _getValue() {
CheckBoxTreeTableCell cell = (CheckBoxTreeTableCell) node;
Callback selectedStateCallback = cell.getSelectedStateCallback();
String cbText;
if (selectedStateCallback != null) {
ObservableValue<Boolean> call = (ObservableValue<Boolean>) selectedStateCallback.call(cell.getItem());
int selection = call.getValue() ? 2 : 0;
cbText = JavaFXCheckBoxElement.states[selection];
} else {
Node cb = cell.getGraphic();
RFXComponent comp = getFinder().findRawRComponent(cb, null, null);
cbText = comp._getValue();
}
return cbText;
}
示例4: toBooleanBinding
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
public static BooleanBinding toBooleanBinding(final ObservableValue<Boolean> ov) {
if (ov == null) {
throw new NullPointerException("Operand cannot be null.");
}
return new BooleanBinding() {
{
super.bind(ov);
}
@Override
public void dispose() {
super.unbind(ov);
}
@Override
protected boolean computeValue() {
return ov.getValue() != Boolean.FALSE;
}
@Override
public ObservableList<?> getDependencies() {
return FXCollections.singletonObservableList(ov);
}
};
}
示例5: mapString
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
private static <T> StringBinding mapString(ObservableValue<T> v, Function<T, String> func) {
return new StringBinding() {
{
bind(v);
}
@Override
protected String computeValue() {
if (v.getValue() == null) {
return "";
} else {
return func.apply(v.getValue());
}
}
};
}
示例6: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@SuppressWarnings("unchecked") @Override public String _getValue() {
@SuppressWarnings("rawtypes")
CheckBoxListCell cell = (CheckBoxListCell) getComponent();
ObservableValue<Boolean> call = (ObservableValue<Boolean>) cell.getSelectedStateCallback().call(cell.getItem());
int selection = call.getValue() ? 2 : 0;
String text = cell.getText() + ":" + JavaFXCheckBoxElement.states[selection];
return text;
}
示例7: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@Override public String _getValue() {
@SuppressWarnings("rawtypes")
CheckBoxTreeCell cell = (CheckBoxTreeCell) getComponent();
@SuppressWarnings("unchecked")
ObservableValue<Boolean> call = (ObservableValue<Boolean>) cell.getSelectedStateCallback().call(cell.getTreeItem());
int selection = call.getValue() ? 2 : 0;
String cellText = cell.getText();
if (cellText == null) {
cellText = "";
}
String text = cellText + ":" + JavaFXCheckBoxElement.states[selection];
return text;
}
示例8: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public String _getValue() {
CheckBoxTableCell cell = (CheckBoxTableCell) node;
Callback selectedStateCallback = cell.getSelectedStateCallback();
String cbText;
if (selectedStateCallback != null) {
ObservableValue<Boolean> call = (ObservableValue<Boolean>) selectedStateCallback.call(cell.getItem());
int selection = call.getValue() ? 2 : 0;
cbText = JavaFXCheckBoxElement.states[selection];
} else {
Node cb = cell.getGraphic();
JavaFXElement comp = (JavaFXElement) JavaFXElementFactory.createElement(cb, driver, window);
cbText = comp._getValue();
}
String cellText = cell.getText();
if (cellText == null) {
cellText = "";
}
String text = cellText + ":" + cbText;
return text;
}
示例9: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public String _getValue() {
CheckBoxTableCell cell = (CheckBoxTableCell) node;
Callback selectedStateCallback = cell.getSelectedStateCallback();
String cbText;
if (selectedStateCallback != null) {
ObservableValue<Boolean> call = (ObservableValue<Boolean>) selectedStateCallback.call(cell.getItem());
int selection = call.getValue() ? 2 : 0;
cbText = JavaFXCheckBoxElement.states[selection];
} else {
Node cb = cell.getGraphic();
RFXComponent comp = getFinder().findRawRComponent(cb, null, null);
cbText = comp._getValue();
}
return cbText;
}
示例10: _getValue
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
@SuppressWarnings("unchecked") @Override public String _getValue() {
@SuppressWarnings("rawtypes")
CheckBoxListCell cell = (CheckBoxListCell) node;
ObservableValue<Boolean> call = (ObservableValue<Boolean>) cell.getSelectedStateCallback().call(cell.getItem());
String cbText;
if (call != null) {
int selection = call.getValue() ? 2 : 0;
cbText = JavaFXCheckBoxElement.states[selection];
} else {
Node cb = cell.getGraphic();
RFXComponent comp = getFinder().findRawRComponent(cb, null, null);
cbText = comp._getValue();
}
return cbText;
}
示例11: toIntegerBinding
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
public static IntegerBinding toIntegerBinding(ObservableValue<? extends Number> ov) {
return new IntegerBinding() {
{
bind(ov);
}
@Override
protected int computeValue() {
return ov.getValue() == null ? 0 : ov.getValue().intValue();
}
};
}
示例12: toDoubleBinding
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
public static DoubleBinding toDoubleBinding(ObservableValue<? extends Number> ov) {
return new DoubleBinding() {
{
bind(ov);
}
@Override
protected double computeValue() {
return ov.getValue() == null ? 0 : ov.getValue().doubleValue();
}
};
}
示例13: toLongBinding
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
public static LongBinding toLongBinding(ObservableValue<? extends Number> ov) {
return new LongBinding() {
{
bind(ov);
}
@Override
protected long computeValue() {
return ov.getValue() == null ? 0 : ov.getValue().longValue();
}
};
}
示例14: toFloatBinding
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
public static FloatBinding toFloatBinding(ObservableValue<? extends Number> ov) {
return new FloatBinding() {
{
bind(ov);
}
@Override
protected float computeValue() {
return ov.getValue() == null ? 0 : ov.getValue().floatValue();
}
};
}
示例15: toStringBinding
import javafx.beans.value.ObservableValue; //导入方法依赖的package包/类
public static StringBinding toStringBinding(ObservableValue<String> ov) {
return new StringBinding() {
{
bind(ov);
}
@Override
protected String computeValue() {
return ov.getValue();
}
};
}