Class AbstractGenericView<C,​COMP extends java.awt.Component>

  • Type Parameters:
    C - the generic type of the controller
    COMP - the generic type of the component
    All Implemented Interfaces:
    View<C,​COMP>
    Direct Known Subclasses:
    KeypadView, LoginView

    public abstract class AbstractGenericView<C,​COMP extends java.awt.Component>
    extends java.lang.Object
    implements View<C,​COMP>
    The class AbstractGenericView.
    • Constructor Detail

      • AbstractGenericView

        public AbstractGenericView​(C controller)
        Instantiates a new abstract generic view.
        Parameters:
        controller - the controller
    • Method Detail

      • getComponent

        public COMP getComponent()
        Returns the field component.
        Specified by:
        getComponent in interface View<C,​COMP extends java.awt.Component>
        Returns:
        The field .
      • getController

        public C getController()
        Returns the field controller.
        Specified by:
        getController in interface View<C,​COMP extends java.awt.Component>
        Returns:
        The field .
      • getParent

        public View<C,​COMP> getParent()
        Gets the parent.
        Specified by:
        getParent in interface View<C,​COMP extends java.awt.Component>
        Returns:
        the parent
      • getRootParentView

        public View<?,​?> getRootParentView()
        Gets the root parent view.
        Returns:
        the root parent view
      • hasParent

        public boolean hasParent()
        Checks for parent.
        Specified by:
        hasParent in interface View<C,​COMP extends java.awt.Component>
        Returns:
        true, if successful
      • initialize

        protected abstract void initialize()
        Initialize.
      • setComponent

        public void setComponent​(COMP component)
        Sets the field component.
        Specified by:
        setComponent in interface View<C,​COMP extends java.awt.Component>
        Parameters:
        component - The component to set.
      • setController

        public void setController​(C controller)
        Sets the field controller.
        Specified by:
        setController in interface View<C,​COMP extends java.awt.Component>
        Parameters:
        controller - The controller to set.
      • setParent

        public void setParent​(View<C,​COMP> parent)
        Sets the parent.
        Parameters:
        parent - the parent