本文整理汇总了Java中javafx.beans.property.ObjectProperty类的典型用法代码示例。如果您正苦于以下问题:Java ObjectProperty类的具体用法?Java ObjectProperty怎么用?Java ObjectProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectProperty类属于javafx.beans.property包,在下文中一共展示了ObjectProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: simpleTableScene
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
private List<Node> simpleTableScene() {
List<Type> types = Arrays.asList(TypeInt.INT, TypeBool.BOOL);
List<CodeIoVariable> codevars = Arrays.asList(
new CodeIoVariable(VariableCategory.INPUT, "BOOL", "A"),
new CodeIoVariable(VariableCategory.INPUT, "INT", "B"),
new CodeIoVariable(VariableCategory.OUTPUT, "INT", "C")
);
ObjectProperty<List<Type>> typeContext = new SimpleObjectProperty<>(types);
ObjectProperty<List<CodeIoVariable>> codeIoVariables = new SimpleObjectProperty<>(codevars);
FreeVariableList freeVariableList = new FreeVariableList(new ArrayList<>());
FreeVariableListValidator freevarValidator = new FreeVariableListValidator(typeContext, freeVariableList);
SpecificationTableController table = new SpecificationTableController(
new GlobalConfig(),
typeContext,
codeIoVariables,
freevarValidator.validFreeVariablesProperty(),
new HybridSpecification(freeVariableList, true));
Pane extractedTablePane = createExtractedTableTextArea(
table.getHybridSpecification(),
table.getValidator());
return Arrays.asList(table.getView(), extractedTablePane);
}
示例2: brightTextColorProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> brightTextColorProperty() {
if (null == brightTextColor) {
brightTextColor = new ObjectPropertyBase<Color>(_brightTextColor) {
@Override protected void invalidated() {
if (isAutoTextColor()) {
adjustTextColors();
redraw();
}
}
@Override public Object getBean() { return SunburstChart.this; }
@Override public String getName() { return "brightTextColor"; }
};
_brightTextColor = null;
}
return brightTextColor;
}
示例3: darkTextColorProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> darkTextColorProperty() {
if (null == darkTextColor) {
darkTextColor = new ObjectPropertyBase<Color>(_darkTextColor) {
@Override protected void invalidated() {
if (isAutoTextColor()) {
adjustTextColors();
redraw();
}
}
@Override public Object getBean() { return SunburstChart.this; }
@Override public String getName() { return "darkTextColor"; }
};
_darkTextColor = null;
}
return darkTextColor;
}
示例4: bind
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void bind(final ObjectProperty<?> property, final String propertyName, Class<?> type) {
String value = props.getProperty(propertyName);
if (value != null) {
if (type.getName().equals(Color.class.getName())) {
((ObjectProperty<Color>) property).set(Color.valueOf(value));
} else if (type.getName().equals(String.class.getName())) {
((ObjectProperty<String>) property).set(value);
} else {
((ObjectProperty<Object>) property).set(value);
}
}
property.addListener(new InvalidationListener() {
@Override
public void invalidated(Observable o) {
props.setProperty(propertyName, property.getValue().toString());
}
});
}
示例5: TimeAxis
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public TimeAxis(ObjectProperty<LocalTime> timeStart, ObjectProperty<LocalTime> timeEnd,
ObjectProperty<Duration> timeSteps, DateTimeFormatter formatter) {
this.timeStartProperty = timeStart;
this.timeEndProperty = timeEnd;
this.timeStepsProperty = timeSteps;
this.formatter = formatter;
this.horizontal = false;
this.getStyleClass().add("time-axis");
getTimeStartProperty().addListener(observable -> createLabels());
getTimeEndProperty().addListener(observable -> createLabels());
getTimeStepsProperty().addListener(observable -> createLabels());
createLabels();
}
示例6: streamColorProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> streamColorProperty() {
if (null == streamColor) {
streamColor = new ObjectPropertyBase<Color>(_streamColor) {
@Override protected void invalidated() { redraw(); }
@Override public Object getBean() { return SankeyPlot.this; }
@Override public String getName() { return "streamColor"; }
};
_streamColor = null;
}
return streamColor;
}
示例7: selectorFillColorProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> selectorFillColorProperty() {
if (null == selectorFillColor) {
selectorFillColor = new ObjectPropertyBase<Color>(_selectorFillColor) {
@Override protected void invalidated() {
selector.setFill(get());
layoutPlotChildren();
}
@Override public Object getBean() { return SmoothedChart.this; }
@Override public String getName() { return "selectorFillColor"; }
};
_selectorFillColor = null;
}
return selectorFillColor;
}
示例8: textColorProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> textColorProperty() {
if (null == textColor) {
textColor = new ObjectPropertyBase<Color>(_textColor) {
@Override protected void invalidated() { redraw(); }
@Override public Object getBean() { return LegendItem.this; }
@Override public String getName() { return "textColor"; }
};
_textColor = null;
}
return textColor;
}
示例9: symbolStrokeProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> symbolStrokeProperty() {
if (null == symbolStroke) {
symbolStroke = new ObjectPropertyBase<Color>(_symbolStroke) {
@Override protected void invalidated() { redraw(); }
@Override public Object getBean() { return LegendItem.this; }
@Override public String getName() { return "symbolStroke"; }
};
_symbolStroke = null;
}
return symbolStroke;
}
示例10: typeProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<AxisType> typeProperty() {
if (null == type) {
type = new ObjectPropertyBase<AxisType>(_type) {
@Override protected void invalidated() { redraw(); }
@Override public Object getBean() { return Axis.this; }
@Override public String getName() { return "axisType"; }
};
_type = null;
}
return type;
}
示例11: orderProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Order> orderProperty() {
if (null == order) {
order = new ObjectPropertyBase<Order>(_order) {
@Override protected void invalidated() { redraw(); }
@Override public Object getBean() { return NestedBarChart.this; }
@Override public String getName() { return "order"; }
};
_order = null;
}
return order;
}
示例12: fillProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> fillProperty() {
if (null == fill) {
fill = new ObjectPropertyBase<Color>(_fill) {
@Override protected void invalidated() { fireItemEvent(ITEM_EVENT); }
@Override public Object getBean() { return XYZChartItem.this; }
@Override public String getName() { return "fill"; }
};
_fill = null;
}
return fill;
}
示例13: textOrientationProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<TextOrientation> textOrientationProperty() {
if (null == textOrientation) {
textOrientation = new ObjectPropertyBase<TextOrientation>(_textOrientation) {
@Override protected void invalidated() { redraw(); }
@Override public Object getBean() { return SunburstChart.this; }
@Override public String getName() { return "textOrientation"; }
};
_textOrientation = null;
}
return textOrientation;
}
示例14: tickMarkColorProperty
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
public ObjectProperty<Color> tickMarkColorProperty() {
if (null == tickMarkColor) {
tickMarkColor = new ObjectPropertyBase<Color>(_tickMarkColor) {
@Override protected void invalidated() { redraw(); }
@Override public Object getBean() { return CircularPlot.this; }
@Override public String getName() { return "tickMarkColor"; }
};
_tickMarkColor = null;
}
return tickMarkColor;
}
示例15: createChoiceBox
import javafx.beans.property.ObjectProperty; //导入依赖的package包/类
static <T> ChoiceBox<T> createChoiceBox(
final Cell<T> cell,
final ObservableList<T> items,
final ObjectProperty<StringConverter<T>> converter
) {
final ChoiceBox<T> choiceBox = new ChoiceBox<>(items);
choiceBox.setMaxWidth(Double.MAX_VALUE);
choiceBox.converterProperty().bind(converter);
choiceBox.getSelectionModel().selectedItemProperty().addListener((ov, oldValue, newValue) -> {
if (cell.isEditing()) {
cell.commitEdit(newValue);
}
});
return choiceBox;
}