org.dominokit.domino.ui.button.group.JustifiedGroup Maven / Gradle / Ivy
package org.dominokit.domino.ui.button.group;
import elemental2.dom.HTMLElement;
import org.dominokit.domino.ui.button.Button;
import org.dominokit.domino.ui.button.ButtonStyles;
import org.dominokit.domino.ui.button.DropdownButton;
import org.dominokit.domino.ui.utils.BaseDominoElement;
import org.dominokit.domino.ui.utils.Sizable;
public class JustifiedGroup extends BaseDominoElement implements IsGroup, Sizable {
private ButtonsGroup group = ButtonsGroup.create();
public static JustifiedGroup create() {
return new JustifiedGroup();
}
private JustifiedGroup() {
group.style().add(ButtonStyles.JUSTIFIED);
init(this);
}
@Override
public HTMLElement appendChild(Button button) {
HTMLElement justify = button.element();
group.appendChild(justify);
return justify;
}
@Override
public HTMLElement appendChild(DropdownButton dropDown) {
HTMLElement justify = dropDown.element();
group.appendChild(justify);
return justify;
}
@Override
public IsGroup verticalAlign() {
group.verticalAlign();
return this;
}
@Override
public IsGroup horizontalAlign() {
group.horizontalAlign();
return this;
}
@Override
public HTMLElement element() {
return group.element();
}
@Override
public JustifiedGroup large() {
group.large();
return this;
}
@Override
public JustifiedGroup medium() {
group.medium();
return this;
}
@Override
public JustifiedGroup small() {
group.small();
return this;
}
@Override
public JustifiedGroup xSmall() {
group.xSmall();
return this;
}
}