use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUITabsController method setTabContentSelected.
/**
* Set tab content selected
* @param id
*/
protected void setTabContentSelected(String id) {
tabContentNodeId.set(id).append("-content");
// select selected content tab, unselect other content tabs
((GUIParentNode) node).getChildControllerNodes(childControllerNodes);
for (int i = 0; i < childControllerNodes.size(); i++) {
GUINode childControllerNode = childControllerNodes.get(i);
GUINodeController childController = childControllerNode.getController();
if (childController instanceof GUITabContentController) {
GUITabContentController tabContentController = (GUITabContentController) childController;
if (tabContentController.getNode().getParentControllerNode().getParentControllerNode() != node)
continue;
((GUITabContentController) childController).setSelected(tabContentNodeId.equals(childController.getNode().getId()));
}
}
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUITabsHeaderController method determineTabControllers.
/**
* Determine select box option controllers
*/
private void determineTabControllers() {
tabControllers.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 GUITabController) {
GUITabController guiTabController = (GUITabController) childController;
if (guiTabController.getNode().getParentControllerNode() != node)
continue;
if (guiTabController.isDisabled() == true)
continue;
tabControllers.add(guiTabController);
}
}
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUITabsHeaderController method unselect.
/**
* Unselect all nodes
*/
protected void unselect() {
((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 guiTabController = (GUITabController) childController;
if (guiTabController.getNode().getParentControllerNode() != node)
continue;
guiTabController.setSelected(false);
}
}
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUITabsController method init.
/*
* (non-Javadoc)
* @see net.drewke.tdme.gui.GUINodeController#init()
*/
public void init() {
// child nodes
((GUIParentNode) node).getChildControllerNodes(childControllerNodes);
// select first tab in header
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(true);
setTabContentSelected(tabController.getNode().getId());
break;
}
}
}
use of net.drewke.tdme.gui.nodes.GUINode in project tdme by andreasdr.
the class GUIDropDownController method unselect.
/**
* Unselect all nodes
*/
protected void unselect() {
((GUIParentNode) node).getChildControllerNodes(childControllerNodes);
for (int i = 0; i < childControllerNodes.size(); i++) {
GUINode childControllerNode = childControllerNodes.get(i);
GUINodeController childController = childControllerNode.getController();
if (childController instanceof GUIDropDownOptionController) {
((GUIDropDownOptionController) childController).unselect();
}
}
}
Aggregations