本文整理汇总了Java中org.apache.wicket.markup.html.link.AbstractLink.isVisible方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractLink.isVisible方法的具体用法?Java AbstractLink.isVisible怎么用?Java AbstractLink.isVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.html.link.AbstractLink
的用法示例。
在下文中一共展示了AbstractLink.isVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import org.apache.wicket.markup.html.link.AbstractLink; //导入方法依赖的package包/类
@Override
protected List<MenuItem> load() {
Injector.get().inject(this);
List<MenuItem> menuItems = new ArrayList<MenuItem>();
Object dashboard = model.getObject();
DashboardSection dashboardSection = (DashboardSection)sectionManager.getSection(DashboardSection.ID);
List<ActionContributor> popupContributors = dashboardSection.getPopupContributors();
if (popupContributors != null) {
for (ActionContributor contributor : popupContributors) {
if (contributor.isVisible()) {
AbstractLink link = contributor.getLink(createActionContext(dashboard));
if (link.isVisible()) {
menuItems.add(new MenuItem(link, contributor.getActionName(), contributor.getActionImage()));
}
}
}
}
//MenuItem menuItem = new MenuItem("images/" + ThemesManager.getActionImage(storageService.getSettings().getColorTheme()), null);
MenuItem menuItem = new MenuItem("images/actions.png", null);
menuItem.setMenuItems(menuItems);
return Arrays.asList(menuItem);
}
示例2: load
import org.apache.wicket.markup.html.link.AbstractLink; //导入方法依赖的package包/类
@Override
protected List<MenuItem> load() {
Injector.get().inject(this);
List<MenuItem> menuItems = new ArrayList<MenuItem>();
Object analysis = model.getObject();
AnalysisSection analysisSection = (AnalysisSection)sectionManager.getSection(AnalysisSection.ID);
List<ActionContributor> popupContributors = analysisSection.getPopupContributors();
if (popupContributors != null) {
for (ActionContributor contributor : popupContributors) {
if (contributor.isVisible()) {
AbstractLink link = contributor.getLink(createActionContext(analysis));
if (link.isVisible()) {
menuItems.add(new MenuItem(link, contributor.getActionName(), contributor.getActionImage()));
}
}
}
}
//MenuItem menuItem = new MenuItem("images/" + ThemesManager.getActionImage(storageService.getSettings().getColorTheme()), null);
MenuItem menuItem = new MenuItem("images/actions.png", null);
menuItem.setMenuItems(menuItems);
return Arrays.asList(menuItem);
}