本文整理汇总了Java中de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents类的典型用法代码示例。如果您正苦于以下问题:Java NavbarComponents类的具体用法?Java NavbarComponents怎么用?Java NavbarComponents使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavbarComponents类属于de.agilecoders.wicket.core.markup.html.bootstrap.navbar包,在下文中一共展示了NavbarComponents类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: newNavbar
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
@Override
protected Navbar newNavbar(final String id) {
final Navbar navbar = super.newNavbar(id);
navbar.setBrandName(null);
navbar.setBrandImage(LOGO, Model.of("bsg-coach"));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(RedirectToGuidePage.class, Model.of("Home")).setIconType(GlyphIconType.home)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(ABaseWebApplication.get().getHomePage(), Model.of("Get Feedback"))
.setIconType(GlyphIconType.upload)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.RIGHT,
new NavbarExternalLink(Model.of("mailto:[email protected]"))
.setLabel(Model.of("Tell us what you think!")).setIconType(GlyphIconType.envelope)));
navbar.setInverted(INVERTED_HEADER_AND_FOOTER);
return navbar;
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:20,代码来源:ABsgCoachWebPage.java
示例2: createNavbarContents
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
@Override
protected void createNavbarContents(Navbar navbar) {
NavbarButton<Page> edit = new NavbarButton<Page>(EditProductPage.class, getResolver().expand(getModel().getObject()), Model.of("Edit"));
edit.setIconType(GlyphIconType.edit);
NavbarDropDownButton create = new NavbarDropDownButton(Model.of("Create")) {
@Override
protected List<AbstractLink> newSubMenuButtons(String buttonMarkupId) {
List<AbstractLink> submenus = new ArrayList<>();
BookmarkablePageLink<EditVersionPage> createHotfix = new BookmarkablePageLink<EditVersionPage>(buttonMarkupId,EditVersionPage.class,getResolver().expand(getModel().getObject()));
createHotfix.setBody(Model.of("Hotfix"));
submenus.add(createHotfix);
BookmarkablePageLink<EditVersionPage> createVersion = new BookmarkablePageLink<EditVersionPage>(buttonMarkupId,EditVersionPage.class,getResolver().expand(getModel().getObject()));
createVersion.setBody(Model.of("Version"));
submenus.add(createVersion);
return submenus;
}
};
create.setIconType(GlyphIconType.plus);
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT, edit, create));
}
开发者ID:MichaelRehberg,项目名称:gluezilla,代码行数:22,代码来源:BrowsePage.java
示例3: addSourceCodeNav
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
private void addSourceCodeNav(final Navbar navbar, final ComponentPosition position) {
navbar.addComponents(NavbarComponents.transform(position, new NavbarExternalLink(Model.of(
"https://github.com/subes/invesdwin-nowicket/tree/master/invesdwin-nowicket-parent/invesdwin-nowicket-examples/invesdwin-nowicket-examples-guide/src/main/java/de/invesdwin/nowicket/examples/guide/page")) {
@Override
protected Component newLabel(final String markupId) {
final Label label = (Label) super.newLabel(markupId);
label.setEscapeModelStrings(false);
return label;
}
}.setTarget(Target.blank).setLabel(new ResourceModel("menu.source.code"))));
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:14,代码来源:AExampleWebPage.java
示例4: addMvpExamplesNav
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
private void addMvpExamplesNav(final Navbar navbar, final ComponentPosition position) {
navbar.addComponents(
NavbarComponents.transform(position, new NavbarDropDownButton(new ResourceModel("menu.mvp.examples")) {
@Override
protected List<AbstractLink> newSubMenuButtons(final String buttonMarkupId) {
final List<AbstractLink> subMenu = new ArrayList<AbstractLink>();
subMenu.add(new IconMenuBookmarkablePageLink<Void>(RedirectToMvpBsgcoachPage.class,
new ResourceModel("menu.bsgcoach").wrapOnAssignment(navbar),
RedirectToMvpBsgcoachPage.ICON));
subMenu.add(new IconMenuBookmarkablePageLink<Void>(RedirectToMvpEvaPage.class,
new ResourceModel("menu.eva").wrapOnAssignment(navbar), RedirectToMvpEvaPage.ICON));
return subMenu;
}
@Override
protected Component newButtonLabel(final String markupId, final IModel<?> labelModel) {
final Label label = (Label) super.newButtonLabel(markupId, labelModel);
label.setEscapeModelStrings(false);
return label;
}
}));
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:28,代码来源:AExampleWebPage.java
示例5: newNavbar
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
@Override
protected Navbar newNavbar(final String id) {
final Navbar navbar = super.newNavbar(id);
navbar.setBrandName(null);
navbar.setBrandImage(LOGO, Model.of("EVA"));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(RedirectToGuidePage.class, Model.of("Home")).setIconType(GlyphIconType.home)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(ABaseWebApplication.get().getHomePage(), Model.of("Decision"))
.setIconType(GlyphIconType.home)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(PleaseWaitPage.class, Model.of("Ask EVA"))
.setIconType(FontAwesomeIconType.question_circle)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(FeedbackPage.class, Model.of("Feedback"))
.setIconType(FontAwesomeIconType.exclamation_circle)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(DashboardPage.class, Model.of("Dashboard"))
.setIconType(FontAwesomeIconType.tachometer)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(DetailsPage.class, Model.of("Details"))
.setIconType(FontAwesomeIconType.search)));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.RIGHT,
new NavbarExternalLink(Model.of("mailto:[email protected]")).setLabel(Model.of(""))
.setIconType(GlyphIconType.envelope)));
return navbar;
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:30,代码来源:AEvaWebPage.java
示例6: newNavbar
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
@Override
protected Navbar newNavbar(final String id) {
final Navbar navbar = super.newNavbar(id);
navbar.setBrandName(Model.of("RemoteList"));
navbar.setBrandImage(new PackageResourceReference(ARemotelistPage.class, "logo.png"), null);
if (Roles.get().hasRole(Roles.USER)) {
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(ShowCategoriesPage.class, Model.of("Categories "))));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(ShowServersPage.class, Model.of("Servers"))));
}
return navbar;
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:15,代码来源:ARemotelistPage.java
示例7: createNavbarContents
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
@Override
protected void createNavbarContents(Navbar navbar) {
super.createNavbarContents(navbar);
NavbarButton<Page> create = new NavbarButton<>(EditProductPage.class, Model.of("Create"));
create.setIconType(GlyphIconType.plus);
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT, create));
NavbarButton<Page> admin = new NavbarButton<>(NotFinishedPage.class, Model.of("Admin"));
admin.setIconType(GlyphIconType.wrench);
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.RIGHT, admin));
}
开发者ID:MichaelRehberg,项目名称:gluezilla,代码行数:12,代码来源:ChooseProductPage.java
示例8: newNavbar
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
protected Navbar newNavbar(String markupId) {
Navbar navbar = new Navbar(markupId);
navbar.setPosition(Navbar.Position.TOP);
// show brand name
navbar.brandName(Model.of("matetracker.de"));
navbar.addComponents(NavbarComponents.transform(
Navbar.ComponentPosition.LEFT, new NavbarButton<Homepage>(
Homepage.class, Model.of("Home"))
.setIconType(IconType.home)
));
if (getUser().getObject().getRole() == Role.Admin) {
navbar.addComponents(NavbarComponents.transform(
Navbar.ComponentPosition.RIGHT,
new NavbarButton<UserPage>(UserPage.class, Model.of(_(
"menu.user").getString()))
.setIconType(IconType.user)));
navbar.addComponents(NavbarComponents.transform(
Navbar.ComponentPosition.RIGHT,
new NavbarButton<AdminPage>(AdminPage.class, Model.of(_(
"menu.admin").getString()))
.setIconType(IconType.warningsign)));
}
navbar.addComponents(new ImmutableNavbarComponent(
new NavbarButton<LogoutPage>(LogoutPage.class, Model
.of("Logout")).setIconType(IconType.off),
Navbar.ComponentPosition.RIGHT));
return navbar;
}
开发者ID:atomfrede,项目名称:freezing-octo-bear,代码行数:36,代码来源:BasePage.java
示例9: addMenuItem
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
private <P extends Page> void addMenuItem(Class<P> page, String label,
IconType icon) {
Component button = new NavbarButton<Void>(page, Model.of(getString(label)))
.setIconType(icon);
navbar.addComponents(NavbarComponents.transform(LEFT, button));
}
开发者ID:jorcox,项目名称:GeoCrawler,代码行数:7,代码来源:AbstractBasePage.java
示例10: addWicketExamplesNav
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
private void addWicketExamplesNav(final Navbar navbar, final ComponentPosition position) {
navbar.addComponents(NavbarComponents.transform(position,
new NavbarDropDownButton(new ResourceModel("menu.wicket.examples")) {
@Override
protected List<AbstractLink> newSubMenuButtons(final String buttonMarkupId) {
final List<AbstractLink> subMenu = new ArrayList<AbstractLink>();
subMenu.add(new MenuBookmarkablePageLink<Void>(HelloWorldPage.class,
new ResourceModel("menu.helloworld").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.comment));
subMenu.add(new MenuBookmarkablePageLink<Void>(FormInputPage.class,
new ResourceModel("menu.forminput").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.listalt));
subMenu.add(new MenuBookmarkablePageLink<Void>(AjaxChoicePage.class,
new ResourceModel("menu.ajaxchoice").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.alignjustify));
subMenu.add(new MenuBookmarkablePageLink<Void>(AjaxDataTablePage.class,
new ResourceModel("menu.ajaxdatatable").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.th));
subMenu.add(new MenuBookmarkablePageLink<Void>(ModalWindowStartPage.class,
new ResourceModel("menu.modal").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.newwindow));
subMenu.add(new MenuBookmarkablePageLink<Void>(WizardStartPage.class,
new ResourceModel("menu.wizard").wrapOnAssignment(navbar))
.setIconType(FontAwesomeIconType.magic));
subMenu.add(new MenuBookmarkablePageLink<Void>(TabbedPanelPage.class,
new ResourceModel("menu.tabbedpanel").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.creditcard));
subMenu.add(new MenuBookmarkablePageLink<Void>(FileUploadPage.class,
new ResourceModel("menu.fileupload").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.upload));
subMenu.add(new MenuBookmarkablePageLink<Void>(DynamicEditorFieldsPage.class,
new ResourceModel("menu.dynamiceditorfields").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.edit));
subMenu.add(new MenuBookmarkablePageLink<Void>(GuestbookExamplePage.class,
new ResourceModel("menu.guestbook").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.book));
subMenu.add(new MenuBookmarkablePageLink<Void>(WicketSecurePage.class,
new ResourceModel("menu.wicketsecure").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.lock));
subMenu.add(new MenuBookmarkablePageLink<Void>(SpringSecurePage.class,
new ResourceModel("menu.springsecure").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.lock));
if (Roles.isAuthenticated()) {
subMenu.add(new MenuBookmarkablePageLink<Void>(ABaseWebApplication.get().getSignOutPage(),
new ResourceModel("menu.sign.out").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.logout));
} else {
subMenu.add(new MenuBookmarkablePageLink<Void>(ABaseWebApplication.get().getSignInPage(),
new ResourceModel("menu.sign.in").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.login));
}
return subMenu;
}
@Override
protected Component newButtonLabel(final String markupId, final IModel<?> labelModel) {
final Label label = (Label) super.newButtonLabel(markupId, labelModel);
label.setEscapeModelStrings(false);
return label;
}
}));
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:68,代码来源:AExampleWebPage.java
示例11: addDocumentationNav
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
private void addDocumentationNav(final Navbar navbar, final ComponentPosition position) {
navbar.addComponents(
NavbarComponents.transform(position, new NavbarDropDownButton(new ResourceModel("menu.documentation")) {
@Override
protected List<AbstractLink> newSubMenuButtons(final String buttonMarkupId) {
final List<AbstractLink> subMenu = new ArrayList<AbstractLink>();
subMenu.add(new MenuBookmarkablePageLink<Void>(IntroductionPage.class,
new ResourceModel("menu.introduction").wrapOnAssignment(navbar))
.setIconType(GlyphIconType.home));
subMenu.add(new MenuBookmarkablePageLink<Void>(ConceptPage.class,
new ResourceModel("menu.concept").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(WicketIntegrationPage.class,
new ResourceModel("menu.wicketintegration").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(FrameworkHistoryPage.class,
new ResourceModel("menu.frameworkhistory").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(InstallationPage.class,
new ResourceModel("menu.installation").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(TutorialStartPage.class,
new ResourceModel("menu.tutorialstart").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(DataTypesPage.class,
new ResourceModel("menu.datatypes").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(ValidationPage.class,
new ResourceModel("menu.validation").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(UserInterfaceFlowPage.class,
new ResourceModel("menu.userinterfaceflow").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(DynamicComponentsPage.class,
new ResourceModel("menu.dynamiccomponents").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(TagTransformationsPage.class,
new ResourceModel("menu.tagtransformations").wrapOnAssignment(navbar)));
subMenu.add(new MenuBookmarkablePageLink<Void>(ClosingWordsPage.class,
new ResourceModel("menu.closingwords").wrapOnAssignment(navbar))
.setIconType(FontAwesomeIconType.microphone));
return subMenu;
}
@Override
protected Component newButtonLabel(final String markupId, final IModel<?> labelModel) {
final Label label = (Label) super.newButtonLabel(markupId, labelModel);
label.setEscapeModelStrings(false);
return label;
}
}));
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:59,代码来源:AExampleWebPage.java
示例12: addSignInNavbarComponent
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
protected void addSignInNavbarComponent(final Navbar navbar, final Class<? extends WebPage> signInPage) {
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.RIGHT,
new NavbarButton<Void>(signInPage, new ResourceModel("menu.sign.in"))
.setIconType(FontAwesomeIconType.sign_in)));
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:6,代码来源:AWebPage.java
示例13: addSignOutNavbarComponent
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
protected void addSignOutNavbarComponent(final Navbar navbar, final Class<? extends WebPage> signOutPage) {
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.RIGHT,
new NavbarButton<Void>(signOutPage, new ResourceModel("menu.sign.out"))
.setIconType(FontAwesomeIconType.sign_out)));
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:6,代码来源:AWebPage.java
示例14: addHomePageButton
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
protected void addHomePageButton(Navbar navbar) {
NavbarButton<HomePage> navbarButton = new NavbarButton<HomePage>(this.getApplication().getHomePage(),
Model.of("Home")).setIconType(IconType.home);
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT, navbarButton));
}
开发者ID:mpostelnicu,项目名称:wicket-spring-jpa-bootstrap-boilerplate,代码行数:7,代码来源:HeaderFooter.java
示例15: addLogoutButton
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents; //导入依赖的package包/类
protected void addLogoutButton(Navbar navbar) {
NavbarButton<Logout> navbarButton = new NavbarButton<Logout>(Logout.class, Model.of("Logout"))
.setIconType(IconType.off);
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.RIGHT, navbarButton));
MetaDataRoleAuthorizationStrategy.authorize(navbarButton, Component.RENDER, Roles.USER);
}
开发者ID:mpostelnicu,项目名称:wicket-spring-jpa-bootstrap-boilerplate,代码行数:7,代码来源:HeaderFooter.java
注:本文中的de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarComponents类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论