Class WindowInstances


  • public final class WindowInstances
    extends java.lang.Object
    Amount of window instances that can exist at the time of a view managed by the ApplicationContext.
    Managed by identifier means that there can be n instances but they correspond to an identifier so calling them again will force the window in the foreground if a window with the called identifier is already loaded.
    • Field Detail

      • UNLIMITED

        public static final WindowInstances UNLIMITED
        An unlimited amount of windows with the view can exist.
        These are not managed by an identifier.
      • UNLIMITED_MANAGED_BY_IDENTIFIER

        public static final WindowInstances UNLIMITED_MANAGED_BY_IDENTIFIER
        An unlimited amount of windows with the view can exist.
        These are managed by an identifier.
      • ONCE_AT_A_TIME

        public static final WindowInstances ONCE_AT_A_TIME
        Only one window with the view can exist at the time.
        If the ApplicationContext receives a load call the window referencing the view will be forced in the foreground.
        These are not managed by an identifier.
    • Method Detail

      • of

        public static WindowInstances of​(int possibleInstances)
        Create a WindowInstances object that is not managed by an identifier.
        -1 means unlimited instances in this context.
        Parameters:
        possibleInstances - number of possible instances.
        Returns:
        possible window instances object.
        Throws:
        java.lang.IllegalArgumentException - if not -1 or > 0
      • ofIdentifierManaged

        public static WindowInstances ofIdentifierManaged​(int possibleInstances)
        Create a WindowInstances object that is managed by an identifier.
        -1 means unlimited instances in this context.
        Parameters:
        possibleInstances - number of possible instances.
        Returns:
        possible window instances object.
        Throws:
        java.lang.IllegalArgumentException - if not -1 or > 1
      • getPossibleInstances

        public int getPossibleInstances()
        Returns:
        amount of possible instances.
        -1 means unlimited
      • isIdentifierManaged

        public boolean isIdentifierManaged()
        Returns:
        true if managed by an identifier
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object