本文整理汇总了Java中org.jboss.errai.ui.nav.client.local.HistoryToken类的典型用法代码示例。如果您正苦于以下问题:Java HistoryToken类的具体用法?Java HistoryToken怎么用?Java HistoryToken使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HistoryToken类属于org.jboss.errai.ui.nav.client.local包,在下文中一共展示了HistoryToken类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleCreateLinkButtonClicked
import org.jboss.errai.ui.nav.client.local.HistoryToken; //导入依赖的package包/类
@EventHandler("shareButton")
private void handleCreateLinkButtonClicked(ClickEvent event)
{
HashMap<String, String> map = new HashMap<String, String>();
map.put("t", text.getValue());
map.put("r", regex.getValue());
map.put("x", replacement.getValue());
Multimap<String, String> multimap = Multimaps.forMap(map);
HistoryToken token = HistoryToken.of("!", multimap);
assignTop(token.toString());
shareButtonTransition.go(multimap);
}
示例2: pageShowing
import org.jboss.errai.ui.nav.client.local.HistoryToken; //导入依赖的package包/类
@PageShowing
private void pageShowing(HistoryToken token)
{
boolean update = false;
Collection<String> texts = token.getState().get("t");
if (!texts.isEmpty())
{
text.setValue(texts.iterator().next());
update = true;
}
Collection<String> regexes = token.getState().get("r");
if (!regexes.isEmpty())
{
regex.setValue(regexes.iterator().next());
update = true;
}
Collection<String> replacements = token.getState().get("x");
if (!replacements.isEmpty())
{
replacement.setValue(replacements.iterator().next());
update = true;
}
if (update)
{
new Timer() {
@Override
public void run()
{
requestUpdate();
}
}.schedule(DELAY);
}
}
示例3: createPageHref
import org.jboss.errai.ui.nav.client.local.HistoryToken; //导入依赖的package包/类
/**
* Creates an href to a page.
* @param pageName
* @param state
*/
protected String createPageHref(String pageName, Multimap<String, String> state) {
HistoryToken token = HistoryToken.of(pageName, state);
String href = "#" + token.toString(); //$NON-NLS-1$
return href;
}
示例4: createSrampUiUrl
import org.jboss.errai.ui.nav.client.local.HistoryToken; //导入依赖的package包/类
/**
* Creates a link into the s-ramp UI.
*
* @param pageName
* the page name
* @param state
* the state
* @return the string
*/
public String createSrampUiUrl(String pageName, Multimap<String, String> state) {
HistoryToken token = HistoryToken.of(pageName, state);
String href = srampUiUrlBase + "#" + token.toString(); //$NON-NLS-1$
return href;
}