Java Code Examples for gwt.material.design.client.ui.MaterialButton
The following examples show how to use
gwt.material.design.client.ui.MaterialButton. 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-addins Source File: MaterialOverlayTabTest.java License: Apache License 2.0 | 5 votes |
@Override protected MaterialOverlayTab createWidget() { MaterialOverlayTab overlayTab = new MaterialOverlayTab(); activator = new MaterialButton("SAMPLE"); overlayTab.setActivator(activator); RootPanel.get().add(activator); return overlayTab; }
Example 2
Source Project: gwt-material-addins Source File: MaterialOverlayTest.java License: Apache License 2.0 | 5 votes |
@Override protected MaterialOverlay createWidget() { MaterialOverlay overlay = new MaterialOverlay(); source = new MaterialButton(); RootPanel.get().add(source); return overlay; }
Example 3
Source Project: lumongo Source File: Footer.java License: Apache License 2.0 | 5 votes |
public Footer() { setBackgroundColor(Color.GREY_DARKEN_2); MaterialRow row = new MaterialRow(); MaterialColumn leftColumn = new MaterialColumn(12, 6, 6); MaterialColumn rightColumn = new MaterialColumn(12, 6, 6); row.add(leftColumn); row.add(rightColumn); add(row); setType(FooterType.FIXED); MaterialLabel label = new MaterialLabel("LuMongo is distributed under a commercially friendly Apache Software license"); label.setTextColor(Color.WHITE); label.setMarginTop(15); leftColumn.add(label); MaterialButton chatButton = new MaterialButton("Chat with Us"); chatButton.setMarginTop(10); chatButton.setMarginLeft(20); chatButton.setFloat(Style.Float.RIGHT); chatButton.setIconType(IconType.CHAT_BUBBLE); chatButton.addClickHandler(clickEvent -> Window .open("https://gitter.im/lumongo/lumongo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge", "_blank", "menubar=1,status=1,toolbar=1,scrollbars=1,resizable=1")); rightColumn.add(chatButton); MaterialButton sourceButton = new MaterialButton("Source"); sourceButton.setMarginTop(10); sourceButton.setIconType(IconType.CODE); sourceButton.setFloat(Style.Float.RIGHT); sourceButton.addClickHandler( clickEvent -> Window.open("https://github.com/lumongo/lumongo", "_blank", "menubar=1,status=1,toolbar=1,scrollbars=1,resizable=1")); rightColumn.add(sourceButton); }
Example 4
Source Project: gwt-material-addins Source File: MaterialOverlayTab.java License: Apache License 2.0 | 4 votes |
public MaterialButton getBtnClose() { return btnClose; }
Example 5
Source Project: gwt-material-addins Source File: MaterialCarousel.java License: Apache License 2.0 | 4 votes |
public MaterialButton getBtnNextArrow() { return nextArrow; }
Example 6
Source Project: gwt-material-addins Source File: MaterialCarousel.java License: Apache License 2.0 | 4 votes |
public MaterialButton getBtnPrevArrow() { return previousArrow; }
Example 7
Source Project: lumongo Source File: QueryOptionsView.java License: Apache License 2.0 | 4 votes |
public QueryOptionsView(UIQueryResults uiQueryResults) { setMargin(15); setPadding(10); uiQueryObject = uiQueryResults.getUiQueryObject(); if (uiQueryObject == null) { uiQueryObject = new UIQueryObject(); } if (!uiQueryResults.getJsonDocs().isEmpty()) { MaterialBadge resultsBadge = new MaterialBadge("Total Results: " + NumberFormat.getFormat("#,##0").format(uiQueryResults.getTotalResults())); add(resultsBadge); add(new Br()); } MaterialButton executeButton = new MaterialButton("Execute", IconType.SEARCH); executeButton.addClickHandler(clickEvent -> runSearch()); executeButton.setMarginRight(2); add(executeButton); MaterialButton resetButton = new MaterialButton("Reset", IconType.REFRESH); resetButton.addClickHandler(clickEvent -> MainController.get().goTo(new QueryPlace(null))); add(resetButton); MaterialListBox indexesListBox = new MaterialListBox(); indexesListBox.setMultipleSelect(true); Option selectOneIndexOption = new Option("Select Indexes"); selectOneIndexOption.setDisabled(true); indexesListBox.add(selectOneIndexOption); fieldNameCollapsible = new MaterialCollapsible(); fieldNameCollapsible.setAccordion(false); for (IndexInfo indexInfo : uiQueryResults.getIndexes()) { createFieldNameCollapsible(indexInfo); Option option = new Option(indexInfo.getName()); if (uiQueryObject.getIndexNames().contains(indexInfo.getName())) { option.setSelected(true); fieldItems.get(indexInfo.getName()).setVisible(true); } indexesListBox.add(option); } indexesListBox.addValueChangeHandler(valueChangeEvent -> { for (String indexName : fieldItems.keySet()) { fieldItems.get(indexName).setVisible(false); } for (String itemsSelected : indexesListBox.getItemsSelected()) { uiQueryObject.getIndexNames().add(itemsSelected); fieldItems.get(itemsSelected).setVisible(true); } }); add(indexesListBox); add(fieldNameCollapsible); CustomTextBox searchBox = new CustomTextBox(true); searchBox.setPlaceHolder("q=*:*"); searchBox.setValue(uiQueryObject.getQuery()); searchBox.addKeyUpHandler(clickEvent -> { if (clickEvent.getNativeKeyCode() == KeyCodes.KEY_ENTER) { uiQueryObject.setQuery(searchBox.getValue()); runSearch(); } }); searchBox.getButton().setTitle("Execute Query"); searchBox.getButton().addClickHandler(clickEvent -> { uiQueryObject.setQuery(searchBox.getValue()); runSearch(); }); add(searchBox); CustomTextBox rowsIntegerBox = new CustomTextBox(); rowsIntegerBox.setPlaceHolder("rows (defaults to 10)"); if (uiQueryObject != null && uiQueryObject.getRows() != 10) { rowsIntegerBox.setValue(uiQueryObject.getRows() + ""); } rowsIntegerBox.getTextBox().addChangeHandler(changeEvent -> uiQueryObject.setRows(Integer.valueOf(rowsIntegerBox.getValue()))); rowsIntegerBox.addKeyUpHandler(clickEvent -> { if (clickEvent.getNativeKeyCode() == KeyCodes.KEY_ENTER) { runSearch(); } }); add(rowsIntegerBox); filterQueryDiv = new Div(); if (!uiQueryObject.getFilterQueries().isEmpty()) { for (String fq : uiQueryObject.getFilterQueries()) { createFilterQueryWidget(fq); } } else { createFilterQueryWidget(null); } add(filterQueryDiv); }