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 COMP
getComponent()
Returns the fieldcomponent
.C
getController()
Returns the fieldcontroller
.View<C,COMP>
getParent()
Gets the parent.View<?,?>
getRootParentView()
Gets the root parent view.boolean
hasParent()
Checks for parent.protected abstract void
initialize()
Initialize.void
setComponent(COMP component)
Sets the fieldcomponent
.void
setController(C controller)
Sets the fieldcontroller
.void
setParent(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:
getComponent
in interfaceView<C,COMP extends java.awt.Component>
- Returns:
- The field .
-
getController
public C getController()
Returns the fieldcontroller
.- Specified by:
getController
in 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:
setComponent
in interfaceView<C,COMP extends java.awt.Component>
- Parameters:
component
- Thecomponent
to set.
-
setController
public void setController(C controller)
Sets the fieldcontroller
.- Specified by:
setController
in interfaceView<C,COMP extends java.awt.Component>
- Parameters:
controller
- Thecontroller
to set.
-
-