public class ViewController extends Controller
A controller class that handles application logic for a view. In most cases a FormController will be sufficient to handle the logic for a form. Some more complex views may require their own controllers as well, in which case you might use a ViewController to handle Action dispatch on the view.
Controllers form a hierarchy similar to UI components. E.g. A controller has a parent controller, and events that are not
consumed by the child will propagate to the parent. See FormController
for a more details discussion of the Controller hierarchy.
Modifier and Type | Class and Description |
---|---|
static class |
ViewController.DidSetViewEvent
Event that is fired when a "view" is set in a view controller.
|
static class |
ViewController.DidUnSetViewEvent
Event that is fired when a "view" is unset from a view controller.
|
Constructor and Description |
---|
ViewController(Controller parent) |
Modifier and Type | Method and Description |
---|---|
void |
deinitialize()
Callback called when the view is deinitialized (i.e.
|
Component |
getView()
Gets the view associated with this controller.
|
static ViewController |
getViewController(Component cmp) |
void |
initController()
Callback called when the view is initialized (i.e.
|
void |
setView(Component view)
Sets the view associated with this controller.
|
actionPerformed, addActionListener, addEventListener, addLookup, createViewNode, dispatchEvent, getApplicationController, getFormController, getParent, getSectionController, getViewNode, lookup, removeActionListener, removeEventListener, setParent
public ViewController(Controller parent)
public void setView(Component view)
Sets the view associated with this controller.
view
- public static ViewController getViewController(Component cmp)
public Component getView()
Gets the view associated with this controller.
public void initController()
Callback called when the view is initialized (i.e. made visible)
public void deinitialize()
Callback called when the view is deinitialized (i.e. removed from display hierarchy).
Copyright © 2021. All Rights Reserved.