Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091409

Add getProperties() method to ObjectProperty class

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • None
    • javafx

      The Node has the following code which allows user to add an arbitrary name-value pair to Node. It proved to be very useful. I hope the ObjectProperty could have this method so that we can add name-value pair to an ObjectProperty. Personally I don't care if the properties will be included in persistence, toString, hashCode, equal.

          // A map containing a set of properties for this node
          private ObservableMap<Object, Object> properties;

          /**
            * Returns an observable map of properties on this node for use primarily
            * by application developers.
            *
            * @return an observable map of properties on this node for use primarily
            * by application developers
            */
           public final ObservableMap<Object, Object> getProperties() {
              if (properties == null) {
                  properties = FXCollections.observableMap(new HashMap<Object, Object>());
              }
              return properties;
          }
          

            Unassigned Unassigned
            dqiaojfx David Qiao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported: