use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUISelectBoxMultipleController method determineSelectBoxMultipleOptionControllers.
/**
* Determine select box option controllers
*/
private void determineSelectBoxMultipleOptionControllers() {
selectBoxMultipleOptionControllers.clear();
((GUIParentNode) node).getChildControllerNodes(childControllerNodes);
for (int i = 0; i < childControllerNodes.size(); i++) {
GUINode childControllerNode = childControllerNodes.get(i);
GUINodeController childController = childControllerNode.getController();
if (childController instanceof GUISelectBoxMultipleOptionController) {
selectBoxMultipleOptionControllers.add((GUISelectBoxMultipleOptionController) childController);
}
}
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUISelectBoxMultipleController method unfocus.
/**
* Unfocus all nodes
*/
protected void unfocus() {
((GUIParentNode) node).getChildControllerNodes(childControllerNodes);
for (int i = 0; i < childControllerNodes.size(); i++) {
GUINode childControllerNode = childControllerNodes.get(i);
GUINodeController childController = childControllerNode.getController();
if (childController instanceof GUISelectBoxMultipleOptionController) {
((GUISelectBoxMultipleOptionController) childController).unfocus();
}
}
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUISelectBoxController method determineSelectBoxOptionControllers.
/**
* Determine select box option controllers
*/
private void determineSelectBoxOptionControllers() {
selectBoxOptionControllers.clear();
((GUIParentNode) node).getChildControllerNodes(childControllerNodes);
for (int i = 0; i < childControllerNodes.size(); i++) {
GUINode childControllerNode = childControllerNodes.get(i);
GUINodeController childController = childControllerNode.getController();
if (childController instanceof GUISelectBoxOptionController) {
selectBoxOptionControllers.add((GUISelectBoxOptionController) childController);
}
}
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUI method handleEvents.
/**
* Handle screen events
*/
public void handleEvents() {
// lock
lockEvents();
// handle floating nodes of screens first
for (int i = renderScreens.size() - 1; i >= 0; i--) {
// screen
GUIScreenNode screen = renderScreens.get(i);
if (screen.isVisible() == false)
continue;
// floating nodes
ArrayList<GUINode> floatingNodes = screen.getFloatingNodes();
for (int j = 0; j < floatingNodes.size(); j++) {
// floating node
GUINode floatingNode = floatingNodes.get(j);
// handle it events
handleEvents(floatingNode);
}
// break here if pop up
if (screen.isPopUp() == true)
break;
}
// handle screen input events
for (int i = renderScreens.size() - 1; i >= 0; i--) {
// screen
GUIScreenNode screen = renderScreens.get(i);
if (screen.isVisible() == false)
continue;
// handle screen events
handleEvents(screen);
// events handler
if (screen.getInputEventHandler() != null) {
screen.getInputEventHandler().handleInputEvents();
}
// break here if pop up
if (screen.isPopUp() == true)
break;
}
// discard events
mouseEvents.clear();
mouseEventsPool.reset();
keyboardEvents.clear();
keyboardEventsPool.reset();
// unlock
unlockEvents();
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUITabsController method unselect.
/**
* Unselect all tab nodes
*/
protected void unselect() {
// unselect tabs (header)
((GUIParentNode) node).getChildControllerNodes(childControllerNodes);
for (int i = 0; i < childControllerNodes.size(); i++) {
GUINode childControllerNode = childControllerNodes.get(i);
GUINodeController childController = childControllerNode.getController();
if (childController instanceof GUITabController) {
GUITabController tabController = (GUITabController) childController;
if (tabController.getNode().getParentControllerNode().getParentControllerNode() != node)
continue;
tabController.setSelected(false);
}
}
}
Aggregations