Class DefaultBindableModel

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(Binding toBind)
      Attach the binding to the model.
      <T extends java.lang.Enum<T> & ModelUpdate>
      void
      modelUpdated​(T... changed)
      Alert the bindings that the model has updated with the specified change types.
      void unbind​(Binding toUnbind)
      Removes the passed binding from this model.
      void unbindAll()
      Removes all bindings from this model.
      void update()
      Performs a model update of type ModelUpdates.UNSPECIFIED - convenience method for most models.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultBindableModel

        public DefaultBindableModel()
    • Method Detail

      • bind

        public void bind​(Binding toBind)
        Attach the binding to the model. Whenever the model is updated then the binding will be triggered.
        Specified by:
        bind in interface BindableModel
      • unbind

        public void unbind​(Binding toUnbind)
        Removes the passed binding from this model.
        Specified by:
        unbind in interface BindableModel
      • unbindAll

        public void unbindAll()
        Removes all bindings from this model.
      • modelUpdated

        public <T extends java.lang.Enum<T> & ModelUpdate> void modelUpdated​(T... changed)
        Alert the bindings that the model has updated with the specified change types.
        Specified by:
        modelUpdated in interface BindableModel
        Parameters:
        changed - list of change types to indicate
      • update

        public void update()
        Performs a model update of type ModelUpdates.UNSPECIFIED - convenience method for most models.