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

The following examples show how to use gwt.material.design.client.constants.WavesType. These examples are extracted from open source projects. 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 Project: gwt-material   Source File: WavesMixin.java    License: 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 Project: gwt-material-addins   Source File: Walkthrough.java    License: 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 Project: gwt-material-addins   Source File: MaterialUploadHeader.java    License: 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 Project: gwt-material-demo   Source File: TabsView.java    License: 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 Project: gwt-material-addins   Source File: PreviousArrow.java    License: 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 Project: gwt-material-addins   Source File: NextArrow.java    License: 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 Project: gwt-material-addins   Source File: MaterialWindow.java    License: 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 Project: lumongo   Source File: CustomTabPanel.java    License: 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 Project: lumongo   Source File: CustomTabPanel.java    License: 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 Project: gwt-material   Source File: WavesMixin.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public WavesType getWaves() {
    return waves;
}
 
Example 11
Source Project: gwt-material   Source File: MaterialCollapsibleItem.java    License: 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 Project: gwt-material   Source File: MaterialPager.java    License: 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 Project: gwt-material   Source File: HasWaves.java    License: 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 Project: gwt-material   Source File: HasWaves.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Get the waves type.
 */
WavesType getWaves();