List of usage examples for com.google.gwt.user.client.ui InlineHyperlink setHTML
public void setHTML(SafeHtml html)
From source file:com.gwtplatform.samples.hplace.client.application.breadcrumbs.BreadcrumbsView.java
License:Apache License
@Override public void setBreadcrumbs(int index, String title) { InlineHyperlink hyperlink = (InlineHyperlink) breadcrumbs.getWidget(index * 2); if (title == null) { hyperlink.setHTML("Unknown title"); } else {/*from www .j av a2 s. com*/ hyperlink.setHTML(title); } }
From source file:com.philbeaudoin.gwtphplacesample.client.view.BreadcrumbsView.java
License:Apache License
@Override public void setBreadcrumbs(int index, String title) { InlineHyperlink hyperlink = (InlineHyperlink) breadcrumbs.getWidget(index * 2); if (title == null) hyperlink.setHTML("Unknown title"); else/*from www . jav a 2 s .co m*/ hyperlink.setHTML(title); }
From source file:de.knightsoftnet.navigation.client.ui.navigation.TreeNavigationView.java
License:Apache License
/** * create navigation in a recursive way. * * @param pitem the item to add new items * @param plist the list of the navigation entries * @param pactiveEntry the active entry/*from www. j a v a 2 s . c o m*/ */ public void createRecursiveNavigation(final TreeItem pitem, final List<NavigationEntryInterface> plist, final NavigationEntryInterface pactiveEntry) { for (final NavigationEntryInterface navEntry : plist) { final TreeItem newItem; if (navEntry instanceof NavigationEntryFolder) { newItem = new TreeItem(navEntry.getMenuValue()); this.createRecursiveNavigation(newItem, ((NavigationEntryFolder) navEntry).getSubEntries(), pactiveEntry); newItem.setState(navEntry.isOpenOnStartup()); } else if (navEntry instanceof NavigationLink) { final Anchor link = ((NavigationLink) navEntry).getAnchor(); link.setStylePrimaryName(this.resources.navigationStyle().link()); newItem = new TreeItem(link); } else if (navEntry.getToken() == null) { newItem = null; } else { final InlineHyperlink entryPoint = GWT.create(InlineHyperlink.class); entryPoint.setHTML(navEntry.getMenuValue()); entryPoint.setTargetHistoryToken(navEntry.getFullToken()); entryPoint.setStylePrimaryName(this.resources.navigationStyle().link()); newItem = new TreeItem(entryPoint); this.navigationMap.put(newItem, navEntry); } if (newItem != null) { pitem.addItem(newItem); if (pactiveEntry != null && pactiveEntry.equals(navEntry)) { this.selectedItem = newItem; this.selectedItem.setSelected(true); } } } }