gwt.material.design.client.ui.MaterialCheckBox Java Examples

The following examples show how to use gwt.material.design.client.ui.MaterialCheckBox. 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: CustomRenderer.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@Override
public TableData drawSelectionCell() {
    TableData td = new TableData();
    td.setId("col0");
    MaterialCheckBox checkBox = new MaterialCheckBox(td.getElement());
    checkBox.setType(CheckBoxType.FILLED);
    checkBox.addClickHandler(event -> event.getNativeEvent().preventDefault());
    return td;
}
 
Example #2
Source File: MenuBarView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@UiHandler({"dpFile", "dpNew", "dpView", "dpEdit", "dpFormat"})
void onSelectionFileDropdown(SelectionEvent<Widget> selection) {
    if(selection.getSelectedItem() instanceof MaterialLink){
        MaterialToast.fireToast("Triggered : " + ((MaterialLink)selection.getSelectedItem()).getText());
    }else if(selection.getSelectedItem() instanceof MaterialCheckBox){
        MaterialToast.fireToast("Checked : " + ((MaterialCheckBox)selection.getSelectedItem()).getText());
    }
}
 
Example #3
Source File: MenuBarView.java    From gwt-material-demo with Apache License 2.0 5 votes vote down vote up
@UiHandler("dpMode")
void onSelectionMode(SelectionEvent<Widget> selection) {
    for(Widget w : dpMode.getItems()){
        if(w instanceof MaterialCheckBox){
            ((MaterialCheckBox) w).setValue(false);
        }
    }
    if(selection.getSelectedItem() instanceof MaterialCheckBox){
        ((MaterialCheckBox) selection.getSelectedItem()).setValue(true);
        MaterialToast.fireToast("Checked : " + ((MaterialCheckBox) selection.getSelectedItem()).getText());
    }
}
 
Example #4
Source File: DefaultCheckBoxLoader.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
public DefaultCheckBoxLoader(MaterialCheckBox checkBox) {
    this.checkBox = checkBox;

    setupLoader();
}