當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。