Difference between SimpleStringProperty and StringProperty

前端 未结 1 1888
花落未央
花落未央 2020-12-17 15:42

I am working with JavaFx TableView and found there are some classes to use a TableView for example SimpleStringProperty, StringProperty, SimpleBooleanProperty and BooleanPro

相关标签:
1条回答
  • 2020-12-17 15:59

    StringProperty is the abstract base class for observable string properties, SimpleStringProperty is a concrete implementation.

    The rule is:

    1. Show StringProperty in your API
    2. Use SimpleStringProperty as the concrete implementation in your code

    You sometimes see JavaFX code itself createing anonymous inner classes from StringPropertyBase and the reason for this is that it is a bit more effecient memorywise but nothing you normally have to bother yourself.

    0 讨论(0)
提交回复
热议问题