Package de.alpharogroup.generic.mvc.view
Class AbstractGenericView<C,COMP extends java.awt.Component>
- java.lang.Object
-
- de.alpharogroup.generic.mvc.view.AbstractGenericView<C,COMP>
-
- Type Parameters:
C- the generic type of the controllerCOMP- 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 Summary
Constructors Constructor Description AbstractGenericView(C controller)Instantiates a new abstract generic view.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description COMPgetComponent()Returns the fieldcomponent.CgetController()Returns the fieldcontroller.View<C,COMP>getParent()Gets the parent.View<?,?>getRootParentView()Gets the root parent view.booleanhasParent()Checks for parent.protected abstract voidinitialize()Initialize.voidsetComponent(COMP component)Sets the fieldcomponent.voidsetController(C controller)Sets the fieldcontroller.voidsetParent(View<C,COMP> parent)Sets the parent.
-
-
-
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 fieldcomponent.- Specified by:
getComponentin interfaceView<C,COMP extends java.awt.Component>- Returns:
- The field .
-
getController
public C getController()
Returns the fieldcontroller.- Specified by:
getControllerin interfaceView<C,COMP extends java.awt.Component>- Returns:
- The field .
-
getRootParentView
public View<?,?> getRootParentView()
Gets the root parent view.- Returns:
- the root parent view
-
hasParent
public boolean hasParent()
Checks for parent.
-
initialize
protected abstract void initialize()
Initialize.
-
setComponent
public void setComponent(COMP component)
Sets the fieldcomponent.- Specified by:
setComponentin interfaceView<C,COMP extends java.awt.Component>- Parameters:
component- Thecomponentto set.
-
setController
public void setController(C controller)
Sets the fieldcontroller.- Specified by:
setControllerin interfaceView<C,COMP extends java.awt.Component>- Parameters:
controller- Thecontrollerto set.
-
-