当前位置: 首页>>代码示例>>Java>>正文


Java ObjectProperty类代码示例

本文整理汇总了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);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:26,代码来源:SpecificationTableDemo.java

示例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;
}
 
开发者ID:HanSolo,项目名称:SunburstChart,代码行数:17,代码来源:SunburstChart.java

示例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;
}
 
开发者ID:HanSolo,项目名称:SunburstChart,代码行数:17,代码来源:SunburstChart.java

示例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());
        }
    });
}
 
开发者ID:comtel2000,项目名称:mokka7,代码行数:21,代码来源:SessionManager.java

示例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();
}
 
开发者ID:Jibbow,项目名称:FastisFX,代码行数:17,代码来源:TimeAxis.java

示例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;
}
 
开发者ID:HanSolo,项目名称:sankeyplot,代码行数:12,代码来源:SankeyPlot.java

示例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;
}
 
开发者ID:HanSolo,项目名称:smoothcharts,代码行数:15,代码来源:SmoothedChart.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:12,代码来源:LegendItem.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:12,代码来源:LegendItem.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:12,代码来源:Axis.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:12,代码来源:NestedBarChart.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:12,代码来源:XYZChartItem.java

示例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;
}
 
开发者ID:HanSolo,项目名称:SunburstChart,代码行数:12,代码来源:SunburstChart.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:12,代码来源:CircularPlot.java

示例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;
}
 
开发者ID:Naoghuman,项目名称:ABC-List,代码行数:16,代码来源:CellUtils.java


注:本文中的javafx.beans.property.ObjectProperty类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。