M
- The class type of the model of the viewN
- Any object that is a JavaFx2 NodeC
- The class type of the controller of the viewpublic abstract class AbstractView<M extends Model,N extends Node,C extends Controller<?,?>> extends Object implements View<M,N,C>
Constructor and Description |
---|
AbstractView(M model)
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected C |
buildController()
Build the view controller.
|
protected N |
buildRootNode()
Build the root node.
|
C |
controller()
Return the view controller.
|
Pane |
errorNode()
Return the error javafx node.
|
protected void |
finalize() |
abstract void |
hide()
Handle custom tasks to do when the view is closed or hidden.
|
protected void |
initInternalView()
Initialize the view.
|
protected abstract void |
initView()
Custom method used to initialize components.
|
M |
model()
Return the view model.
|
N |
node()
Return the view root node.
|
Pane |
pane()
Return the view's pane that hold the root node.
|
void |
prepare()
Prepare the view by creating all visual nodes.
|
abstract void |
reload()
Handle custom tasks to do at each rendering of the view (re-display).
|
abstract void |
start()
Handle custom tasks to do the first time after creation of the view.
|
public AbstractView(M model)
model
- the dedicated view modelpublic void prepare() throws CoreException
prepare
in interface View<M extends Model,N extends Node,C extends Controller<?,?>>
CoreException
- if the preparation failspublic abstract void start()
public abstract void reload()
public abstract void hide()
protected N buildRootNode() throws CoreException
CoreException
- if introspection failsprotected C buildController() throws CoreException
CoreException
- if introspection failspublic final C controller()
controller
in interface View<M extends Model,N extends Node,C extends Controller<?,?>>
protected final void initInternalView()
initView()
method to setup your view.protected abstract void initView()
Copyright © 2011–2016 JRebirth OSS. All rights reserved.