use of elemental2.dom.HTMLHeadingElement in project domino-ui-demo by DominoKit.
the class LabelsViewImpl method initLabels.
private void initLabels() {
Card labels = Card.create("LABELS");
Row row = Row.create();
Column column = Column.create().onLarge(Column.OnLarge.one).onMedium(Column.OnMedium.two).onSmall(Column.OnSmall.six).onXSmall(Column.OnXSmall.twelve);
HTMLElement defaultLabel = Label.createDefault("DEFAULT").asElement();
HTMLElement primaryLabel = Label.createPrimary("PRIMARY").asElement();
HTMLElement successLabel = Label.createSuccess("SUCCESS").asElement();
HTMLElement infoLabel = Label.createInfo("INFO").asElement();
HTMLElement warningLabel = Label.createWarning("WARNING").asElement();
HTMLElement dangerLabel = Label.createDanger("DANGER").asElement();
defaultLabel.style.margin = CSSProperties.MarginUnionType.of("10px");
primaryLabel.style.margin = CSSProperties.MarginUnionType.of("10px");
successLabel.style.margin = CSSProperties.MarginUnionType.of("10px");
infoLabel.style.margin = CSSProperties.MarginUnionType.of("10px");
warningLabel.style.margin = CSSProperties.MarginUnionType.of("10px");
dangerLabel.style.margin = CSSProperties.MarginUnionType.of("10px");
row.addColumn(column.addElement(defaultLabel)).addColumn(column.copy().addElement(primaryLabel)).addColumn(column.copy().addElement(successLabel)).addColumn(column.copy().addElement(infoLabel)).addColumn(column.copy().addElement(warningLabel)).addColumn(column.copy().addElement(dangerLabel));
labels.appendContent(row.asElement());
labels.appendContent(Elements.hr().asElement());
HTMLHeadingElement h1 = Elements.h(1).textContent("Example heading ").asElement();
HTMLHeadingElement h2 = Elements.h(2).textContent("Example heading ").asElement();
HTMLHeadingElement h3 = Elements.h(3).textContent("Example heading ").asElement();
HTMLHeadingElement h4 = Elements.h(4).textContent("Example heading ").asElement();
HTMLHeadingElement h5 = Elements.h(5).textContent("Example heading ").asElement();
HTMLHeadingElement h6 = Elements.h(6).textContent("Example heading ").asElement();
h1.style.textAlign = "left";
h1.appendChild(Label.createDanger("New").asElement());
h2.appendChild(Label.createWarning("New").asElement());
h3.appendChild(Label.createInfo("New").asElement());
h4.appendChild(Label.createSuccess("New").asElement());
h5.appendChild(Label.createPrimary("New").asElement());
h6.appendChild(Label.createDefault("New").asElement());
labels.appendContent(h1).appendContent(h2).appendContent(h3).appendContent(h4).appendContent(h5).appendContent(h6);
this.element.appendChild(labels.asElement());
element.appendChild(Card.createCodeCard(CodeResource.INSTANCE.initLabels()).asElement());
}
use of elemental2.dom.HTMLHeadingElement in project domino-ui-demo by DominoKit.
the class ButtonsViewImpl method initIconButtons.
private void initIconButtons() {
Card card = Card.create("ICON BUTTONS", "Make icon buttons");
Row normal = Row.create();
HTMLHeadingElement normal_circle = heading("Normal Icon Button");
normal.asElement().appendChild(normal_circle);
card.appendContent(normal.asElement());
Row row = Row.create();
HTMLElement homeIcon = IconButton.create(Icons.ALL.home()).setButtonType(StyleType.DEFAULT).asElement();
HTMLElement micIcon = IconButton.createPrimary(Icons.ALL.mic()).setButtonType(StyleType.PRIMARY).asElement();
HTMLElement moreIcon = IconButton.createInfo(Icons.ALL.more()).setButtonType(StyleType.INFO).asElement();
HTMLElement keyboardIcon = IconButton.createSuccess(Icons.ALL.keyboard()).setButtonType(StyleType.SUCCESS).asElement();
HTMLElement acUnitIcon = IconButton.createWarning(Icons.ALL.ac_unit()).setButtonType(StyleType.WARNING).asElement();
HTMLElement accessAlarmIcon = IconButton.createDanger(Icons.ALL.access_alarm()).setButtonType(StyleType.DANGER).asElement();
homeIcon.style.margin = CSSProperties.MarginUnionType.of("5px");
micIcon.style.margin = CSSProperties.MarginUnionType.of("5px");
moreIcon.style.margin = CSSProperties.MarginUnionType.of("5px");
keyboardIcon.style.margin = CSSProperties.MarginUnionType.of("5px");
acUnitIcon.style.margin = CSSProperties.MarginUnionType.of("5px");
accessAlarmIcon.style.margin = CSSProperties.MarginUnionType.of("5px");
row.asElement().appendChild(homeIcon);
row.asElement().appendChild(micIcon);
row.asElement().appendChild(moreIcon);
row.asElement().appendChild(keyboardIcon);
row.asElement().appendChild(acUnitIcon);
row.asElement().appendChild(accessAlarmIcon);
card.appendContent(row.asElement());
Row smallCircle = Row.create();
HTMLHeadingElement small_icon_button = heading("Small Circle Icon Button");
smallCircle.asElement().appendChild(small_icon_button);
card.appendContent(smallCircle.asElement());
Row row1 = Row.create();
HTMLElement addCircleIconCRL = IconButton.create(Icons.ALL.add_circle()).circle(CircleSize.SMALL).setButtonType(StyleType.DEFAULT).asElement();
HTMLElement placeIconCRL = IconButton.createPrimary(Icons.ALL.place()).circle(CircleSize.SMALL).setButtonType(StyleType.PRIMARY).asElement();
HTMLElement airplaneModeActiveIconCRL = IconButton.createInfo(Icons.ALL.airplanemode_active()).circle(CircleSize.SMALL).setButtonType(StyleType.INFO).asElement();
HTMLElement albumIconCRL = IconButton.createSuccess(Icons.ALL.album()).circle(CircleSize.SMALL).setButtonType(StyleType.SUCCESS).asElement();
HTMLElement weekendIconCRL = IconButton.createWarning(Icons.ALL.weekend()).circle(CircleSize.SMALL).setButtonType(StyleType.WARNING).asElement();
HTMLElement airplayIconCRL = IconButton.createDanger(Icons.ALL.airplay()).circle(CircleSize.SMALL).setButtonType(StyleType.DANGER).asElement();
addCircleIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
placeIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
airplaneModeActiveIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
albumIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
weekendIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
airplayIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
row1.asElement().appendChild(addCircleIconCRL);
row1.asElement().appendChild(placeIconCRL);
row1.asElement().appendChild(airplaneModeActiveIconCRL);
row1.asElement().appendChild(albumIconCRL);
row1.asElement().appendChild(weekendIconCRL);
row1.asElement().appendChild(airplayIconCRL);
card.appendContent(row1.asElement());
Row large = Row.create();
HTMLHeadingElement large_circle = heading("Large Circle Icon Button");
large.asElement().appendChild(large_circle);
card.appendContent(large.asElement());
Row row2 = Row.create();
HTMLElement adjustIconCRL = IconButton.create(Icons.ALL.adjust()).circle(CircleSize.LARGE).setButtonType(StyleType.DEFAULT).asElement();
HTMLElement alloutIconCRL = IconButton.createPrimary(Icons.ALL.all_out()).circle(CircleSize.LARGE).setButtonType(StyleType.PRIMARY).asElement();
HTMLElement appsIconCRL = IconButton.createInfo(Icons.ALL.apps()).circle(CircleSize.LARGE).setButtonType(StyleType.INFO).asElement();
HTMLElement artTrackIconCRL = IconButton.createSuccess(Icons.ALL.art_track()).circle(CircleSize.LARGE).setButtonType(StyleType.SUCCESS).asElement();
HTMLElement assessmentIconCRL = IconButton.createWarning(Icons.ALL.assessment()).circle(CircleSize.LARGE).setButtonType(StyleType.WARNING).asElement();
HTMLElement assistantIconCRL = IconButton.createDanger(Icons.ALL.assistant()).circle(CircleSize.LARGE).setButtonType(StyleType.DANGER).asElement();
adjustIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
alloutIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
appsIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
artTrackIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
assessmentIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
assistantIconCRL.style.margin = CSSProperties.MarginUnionType.of("5px");
row2.asElement().appendChild(adjustIconCRL);
row2.asElement().appendChild(alloutIconCRL);
row2.asElement().appendChild(appsIconCRL);
row2.asElement().appendChild(artTrackIconCRL);
row2.asElement().appendChild(assessmentIconCRL);
row2.asElement().appendChild(assistantIconCRL);
card.appendContent(row2.asElement());
element.appendChild(card.asElement());
element.appendChild(Card.createCodeCard(CodeResource.INSTANCE.initIconButtons()).asElement());
}
use of elemental2.dom.HTMLHeadingElement in project domino-ui-demo by DominoKit.
the class ButtonsViewImpl method heading.
private HTMLHeadingElement heading(String content) {
HTMLHeadingElement headingElement = Elements.h(2, content).asElement();
headingElement.style.marginTop = CSSProperties.MarginTopUnionType.of("25px");
headingElement.style.marginBottom = CSSProperties.MarginBottomUnionType.of("15px");
headingElement.style.fontSize = CSSProperties.FontSizeUnionType.of("15px");
headingElement.style.color = "#000";
headingElement.style.display = "block";
return headingElement;
}
Aggregations