gwt.material.design.client.constants.Display Java Examples

The following examples show how to use gwt.material.design.client.constants.Display. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProgressMixin.java    From gwt-material with Apache License 2.0 5 votes vote down vote up
protected void applyCollapsibleProgress(boolean isShow) {
    MaterialCollapsibleItem item = (MaterialCollapsibleItem) uiObject;
    MaterialCollapsibleBody body = (MaterialCollapsibleBody) item.getWidget(1);
    if (uiObject.getElement().getClassName().contains(CssName.ACTIVE)) {
        if (isShow) {
            body.setDisplay(Display.NONE);
            item.add(progress);
        } else {
            body.setDisplay(Display.BLOCK);
            progress.removeFromParent();
        }
    }
}
 
Example #2
Source File: MaterialSplashScreen.java    From gwt-material with Apache License 2.0 5 votes vote down vote up
@Override
protected void onLoad() {
    setDisplay(Display.NONE);

    container.setWidth("100%");
    container.getElement().getStyle().setMarginTop(15, Style.Unit.PCT);
    super.onLoad();

    super.add(container);
    super.add(progress);
}
 
Example #3
Source File: MaterialCollapsibleItem.java    From gwt-material with Apache License 2.0 5 votes vote down vote up
/**
 * Make this item active.
 */
@Override
public void setActive(boolean active) {
    this.active = active;

    if (parent != null) {
        fireCollapsibleHandler();
        removeStyleName(CssName.ACTIVE);
        if (header != null) {
            header.removeStyleName(CssName.ACTIVE);
        }
        if (active) {
            if (parent.isAccordion()) {
                parent.clearActive();
            }
            addStyleName(CssName.ACTIVE);

            if (header != null) {
                header.addStyleName(CssName.ACTIVE);
            }
        }

        if (body != null) {
            body.setDisplay(active ? Display.BLOCK : Display.NONE);
        }
    } else {
        GWT.log("Please make sure that the Collapsible parent is attached or existed.", new IllegalStateException());
    }
}
 
Example #4
Source File: MaterialCollapsible.java    From gwt-material with Apache License 2.0 5 votes vote down vote up
@Override
protected void clearActiveClass(HasWidgets widget) {
    super.clearActiveClass(widget);

    for (Widget child : widget) {
        if (child instanceof MaterialCollapsibleBody) {
            ((MaterialCollapsibleBody) child).setDisplay(Display.NONE);
        }
    }
}
 
Example #5
Source File: MaterialDialogTest.java    From gwt-material with Apache License 2.0 5 votes vote down vote up
public void testMultipleDialogZIndexes() {
    final int BASE_ZINDEX = 1000;
    for (int i = 1; i <= 5; i++) {
        MaterialDialog dialog = new MaterialDialog();
        RootPanel.get().add(dialog);
        dialog.open();
        // Expected Display : BLOCK
        assertEquals(Display.BLOCK.getCssName(), dialog.getElement().getStyle().getDisplay());
        /*checkZIndex(dialog, i, BASE_ZINDEX);*/
    }
}
 
Example #6
Source File: MaterialSplashScreen.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
public void show() {
    setDisplay(Display.BLOCK);
}
 
Example #7
Source File: MaterialSplashScreen.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
public void hide() {
    setDisplay(Display.NONE);
}
 
Example #8
Source File: MaterialCollapsibleItem.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
@Override
public void setWaves(WavesType waves) {
    super.setWaves(waves);

    setDisplay(Display.BLOCK);
}
 
Example #9
Source File: HasInlineStyle.java    From gwt-material with Apache License 2.0 votes vote down vote up
void setDisplay(Display display);