Java Code Examples for gwt.material.design.client.ui.MaterialLink
The following examples show how to use
gwt.material.design.client.ui.MaterialLink. 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: MaterialMenuBarTest.java License: Apache License 2.0 | 6 votes |
public void testStructure() { // given MaterialMenuBar menuBar = getWidget(false); // when / then final String ACTIVATOR = "dp-activator"; MaterialLink link = new MaterialLink(); MaterialDropDown dropDown = new MaterialDropDown(); link.setActivates(ACTIVATOR); dropDown.setActivator(ACTIVATOR); menuBar.add(link); menuBar.add(dropDown); assertEquals(ACTIVATOR, link.getActivates()); assertEquals(ACTIVATOR, dropDown.getActivator()); assertEquals(link, menuBar.getWidget(0)); assertEquals(dropDown, menuBar.getWidget(1)); }
Example 2
Source Project: lumongo Source File: CustomTextBox.java License: Apache License 2.0 | 6 votes |
public CustomTextBox(boolean hasButton) { addStyleName(MainResources.GSS.searchBox()); textBox = new TextBox(); textBox.setStyleName(MainResources.GSS.searchBoxInput()); add(textBox); if (hasButton) { button = new MaterialLink(); button.setIconType(IconType.SEARCH); button.setIconColor(Color.WHITE); add(button); } }
Example 3
Source Project: lumongo Source File: FilterQueryWidget.java License: Apache License 2.0 | 6 votes |
public FilterQueryWidget() { addStyleName(MainResources.GSS.searchBox()); textBox = new TextBox(); textBox.setStyleName(MainResources.GSS.searchBoxInput()); add(textBox); plusButton = new MaterialLink(); plusButton.setIconType(IconType.ADD); plusButton.setIconColor(Color.WHITE); add(plusButton); minusButton = new MaterialLink(); minusButton.setIconType(IconType.REMOVE); minusButton.setIconColor(Color.WHITE); add(minusButton); }
Example 4
Source Project: gwt-material-demo Source File: MenuBarView.java License: Apache License 2.0 | 5 votes |
@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 5
Source Project: gwt-material-demo Source File: DialogsView.java License: Apache License 2.0 | 5 votes |
@UiHandler("btnToastAction") void onToastAction(ClickEvent e) { MaterialLink link = new MaterialLink("UNDO"); link.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { MaterialToast.fireToast("UNDO DONE"); } }); new MaterialToast(link).toast("Item Deleted"); }
Example 6
Source Project: gwt-material-addins Source File: MaterialPopupMenuTest.java License: Apache License 2.0 | 5 votes |
@Override protected MaterialPopupMenu createWidget() { MaterialPopupMenu popupMenu = new MaterialPopupMenu(); for (int i = 1; i <= 5; i++) { MaterialLink link = new MaterialLink(); popupMenu.add(link); } return popupMenu; }
Example 7
Source Project: lumongo Source File: CustomTabPanel.java License: Apache License 2.0 | 5 votes |
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 8
Source Project: lumongo Source File: CustomTabPanel.java License: Apache License 2.0 | 5 votes |
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 9
Source Project: lumongo Source File: QueryOptionsView.java License: Apache License 2.0 | 5 votes |
private void createFieldNameCollapsible(IndexInfo indexInfo) { MaterialCollapsibleItem item = new MaterialCollapsibleItem(); item.setVisible(false); fieldItems.put(indexInfo.getName(), item); MaterialCollapsibleHeader header = new MaterialCollapsibleHeader(); header.setBackgroundColor(Color.GREY_LIGHTEN_1); MaterialLink link = new MaterialLink("'" + indexInfo.getName() + "' fields"); link.setTextColor(Color.WHITE); header.add(link); MaterialCollapsibleBody body = new MaterialCollapsibleBody(); body.setPaddingTop(0); body.setBackgroundColor(Color.WHITE); CustomTabPanel tabPanel = new CustomTabPanel(TabType.DEFAULT); tabPanel.setMarginLeft(-40); tabPanel.setMarginRight(-40); String qfTabId = UIUtil.getRandomId(); MaterialTabItem qfTabItem = tabPanel.createAndAddTabListItem("QF", "#" + qfTabId); tabPanel.createAndAddTabPane(qfTabId, new FieldsDiv(indexInfo.getQfList(), uiQueryObject.getQueryFields())); header.addClickHandler(clickEvent -> qfTabItem.selectTab()); String flTabId = UIUtil.getRandomId(); tabPanel.createAndAddTabListItem("FL", "#" + flTabId); tabPanel.createAndAddTabPane(flTabId, new FieldsDiv(indexInfo.getFlList(), uiQueryObject.getDisplayFields())); String facetsTabId = UIUtil.getRandomId(); tabPanel.createAndAddTabListItem("Facets", "#" + facetsTabId); tabPanel.createAndAddTabPane(facetsTabId, new FieldsDiv(indexInfo.getFacetList(), uiQueryObject.getFacets())); body.add(tabPanel); item.add(header); item.add(body); fieldNameCollapsible.add(item); }
Example 10
Source Project: gwt-boot-samples Source File: HelloWorldView.java License: Apache License 2.0 | 4 votes |
@UiHandler("foodDropDown") void handleDropdown(SelectionEvent<Widget> callback) { MaterialToast.fireToast( "Selected : " + ((MaterialLink) callback.getSelectedItem()) .getText()); }
Example 11
Source Project: gwt-material-demo Source File: DropdownView.java License: Apache License 2.0 | 4 votes |
@UiHandler("dropdown") void onDropdown(SelectionEvent<Widget> callback){ MaterialToast.fireToast("Selected : " + ((MaterialLink)callback.getSelectedItem()).getText()); }
Example 12
Source Project: gwt-material-addins Source File: LanguageSelectorItem.java License: Apache License 2.0 | 4 votes |
public MaterialLink getLabel() { return label; }
Example 13
Source Project: gwt-material-addins Source File: MaterialWindow.java License: Apache License 2.0 | 4 votes |
public MaterialLink getLabelTitle() { return labelTitle; }
Example 14
Source Project: lumongo Source File: Header.java License: Apache License 2.0 | 4 votes |
public Header() { MaterialNavBar navBar = new MaterialNavBar(); navBar.setActivates("sideNav"); navBar.setType(NavBarType.FIXED); navBar.setWidth("100%"); navBar.setBackgroundColor(Color.GREY_DARKEN_2); MaterialNavSection navSection = new MaterialNavSection(); navSection.setTextAlign(TextAlign.RIGHT); navBar.add(navSection); sideNav = new MaterialSideNav(SideNavType.PUSH); sideNav.setWidth("60"); sideNav.setId("sideNav"); sideNav.setBackgroundColor(Color.GREY_LIGHTEN_3); sideNav.setCloseOnClick(true); sideNav.setType(SideNavType.PUSH); MaterialNavBrand navBrand = new MaterialNavBrand(); navBrand.add(new MaterialImage(MainResources.INSTANCE.logo())); navBrand.setHref("#"); navBrand.addClickHandler(clickEvent -> sideNav.hide()); sideNav.add(navBrand); { MaterialLink overView = new MaterialLink(IconType.INFO); overView.setTitle("Overview"); overView.addClickHandler(clickEvent -> MainController.get().goTo(new HomePlace())); sideNav.add(overView); } { MaterialLink indexes = new MaterialLink(IconType.SEARCH); indexes.setTitle("Query"); indexes.addClickHandler(clickEvent -> MainController.get().goTo(new QueryPlace(null))); sideNav.add(indexes); } add(navBar); add(sideNav); }
Example 15
Source Project: lumongo Source File: CustomTextBox.java License: Apache License 2.0 | 4 votes |
public MaterialLink getButton() { return button; }
Example 16
Source Project: lumongo Source File: FilterQueryWidget.java License: Apache License 2.0 | 4 votes |
public MaterialLink getPlusButton() { return plusButton; }
Example 17
Source Project: lumongo Source File: FilterQueryWidget.java License: Apache License 2.0 | 4 votes |
public MaterialLink getMinusButton() { return minusButton; }
Example 18
Source Project: gwt-material Source File: DropdownItemRenderer.java License: Apache License 2.0 | votes |
MaterialLink render(T object);