Interface PresentationModel

  • All Superinterfaces:
    As

    public interface PresentationModel
    extends As
    TODO: As the NetBeans Node, it should allow children, have event listeners for children added/removed/changed. This class so becomes the true M in MVC.
    Author:
    Fabrizio Giudici
    Stereotype:
    Role
    • Method Detail

      • dispose

        void dispose()
        Disposes this object.
      • addPropertyChangeListener

        void addPropertyChangeListener​(@Nonnull
                                       java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener.
        Parameters:
        listener - the listener
      • addPropertyChangeListener

        void addPropertyChangeListener​(@Nonnull
                                       java.lang.String propertyName,
                                       @Nonnull
                                       java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener for the given property.
        Parameters:
        propertyName - the name of the property
        listener - the listener
      • removePropertyChangeListener

        void removePropertyChangeListener​(@Nonnull
                                          java.beans.PropertyChangeListener listener)
        Removes a PropertyChangeListener.
        Parameters:
        listener - the listener
      • removePropertyChangeListener

        void removePropertyChangeListener​(@Nonnull
                                          java.lang.String propertyName,
                                          @Nonnull
                                          java.beans.PropertyChangeListener listener)
        Removes a PropertyChangeListener for the given property.
        Parameters:
        propertyName - the name of the property
        listener - the listener
      • hasListeners

        boolean hasListeners​(@Nonnull
                             java.lang.String propertyName)
        Checks whether the given property has been bound to listeners.
        Parameters:
        propertyName - the name of the property
        Returns:
        true if the property is bound
      • getPropertyChangeListeners

        @Nonnull
        java.beans.PropertyChangeListener[] getPropertyChangeListeners()
        Returns all the bound PropertyChangeListeners.
        Returns:
        the listeners
      • getPropertyChangeListeners

        @Nonnull
        java.beans.PropertyChangeListener[] getPropertyChangeListeners​(@Nonnull
                                                                       java.lang.String propertyName)
        Returns the bound PropertyChangeListeners for the given property.
        Parameters:
        propertyName - the name of the property
        Returns:
        the listeners
      • of

        @Nonnull
        static PresentationModel of​(@Nonnull
                                    java.lang.Object owner)
        Creates an instance given an owner and no roles.
        Parameters:
        owner - the owner
        Returns:
        the new instance
        Since:
        3.2-ALPHA-3
      • of

        @Nonnull
        static PresentationModel of​(@Nonnull
                                    java.lang.Object owner,
                                    @Nonnull
                                    java.lang.Object role)
        Creates an instance given an owner and a single role.
        Parameters:
        owner - the owner
        role - the role (or a RoleFactory)
        Returns:
        the new instance
        Since:
        3.2-ALPHA-3
      • of

        @Nonnull
        static PresentationModel of​(@Nonnull
                                    java.lang.Object owner,
                                    @Nonnull
                                    java.util.Collection<java.lang.Object> roles)
        Creates an instance given an owner and multiple roles.
        Parameters:
        owner - the owner
        roles - roles or RoleFactory instances
        Returns:
        the new instance
        Since:
        3.2-ALPHA-1, 3.2-ALPHA-3 (refactored)
      • empty

        @Nonnull
        static PresentationModel empty()
        Returns an empty instance (no roles, with the exception of a dummy Displayable).
        Returns:
        the empty instance
        Since:
        3.2-ALPHA-3
      • ofMaybePresentable

        @Nonnull
        static PresentationModel ofMaybePresentable​(@Nonnull
                                                    As owner,
                                                    @Nonnull
                                                    java.util.Collection<java.lang.Object> roles)
        Creates an instance from an owner which might have the Presentable role. If it is present, it is called to create the PresentationModel; otherwise a default one is created. Additional roles are added.
        Parameters:
        owner - the owner
        roles - roles or RoleFactory instances
        Returns:
        the new instance
        Since:
        3.2-ALPHA-8
      • ofMaybePresentable

        @Nonnull
        static PresentationModel ofMaybePresentable​(@Nonnull
                                                    As owner)
        Creates an instance from an owner which might have the Presentable role. If it is present, it is called to create the PresentationModel; otherwise a default one is created.
        Parameters:
        owner - the owner
        Returns:
        the new instance
        Since:
        3.2-ALPHA-8