本文整理汇总了Java中com.vaadin.ui.UriFragmentUtility.FragmentChangedEvent类的典型用法代码示例。如果您正苦于以下问题:Java FragmentChangedEvent类的具体用法?Java FragmentChangedEvent怎么用?Java FragmentChangedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FragmentChangedEvent类属于com.vaadin.ui.UriFragmentUtility包,在下文中一共展示了FragmentChangedEvent类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fragmentChanged
import com.vaadin.ui.UriFragmentUtility.FragmentChangedEvent; //导入依赖的package包/类
public void fragmentChanged(FragmentChangedEvent source) {
String fragment = source.getUriFragmentUtility().getFragment();
if (fragment != null && !"".equals(fragment)) {
UriFragment uriFragment = new UriFragment(fragment);
// Find appropriate handler based on the first part of the URI
Navigator navigationHandler = null;
if(uriFragment.getUriParts() != null && uriFragment.getUriParts().size() > 0) {
navigationHandler = navigatorManager.getNavigator(uriFragment.getUriParts().get(0));
}
if(navigationHandler == null) {
navigationHandler = navigatorManager.getDefaultNavigator();
}
// Delegate navigation to handler
navigationHandler.handleNavigation(uriFragment);
}
}
示例2: fragmentChanged
import com.vaadin.ui.UriFragmentUtility.FragmentChangedEvent; //导入依赖的package包/类
@Override
public void fragmentChanged(FragmentChangedEvent source) {
m_settingFragment++;
String fragment = source.getUriFragmentUtility().getFragment();
m_historyManager.applyHistory(fragment, m_graphContainer);
m_settingFragment--;
}