【问题标题】:Is there any SimpleLOngProperty in javafx if not then what to do?javafx中是否有任何SimpleLongProperty,如果没有,那该怎么办?
【发布时间】:2013-06-22 04:43:11
【问题描述】:

我正在与javafx2.2 合作。我正在使用tableview 创建一个表,我的数据属于不同类型。 int,string,float,double 有SimpleIntegerProperty, SimpleFloatProperty, SimpleDoubleProperty, SimpleStringproperty

但是对于 long 、 char 、 TimeStamp 和 float 序列该怎么办。

我需要使用这些因为排序性能见this

谢谢

【问题讨论】:

    标签: java javafx-2 tableview


    【解决方案1】:

    你可以像这样创建 ObjectProperty

    ObjectProperty<Float> floatObjectProperty = new SimpleObjectProperty<Float>();
    ObjectProperty<Long> longObjectProperty = new SimpleObjectProperty<Long>();
    ObjectProperty<Timestamp> timestampObjectProperty = new SimpleObjectProperty<Timestamp>();
    

    并像使用任何其他属性一样使用它

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-17
      • 2020-12-14
      • 2017-12-20
      • 1970-01-01
      • 1970-01-01
      • 2017-01-20
      相关资源
      最近更新 更多