use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.
the class GUITabController method setSelected.
/**
* Set checked
* @param selected
*/
protected void setSelected(boolean selected) {
// remove old selection condition, add new selection condition
GUINodeConditions nodeConditions = ((GUIElementNode) this.node).getActiveConditions();
nodeConditions.remove(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
this.selected = selected;
nodeConditions.add(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
// handle focus, alter border depending on tabs header node focus and selection state
if (((GUITabsHeaderController) tabsHeaderNode.getController()).hasFocus() == true) {
if (selected == true) {
GUIColor focussedBorderColor = node.getScreenNode().getGUI().getFoccussedBorderColor();
GUINode.Border border = node.getBorder();
border.topColor = focussedBorderColor;
border.leftColor = focussedBorderColor;
border.bottomColor = focussedBorderColor;
border.rightColor = focussedBorderColor;
} else {
GUINode.Border border = node.getBorder();
border.topColor = unfocussedNodeBorderTopColor;
border.leftColor = unfocussedNodeBorderLeftColor;
border.bottomColor = unfocussedNodeBorderBottomColor;
border.rightColor = unfocussedNodeBorderRightColor;
}
} else {
GUINode.Border border = node.getBorder();
border.topColor = unfocussedNodeBorderTopColor;
border.leftColor = unfocussedNodeBorderLeftColor;
border.bottomColor = unfocussedNodeBorderBottomColor;
border.rightColor = unfocussedNodeBorderRightColor;
}
}
use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.
the class GUIRadioButtonController method init.
/*
* (non-Javadoc)
* @see net.drewke.tdme.gui.GUINodeController#init()
*/
public void init() {
GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
nodeConditions.add(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
setDisabled(disabled);
}
use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.
the class GUIDropDownController method setDisabled.
/*
* (non-Javadoc)
* @see net.drewke.tdme.gui.nodes.GUINodeController#setDisabled(boolean)
*/
public void setDisabled(boolean disabled) {
GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
GUINodeConditions nodeConditionsTextElement = textElementNode.getActiveConditions();
nodeConditions.remove(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
nodeConditionsTextElement.remove(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
this.disabled = disabled;
nodeConditions.add(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
nodeConditionsTextElement.add(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
// close if open
if (disabled == true && isOpen() == true) {
toggleOpenState();
}
}
use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.
the class GUIDropDownOptionController method unselect.
/**
* Unselect
* @param checked
*/
protected void unselect() {
// unselect current
GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
nodeConditions.remove(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
this.selected = false;
nodeConditions.add(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
}
use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.
the class GUIInputController method setDisabled.
/*
* (non-Javadoc)
* @see net.drewke.tdme.gui.nodes.GUINodeController#setDisabled(boolean)
*/
public void setDisabled(boolean disabled) {
GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
nodeConditions.remove(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
this.disabled = disabled;
nodeConditions.add(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
}
Aggregations