|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.activity.main.ControllerGroup
public final class ControllerGroup
Groups given controllers together and allows group operations over them.
| Constructor Summary | |
|---|---|
ControllerGroup()
Creates new group controller. |
|
| Method Summary | ||
|---|---|---|
void |
add(AbstractController controller,
ActionsEnum action)
Registers a controller to this group. |
|
void |
destroy()
Destroys all controllers. |
|
void |
flipVisibility(AbstractController controller,
Boolean visibility)
Hides all other controllers and flips the visibility of given controller. |
|
AbstractController |
get(int index)
Returns controller present at given index. |
|
ActionsEnum |
getActionForController(AbstractController controller)
Returns action which triggers visibility of this controller. |
|
|
getController(Class<T> clazz)
Returns first controller with given class (or subclass of given class). |
|
AbstractController |
getVisibleController()
Returns the visible controller. |
|
int |
getVisibleControllerIndex()
Returns the visible controller. |
|
void |
registerAndUpdate(SimpleBus bus)
Registers all controllers from given bus. |
|
void |
unregister(SimpleBus bus)
Unregisters all controllers from given bus. |
|
void |
zoom(boolean zoom)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ControllerGroup()
| Method Detail |
|---|
public void add(AbstractController controller,
ActionsEnum action)
controller - the controller to register.action - action which triggers visibility of this controller.public void destroy()
public void flipVisibility(AbstractController controller,
Boolean visibility)
controller - the controller to show/hide. If null then all
controllers are hidden.visibility - set this visibility for the controller. If null
then the visibility is flipped.public int getVisibleControllerIndex()
-1 if no such
controller exists.public AbstractController getVisibleController()
-1 if no such
controller exists.public ActionsEnum getActionForController(AbstractController controller)
controller - the controller, may be null.
null if no such controller exists or
it has no action attached.public void unregister(SimpleBus bus)
bus - the bus to unregister controllers from.public void registerAndUpdate(SimpleBus bus)
AbstractController.update(sk.baka.ambient.commons.Interval) on
all controllers.
bus - the bus to unregister controllers from.public AbstractController get(int index)
null if
the index is invalid.
index - the index
null.public <T extends AbstractController> T getController(Class<T> clazz)
T - the controller typeclazz - the controller class
null controller instance.
IllegalArgumentException - if no such controller exists.public void zoom(boolean zoom)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||