use of com.codename1.ui.ButtonGroup in project CodenameOne by codenameone.
the class ComponentGroup method setHorizontal.
/**
* Indicates that the component group should be horizontal by using the BoxLayout Y
* @param horizontal the horizontal to set
*/
public void setHorizontal(boolean horizontal) {
if (horizontal != isHorizontal()) {
if (horizontal) {
setLayout(new BoxLayout(BoxLayout.X_AXIS));
if ("GroupElement".equals(elementUIID)) {
elementUIID = "ToggleButton";
buttonUIID = "ToggleButton";
updateUIIDs();
}
} else {
setLayout(new BoxLayout(BoxLayout.Y_AXIS));
if ("ToggleButton".equals(elementUIID)) {
elementUIID = "GroupElement";
buttonUIID = "ButtonGroup";
updateUIIDs();
}
}
}
}
Aggregations