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

The following examples show how to use gwt.material.design.client.constants.WavesType. 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: WavesMixin.java    From gwt-material with Apache License 2.0 6 votes vote down vote up
@Override
public void setWaves(WavesType waves) {
    uiObject.removeStyleName(Waves.WAVES_STYLE);
    if (this.waves != null) {
        uiObject.removeStyleName(this.waves.getCssName());
    }

    this.waves = waves;

    if (waves != null) {
        boolean enabled = !(uiObject instanceof HasEnabled) || ((HasEnabled) uiObject).isEnabled();
        if (enabled) {
            uiObject.addStyleName(Waves.WAVES_STYLE);
        }

        uiObject.addStyleName(waves.getCssName());
        if (enabled) {
            Waves.detectAndApply(uiObject);
        }
    }
}
 
Example #2
Source File: Walkthrough.java    From gwt-material-addins with Apache License 2.0 6 votes vote down vote up
@Override
protected void onLoad() {
    super.onLoad();

    item.add(submit);
    submit.setFontSize("0.8em");
    submit.setBackgroundColor(Color.WHITE);
    submit.setTextColor(Color.GREY);
    submit.setWaves(WavesType.DEFAULT);
    add(item);

    setType(CarouselType.ONBOARD);
    setLayoutPosition(Style.Position.FIXED);
    setEdgeFriction(0);

    registerHandler(addAfterChangeHandler(event -> animate(event.getCurrentSlide())));
    registerHandler(addInitHandler(event -> animate(0)));
    registerHandler(submit.addClickHandler(clickEvent -> CompleteEvent.fire(this)));
}
 
Example #3
Source File: MaterialUploadHeader.java    From gwt-material-addins with Apache License 2.0 6 votes vote down vote up
public MaterialUploadHeader() {
    super(Document.get().createDivElement(), AddinsCssName.HEADER);

    iconClose.setId(AddinsCssName.UPLOAD_CLOSE);
    iconClose.setCircle(true);
    iconClose.setWaves(WavesType.DEFAULT);
    iconColaps.setId(AddinsCssName.UPLOAD_COLAPS);
    iconColaps.setCircle(true);
    iconColaps.setWaves(WavesType.DEFAULT);
    uploadedFiles.setId(AddinsCssName.NO_UPLOADED_FILES);
    progress.setId(AddinsCssName.TOTAL_UPLOAD_PROGRESS);
    add(uploadedFiles);
    add(iconClose);
    add(iconColaps);
    add(progress);
}
 
Example #4
Source File: TabsView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
protected MaterialTabItem newTabItem(int index) {
    MaterialTabItem item = new MaterialTabItem();
    item.setWaves(WavesType.DEFAULT);
    MaterialLink link = new MaterialLink("Tab " + index);
    link.setTextColor(Color.WHITE);
    link.setHref("#dynamicTab" + index);
    item.add(link);
    MaterialLabel content = new MaterialLabel("Content " + index);
    content.setId("dynamicTab" + index);
    dynamicTabsRow.add(content);
    return item;
}
 
Example #5
Source File: PreviousArrow.java    From gwt-material-addins with Apache License 2.0 5 votes vote down vote up
@Override
protected void onLoad() {
    super.onLoad();

    setIconType(IconType.KEYBOARD_ARROW_LEFT);
    setType(ButtonType.FLOATING);
    setWaves(WavesType.DEFAULT);
    setText("Previous");
    addStyleName(AddinsCssName.CAROUSEL_PREV_ARROW);
    setId(DOM.createUniqueId());
}
 
Example #6
Source File: NextArrow.java    From gwt-material-addins with Apache License 2.0 5 votes vote down vote up
@Override
protected void onLoad() {
    super.onLoad();

    setIconType(IconType.KEYBOARD_ARROW_RIGHT);
    setType(ButtonType.FLOATING);
    setWaves(WavesType.DEFAULT);
    setText("Next");
    addStyleName(AddinsCssName.CAROUSEL_NEXT_ARROW);
    setId(DOM.createUniqueId());
}
 
Example #7
Source File: MaterialWindow.java    From gwt-material-addins with Apache License 2.0 5 votes vote down vote up
public MaterialWindow() {
    super(AddinsCssName.WINDOW);

    content.setStyleName(AddinsCssName.CONTENT);
    toolbar.setStyleName(AddinsCssName.WINDOW_TOOLBAR);
    labelTitle.setStyleName(AddinsCssName.WINDOW_TITLE);
    iconClose.addStyleName(AddinsCssName.WINDOW_ACTION);
    iconMaximize.addStyleName(AddinsCssName.WINDOW_ACTION);

    iconClose.setCircle(true);
    iconClose.setWaves(WavesType.DEFAULT);

    iconMaximize.setCircle(true);
    iconMaximize.setWaves(WavesType.DEFAULT);

    toolbar.add(labelTitle);
    toolbar.add(iconClose);
    toolbar.add(iconMaximize);

    super.add(toolbar);
    super.add(content);

    setTop(100);

    // Add a draggable header
    dnd = buildDnd();
}
 
Example #8
Source File: CustomTabPanel.java    From lumongo with Apache License 2.0 5 votes vote down vote up
public MaterialTabItem createAndAddTabListItem(IconType iconType, String title, String dataTarget) {
	MaterialTabItem tabItem = new MaterialTabItem();
	tabItem.setWaves(WavesType.YELLOW);
	tabItem.setGrid("s4");

	MaterialLink materialLink = new MaterialLink(iconType);
	materialLink.setHref(dataTarget);
	materialLink.setText(title);
	materialLink.setTextColor(Color.WHITE);
	tabItem.add(materialLink);

	materialTab.add(tabItem);

	return tabItem;
}
 
Example #9
Source File: CustomTabPanel.java    From lumongo with Apache License 2.0 5 votes vote down vote up
public MaterialTabItem createAndAddTabListItem(String tabName, String dataTarget) {
	MaterialTabItem tabItem = new MaterialTabItem();
	tabItem.setGrid("s4");
	tabItem.setWaves(WavesType.YELLOW);

	MaterialLink materialLink = new MaterialLink(tabName);
	materialLink.setHref(dataTarget);
	tabItem.add(materialLink);

	materialTab.add(tabItem);

	return tabItem;
}
 
Example #10
Source File: WavesMixin.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
@Override
public WavesType getWaves() {
    return waves;
}
 
Example #11
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 #12
Source File: MaterialPager.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
public MaterialPager() {
    super(Document.get().createULElement(), CssName.PAGINATION);
    setWaves(WavesType.DEFAULT);
    removeStyleName(CssName.WAVES_EFFECT);
}
 
Example #13
Source File: HasWaves.java    From gwt-material with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the ripple effect of any material elements
 */
void setWaves(WavesType waves);
 
Example #14
Source File: HasWaves.java    From gwt-material with Apache License 2.0 2 votes vote down vote up
/**
 * Get the waves type.
 */
WavesType getWaves();