本文整理汇总了Java中com.google.gwt.user.client.ui.InlineHyperlink类的典型用法代码示例。如果您正苦于以下问题:Java InlineHyperlink类的具体用法?Java InlineHyperlink怎么用?Java InlineHyperlink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InlineHyperlink类属于com.google.gwt.user.client.ui包,在下文中一共展示了InlineHyperlink类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onBrowserEvent
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
@SuppressWarnings("deprecation")
public void onBrowserEvent(Context context,
Element parent, InlineHyperlink value, NativeEvent nativeEvent,
ValueUpdater<InlineHyperlink> valueUpdater) {
super.onBrowserEvent(context, parent, value, nativeEvent, valueUpdater);
Event event = Event.as(nativeEvent);
if(DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
Element target = Element.as(event.getEventTarget());
Element child = parent.getFirstChildElement();
if(child.isOrHasChild(target)) {
History.newItem(value.getTargetHistoryToken());
DOM.eventPreventDefault(event);
}
}
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:17,代码来源:HyperlinkCell.java
示例2: generateBreadcrumbs
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
/**
* Generate breadcrumbs into the specified container using the format link > link > text where the
* last breadcrumb is always plain text.
*/
private void generateBreadcrumbs(Panel container, List<Title> titles) {
container.clear();
// For all of the titles previous to the last, add a link and a separator.
for (Title notLast : titles.subList(0, titles.size() - 1)) {
container.add(new InlineHyperlink(notLast.getTitle(), notLast.getFragment()));
container.add(new InlineLabel(" > "));
}
// Append only the text for the last title.
Title lastTitle = Iterables.getLast(titles);
container.add(new InlineLabel(lastTitle.getTitle()));
if (lastTitle.getSubtitle() != null) {
Label subtitle = new InlineLabel(" - " + lastTitle.getSubtitle());
subtitle.addStyleName(style.methodSubtitle());
container.add(subtitle);
}
}
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:23,代码来源:FullView.java
示例3: getValue
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public InlineHyperlink getValue(CuratorAction action) {
Term term = getTerm(action.getEntity());
return term != null ?
new InlineHyperlink(term.getName(), term.getReferenceId()) : null;
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:8,代码来源:HistoryPopup.java
示例4: initBreadcrumbs
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public void initBreadcrumbs(int breadcrumbSize, String _heading) {
breadCrumbPanel.setVisible(true);
breadcrumbs.clear();
heading.setHTML("<h1>" + _heading + "</h1>");
for (int i = 0; i < breadcrumbSize; ++i) {
if (i > 0) {
breadcrumbs.add(new InlineLabel(" > "));
}
breadcrumbs.add(new InlineHyperlink("Loading title...", placeManager.buildRelativeHistoryToken(i + 1)));
}
}
开发者ID:jchaganti,项目名称:gharonda,代码行数:14,代码来源:AppView.java
示例5: setBreadcrumbs
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public void setBreadcrumbs(int index, String title) {
InlineHyperlink hyperlink = (InlineHyperlink) breadcrumbs.getWidget(index * 2);
if (title == null) {
hyperlink.setHTML("Unknown title");
} else {
hyperlink.setHTML(title);
}
}
开发者ID:jchaganti,项目名称:gharonda,代码行数:11,代码来源:AppView.java
示例6: render
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public void render(Context context, InlineHyperlink h, SafeHtmlBuilder sb) {
if(h != null) {
sb.append(SafeHtmlUtils.fromTrustedString(h.toString()));
}
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:7,代码来源:HyperlinkCell.java
示例7: getValue
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public InlineHyperlink getValue(Term term) {
return new InlineHyperlink(term.getName(), term.getReferenceId());
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:5,代码来源:ApproveRejectTermComposite.java
示例8: getValue
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public InlineHyperlink getValue(Relationship relationship) {
Term term = relationship.getTerm();
return new InlineHyperlink(term.getName(), term.getReferenceId());
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:6,代码来源:ApproveRejectRelationshipComposite.java
示例9: onSearch
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public void onSearch(SearchEvent event) {
final String pattern = event.getPattern();
final Object source = event.getSource();
lastPattern = pattern;
if(source != null && busyIndicator == null && source instanceof Widget) {
busyIndicator = new WidgetBusyIndicatorHandler((Widget)source, "busy-icon-left", "error-icon-left");
}
if(pattern != null && pattern.length() > 1) {
if(busyIndicator != null) {
busyIndicator.busy();
}
service.search(pattern, searchOptions.includeSynonyms(),
new AsyncCallback<List<HTMLSearchResult>>() {
public void onFailure(Throwable caught) {
ul.clear();
if(busyIndicator != null) {
busyIndicator.idle();
}
if(caught instanceof InvalidQuerySyntaxException) {
if(busyIndicator != null) {
busyIndicator.error();
}
} else {
GWT.log("Failed to load search results", caught);
ErrorView.instance().onUncaughtException(caught);
}
}
public void onSuccess(List<HTMLSearchResult> results) {
if (pattern == lastPattern) {
String filterByOntology = searchOptions.filterByOntology();
ul.clear();
for (HTMLSearchResult result : results) {
if(filterByOntology == null
|| filterByOntology.equals(result.getOntology())) {
ListItem li = new ListItem();
InlineHyperlink hyperlink = new InlineHyperlink(
SafeHtmlUtils.fromTrustedString(result.getHtml()),
result.getReferenceId());
li.add(hyperlink);
if(filterByOntology == null) {
InlineLabel ontology = new InlineLabel(result.getOntology());
ontology.addStyleName("search-result-tag");
li.add(ontology);
}
if(result.isSynonym()) {
InlineLabel synonym = new InlineLabel("synonym");
synonym.addStyleName("search-result-tag");
li.add(synonym);
}
ul.add(li);
}
}
} else {
GWT.log("Ignoring results from previous search: " + pattern);
}
if(busyIndicator != null) {
busyIndicator.idle();
}
}
});
} else {
ul.clear();
}
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:73,代码来源:SearchResultsView.java
示例10: getValue
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public InlineHyperlink getValue(Relationship relationship) {
Term term = relationship.getRelatedTerm();
return new InlineHyperlink(term.getName(), term.getReferenceId());
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:6,代码来源:RelatedTermsView.java
示例11: getValue
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public InlineHyperlink getValue(Synonym synonym) {
Term term = synonym.getTerm();
return new InlineHyperlink(term.getName(), term.getReferenceId());
}
开发者ID:Novartis,项目名称:ontobrowser,代码行数:6,代码来源:ApproveRejectSynonymComposite.java
示例12: generateAnchor
import com.google.gwt.user.client.ui.InlineHyperlink; //导入依赖的package包/类
@Override
public Widget generateAnchor(String embeddingText, String fragment) {
return new InlineHyperlink(embeddingText, fragment);
}
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:5,代码来源:JsonPrettifier.java
注:本文中的com.google.gwt.user.client.ui.InlineHyperlink类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论