use of org.dominokit.domino.ui.grid.Column in project domino-ui-demo by DominoKit.
the class LabelsViewImpl method initLabels.
@SampleMethod
private void initLabels() {
Column column = Column.span(1, 2, 6, 12);
element.appendChild(Card.create("LABELS").appendChild(Row.create().addColumn(column.copy().appendChild(Label.createDefault("DEFAULT").style().setMargin("10px"))).addColumn(column.copy().appendChild(Label.createPrimary("PRIMARY").style().setMargin("10px"))).addColumn(column.copy().appendChild(Label.createSuccess("SUCCESS").style().setMargin("10px"))).addColumn(column.copy().appendChild(Label.createInfo("INFO").style().setMargin("10px"))).addColumn(column.copy().appendChild(Label.createWarning("WARNING").style().setMargin("10px"))).addColumn(column.copy().appendChild(Label.createDanger("DANGER").style().setMargin("10px")))).appendChild(Elements.hr()).appendChild(Elements.h(1).style("text-align: left;").textContent("Example heading ").add(Label.createDanger("New"))).appendChild(Elements.h(2).textContent("Example heading ").add(Label.createWarning("New"))).appendChild(Elements.h(3).textContent("Example heading ").add(Label.createInfo("New"))).appendChild(Elements.h(4).textContent("Example heading ").add(Label.createSuccess("New"))).appendChild(Elements.h(5).textContent("Example heading ").add(Label.createPrimary("New"))).appendChild(Elements.h(6).textContent("Example heading ").add(Label.createDefault("New"))).element());
}
use of org.dominokit.domino.ui.grid.Column in project domino-ui-demo by DominoKit.
the class DatePickerViewImpl method dateBox.
@SampleMethod
private void dateBox() {
Column column = this.column.copy().style().removeCss(Styles.padding_0).get();
DateBox dateBox1 = DateBox.create("Birth date").setPattern("yyyy/MM/dd");
DateBox dateBox2 = DateBox.create("Birth date", new Date(), new DateTimeFormatInfoImpl_fr());
dateBox2.getDatePicker().setColorScheme(ColorScheme.AMBER);
DateBox dateBox3 = DateBox.create("Birth date").setPopoverPosition(PopupPosition.TOP).setPickerStyle(DateBox.PickerStyle.POPOVER);
dateBox3.getDatePicker().setColorScheme(ColorScheme.GREEN);
element.appendChild(Card.create("DATE BOX").appendChild(Row.create().addColumn(column.copy().deCenterContent().appendChild(dateBox1)).addColumn(column.copy().deCenterContent().appendChild(dateBox2)).addColumn(column.copy().deCenterContent().appendChild(dateBox3)).element()).element());
}
use of org.dominokit.domino.ui.grid.Column in project domino-ui-demo by DominoKit.
the class TimePickerViewImpl method inputTimeBox.
@SampleMethod
private void inputTimeBox() {
Column column = Column.span6().style().removeCss(Styles.padding_0).get();
InputTimeBox timeBox1 = InputTimeBox.create().setLabel("Clock 12");
InputTimeBox timeBox2 = InputTimeBox.create().setLabel("Clock 24").setClockStyle(ClockStyle._24);
element.appendChild(Card.create("INPUT TIME BOX").appendChild(Row.create().addColumn(column.copy().appendChild(timeBox1)).addColumn(column.copy().appendChild(timeBox2))).element());
}
use of org.dominokit.domino.ui.grid.Column in project domino-ui-demo by DominoKit.
the class ModalsViewImpl method initSheets.
@SampleMethod
private void initSheets() {
element.appendChild(Card.create("SHEETS MODALS", "Sheets are modal that stick to screen edges.").appendChild(Row.create().style().setMargin("10px").get().fullSpan(column -> {
column.appendChild(Row.create().addColumn(Column.span(3, 3, 6, 12).appendChild(Row.create().appendChild(Button.createDefault("LEFT - LARGE").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("LEFT SHEET").setType(IsModalDialog.ModalType.LEFT_SHEET).setSize(IsModalDialog.ModalSize.LARGE).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px"))).appendChild(Row.create().appendChild(Button.createDefault("LEFT - DEFAULT").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("LEFT SHEET").setType(IsModalDialog.ModalType.LEFT_SHEET).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px"))).appendChild(Row.create().appendChild(Button.createDefault("LEFT - SMALL").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("LEFT SHEET").setType(IsModalDialog.ModalType.LEFT_SHEET).setSize(IsModalDialog.ModalSize.SMALL).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px")))).addColumn(Column.span(3, 3, 6, 12).appendChild(Row.create().appendChild(Button.createDefault("TOP").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("TOP SHEET").setType(IsModalDialog.ModalType.TOP_SHEET).setSize(IsModalDialog.ModalSize.LARGE).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px")))).addColumn(Column.span(3, 3, 6, 12).appendChild(Row.create().appendChild(Button.createDefault("BOTTOM").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("TOP SHEET").setType(IsModalDialog.ModalType.BOTTOM_SHEET).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px")))).addColumn(Column.span(3, 3, 6, 12).appendChild(Row.create().appendChild(Button.createDefault("RIGHT - LARGE").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("TOP SHEET").setType(IsModalDialog.ModalType.RIGHT_SHEET).setSize(IsModalDialog.ModalSize.LARGE).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px"))).appendChild(Row.create().appendChild(Button.createDefault("RIGHT - DEFAULT").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("TOP SHEET").setType(IsModalDialog.ModalType.RIGHT_SHEET).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px"))).appendChild(Row.create().appendChild(Button.createDefault("RIGHT - SMALL").addClickListener(evt -> {
ModalDialog modal = ModalDialog.create("TOP SHEET").setType(IsModalDialog.ModalType.RIGHT_SHEET).setSize(IsModalDialog.ModalSize.SMALL).appendChild(TextNode.of(SAMPLE_CONTENT));
openDialog(modal);
}).style().setMargin("5px").setMinWidth("200px")))));
})).element());
}
use of org.dominokit.domino.ui.grid.Column in project domino-ui-demo by DominoKit.
the class ModalsViewImpl method initModalsSize.
@SampleMethod
private void initModalsSize() {
// ------------ Default size -------------
ModalDialog defaultSizeModal = createModalDialog();
// defaultSizeModal.appendChild(TextBox.create("sample"));
defaultSizeModal.appendChild(CheckBox.create("sample"));
Button defaultSizeButton = Button.createDefault("MODAL - DEFAULT SIZE");
defaultSizeButton.addClickListener(e -> openDialog(defaultSizeModal));
// ------------ Large size -------------
ModalDialog largeSizeModal = createModalDialog().large();
Button largeSizeButton = Button.createDefault("MODAL - LARGE SIZE");
largeSizeButton.addClickListener(e -> openDialog(largeSizeModal));
// ------------ Small size -------------
ModalDialog smallSizeModal = createModalDialog().small();
Button smallSizeButton = Button.createDefault("MODAL - SMALL SIZE");
smallSizeButton.addClickListener(e -> openDialog(smallSizeModal));
element.appendChild(Card.create("MODAL SIZE EXAMPLE", "Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.").appendChild(Row.create().span4(column -> column.appendChild(defaultSizeButton)).span4(column -> column.appendChild(largeSizeButton)).span4(column -> column.appendChild(smallSizeButton))).element());
}
Aggregations