Search in sources :

Example 1 with Column

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());
}
Also used : Column(org.dominokit.domino.ui.grid.Column) SampleMethod(org.dominokit.domino.SampleMethod)

Example 2 with Column

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());
}
Also used : DateBox(org.dominokit.domino.ui.datepicker.DateBox) Column(org.dominokit.domino.ui.grid.Column) DateTimeFormatInfoImpl_fr(org.gwtproject.i18n.shared.cldr.impl.DateTimeFormatInfoImpl_fr) Date(java.util.Date) SampleMethod(org.dominokit.domino.SampleMethod)

Example 3 with Column

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());
}
Also used : InputTimeBox(org.dominokit.domino.ui.timepicker.InputTimeBox) Column(org.dominokit.domino.ui.grid.Column) SampleMethod(org.dominokit.domino.SampleMethod)

Example 4 with Column

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());
}
Also used : SampleClass(org.dominokit.domino.SampleClass) SampleMethod(org.dominokit.domino.SampleMethod) Aggregate(org.dominokit.domino.api.shared.extension.Aggregate) UiView(org.dominokit.domino.api.client.annotations.UiView) CodeCard(org.dominokit.domino.componentcase.client.ui.views.CodeCard) Column(org.dominokit.domino.ui.grid.Column) Paragraph(org.dominokit.domino.ui.Typography.Paragraph) ModalDialog(org.dominokit.domino.ui.modals.ModalDialog) BlockHeader(org.dominokit.domino.ui.header.BlockHeader) LinkToSourceCode(org.dominokit.domino.componentcase.client.ui.views.LinkToSourceCode) Elements.div(org.jboss.elemento.Elements.div) ModalsView(org.dominokit.domino.modals.client.views.ModalsView) Row(org.dominokit.domino.ui.grid.Row) Card(org.dominokit.domino.ui.cards.Card) TextNode(org.dominokit.domino.ui.utils.TextNode) IsModalDialog(org.dominokit.domino.ui.modals.IsModalDialog) ModalsProxy(org.dominokit.domino.modals.client.presenters.ModalsProxy) BaseDemoView(org.dominokit.domino.componentcase.client.ui.views.BaseDemoView) EventListener(elemental2.dom.EventListener) Window(org.dominokit.domino.ui.modals.Window) Color(org.dominokit.domino.ui.style.Color) HTMLDivElement(elemental2.dom.HTMLDivElement) CheckBox(org.dominokit.domino.ui.forms.CheckBox) Objects.nonNull(java.util.Objects.nonNull) Button(org.dominokit.domino.ui.button.Button) ModalDialog(org.dominokit.domino.ui.modals.ModalDialog) IsModalDialog(org.dominokit.domino.ui.modals.IsModalDialog) SampleMethod(org.dominokit.domino.SampleMethod)

Example 5 with Column

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());
}
Also used : SampleClass(org.dominokit.domino.SampleClass) SampleMethod(org.dominokit.domino.SampleMethod) Aggregate(org.dominokit.domino.api.shared.extension.Aggregate) UiView(org.dominokit.domino.api.client.annotations.UiView) CodeCard(org.dominokit.domino.componentcase.client.ui.views.CodeCard) Column(org.dominokit.domino.ui.grid.Column) Paragraph(org.dominokit.domino.ui.Typography.Paragraph) ModalDialog(org.dominokit.domino.ui.modals.ModalDialog) BlockHeader(org.dominokit.domino.ui.header.BlockHeader) LinkToSourceCode(org.dominokit.domino.componentcase.client.ui.views.LinkToSourceCode) Elements.div(org.jboss.elemento.Elements.div) ModalsView(org.dominokit.domino.modals.client.views.ModalsView) Row(org.dominokit.domino.ui.grid.Row) Card(org.dominokit.domino.ui.cards.Card) TextNode(org.dominokit.domino.ui.utils.TextNode) IsModalDialog(org.dominokit.domino.ui.modals.IsModalDialog) ModalsProxy(org.dominokit.domino.modals.client.presenters.ModalsProxy) BaseDemoView(org.dominokit.domino.componentcase.client.ui.views.BaseDemoView) EventListener(elemental2.dom.EventListener) Window(org.dominokit.domino.ui.modals.Window) Color(org.dominokit.domino.ui.style.Color) HTMLDivElement(elemental2.dom.HTMLDivElement) CheckBox(org.dominokit.domino.ui.forms.CheckBox) Objects.nonNull(java.util.Objects.nonNull) Button(org.dominokit.domino.ui.button.Button) Button(org.dominokit.domino.ui.button.Button) ModalDialog(org.dominokit.domino.ui.modals.ModalDialog) IsModalDialog(org.dominokit.domino.ui.modals.IsModalDialog) SampleMethod(org.dominokit.domino.SampleMethod)

Aggregations

Column (org.dominokit.domino.ui.grid.Column)9 SampleMethod (org.dominokit.domino.SampleMethod)8 HTMLDivElement (elemental2.dom.HTMLDivElement)4 UiView (org.dominokit.domino.api.client.annotations.UiView)4 BaseDemoView (org.dominokit.domino.componentcase.client.ui.views.BaseDemoView)4 Button (org.dominokit.domino.ui.button.Button)4 Card (org.dominokit.domino.ui.cards.Card)4 Row (org.dominokit.domino.ui.grid.Row)4 BlockHeader (org.dominokit.domino.ui.header.BlockHeader)4 Color (org.dominokit.domino.ui.style.Color)4 Elements.div (org.jboss.elemento.Elements.div)4 SampleClass (org.dominokit.domino.SampleClass)3 CodeCard (org.dominokit.domino.componentcase.client.ui.views.CodeCard)3 LinkToSourceCode (org.dominokit.domino.componentcase.client.ui.views.LinkToSourceCode)3 Paragraph (org.dominokit.domino.ui.Typography.Paragraph)3 CheckBox (org.dominokit.domino.ui.forms.CheckBox)3 TextNode (org.dominokit.domino.ui.utils.TextNode)3 EventListener (elemental2.dom.EventListener)2 Date (java.util.Date)2 Objects.nonNull (java.util.Objects.nonNull)2