Search in sources :

Example 16 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project webanno by webanno.

the class ProjectPage method makeTabs.

private List<ITab> makeTabs() {
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(Model.of("Details")) {

        private static final long serialVersionUID = 6703144434578403272L;

        @Override
        public Panel getPanel(String panelId) {
            return new ProjectDetailPanel(panelId, selectedProject);
        }

        @Override
        public boolean isVisible() {
            return selectedProject.getObject() != null;
        }
    });
    // Add the project settings panels from the registry
    for (ProjectSettingsPanelDecl psp : projectSettingsPanelRegistryService.getPanels()) {
        AbstractTab tab = new AbstractTab(Model.of(psp.label)) {

            private static final long serialVersionUID = -1503555976570640065L;

            @Override
            public Panel getPanel(String aPanelId) {
                try {
                    return ConstructorUtils.invokeConstructor(psp.panel, aPanelId, selectedProject);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }

            @Override
            public boolean isVisible() {
                return selectedProject.getObject() != null && selectedProject.getObject().getId() != null && psp.condition.applies(selectedProject.getObject());
            }
        };
        tabs.add(tab);
    }
    return tabs;
}
Also used : AjaxTabbedPanel(org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel) ProjectTagSetsPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.tagsets.ProjectTagSetsPanel) AnnotationGuideLinePanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.guidelines.AnnotationGuideLinePanel) Panel(org.apache.wicket.markup.html.panel.Panel) BootstrapAjaxTabbedPanel(de.tudarmstadt.ukp.clarin.webanno.support.bootstrap.BootstrapAjaxTabbedPanel) ProjectDetailPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.detail.ProjectDetailPanel) ProjectUsersPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.users.ProjectUsersPanel) ProjectDetailPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.detail.ProjectDetailPanel) ArrayList(java.util.ArrayList) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ProjectSettingsPanelDecl(de.tudarmstadt.ukp.clarin.webanno.ui.core.settings.ProjectSettingsPanelRegistryService.ProjectSettingsPanelDecl) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 17 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project syncope by apache.

the class SAML2SP method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>(2);
    tabs.add(new AbstractTab(new ResourceModel("idps")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new SAML2IdPsDirectoryPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("sp")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new SAML2SPPanel(panelId);
        }
    });
    return tabs;
}
Also used : AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) SAML2SPPanel(org.apache.syncope.client.console.panels.SAML2SPPanel) Panel(org.apache.wicket.markup.html.panel.Panel) SAML2IdPsDirectoryPanel(org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel) ArrayList(java.util.ArrayList) SAML2SPPanel(org.apache.syncope.client.console.panels.SAML2SPPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ResourceModel(org.apache.wicket.model.ResourceModel) SAML2IdPsDirectoryPanel(org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 18 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project syncope by apache.

the class Notifications method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(new ResourceModel("notifications")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new NotificationDirectoryPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("notification.templates")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new MailTemplateDirectoryPanel(panelId, getPageReference());
        }
    });
    return tabs;
}
Also used : Panel(org.apache.wicket.markup.html.panel.Panel) NotificationDirectoryPanel(org.apache.syncope.client.console.notifications.NotificationDirectoryPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) MailTemplateDirectoryPanel(org.apache.syncope.client.console.notifications.MailTemplateDirectoryPanel) MailTemplateDirectoryPanel(org.apache.syncope.client.console.notifications.MailTemplateDirectoryPanel) ArrayList(java.util.ArrayList) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ResourceModel(org.apache.wicket.model.ResourceModel) NotificationDirectoryPanel(org.apache.syncope.client.console.notifications.NotificationDirectoryPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 19 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project syncope by apache.

the class Dashboard method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(new ResourceModel("overview")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new DashboardOverviewPanel(panelId);
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("accessTokens")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new DashboardAccessTokensPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("control")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new DashboardControlPanel(panelId, getPageReference());
        }
    });
    ClassPathScanImplementationLookup classPathScanImplementationLookup = (ClassPathScanImplementationLookup) SyncopeConsoleApplication.get().getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP);
    final List<Class<? extends BaseExtWidget>> extWidgetClasses = classPathScanImplementationLookup.getExtWidgetClasses();
    if (!extWidgetClasses.isEmpty()) {
        tabs.add(new AbstractTab(new ResourceModel("extensions")) {

            private static final long serialVersionUID = -6815067322125799251L;

            @Override
            public Panel getPanel(final String panelId) {
                return new DashboardExtensionsPanel(panelId, extWidgetClasses, getPageReference());
            }
        });
    }
    return tabs;
}
Also used : DashboardAccessTokensPanel(org.apache.syncope.client.console.panels.DashboardAccessTokensPanel) ArrayList(java.util.ArrayList) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) DashboardExtensionsPanel(org.apache.syncope.client.console.panels.DashboardExtensionsPanel) DashboardExtensionsPanel(org.apache.syncope.client.console.panels.DashboardExtensionsPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) Panel(org.apache.wicket.markup.html.panel.Panel) DashboardOverviewPanel(org.apache.syncope.client.console.panels.DashboardOverviewPanel) DashboardAccessTokensPanel(org.apache.syncope.client.console.panels.DashboardAccessTokensPanel) DashboardControlPanel(org.apache.syncope.client.console.panels.DashboardControlPanel) DashboardOverviewPanel(org.apache.syncope.client.console.panels.DashboardOverviewPanel) ClassPathScanImplementationLookup(org.apache.syncope.client.console.init.ClassPathScanImplementationLookup) DashboardControlPanel(org.apache.syncope.client.console.panels.DashboardControlPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ResourceModel(org.apache.wicket.model.ResourceModel) BaseExtWidget(org.apache.syncope.client.console.widgets.BaseExtWidget)

Example 20 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project syncope by apache.

the class Logs method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>(2);
    tabs.add(new AbstractTab(new Model<>("Core")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new CoreLogPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new Model<>("Console")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new ConsoleLogPanel(panelId, getPageReference());
        }
    });
    return tabs;
}
Also used : Panel(org.apache.wicket.markup.html.panel.Panel) ConsoleLogPanel(org.apache.syncope.client.console.panels.ConsoleLogPanel) CoreLogPanel(org.apache.syncope.client.console.panels.CoreLogPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) ArrayList(java.util.ArrayList) Model(org.apache.wicket.model.Model) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ConsoleLogPanel(org.apache.syncope.client.console.panels.ConsoleLogPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) CoreLogPanel(org.apache.syncope.client.console.panels.CoreLogPanel)

Aggregations

AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)29 ArrayList (java.util.ArrayList)26 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)26 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)16 Panel (org.apache.wicket.markup.html.panel.Panel)14 AjaxBootstrapTabbedPanel (de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel)11 ResourceModel (org.apache.wicket.model.ResourceModel)9 Model (org.apache.wicket.model.Model)7 TabbedPanel (com.evolveum.midpoint.web.component.TabbedPanel)5 List (java.util.List)4 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)4 WizardMgtPanel (org.apache.syncope.client.console.wizards.WizardMgtPanel)3 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)2 NonEmptyLoadableModel (com.evolveum.midpoint.gui.api.model.NonEmptyLoadableModel)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 ChangePasswordPanel (com.evolveum.midpoint.web.page.self.component.ChangePasswordPanel)2 ConnectorConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorConfigurationType)2 DirectoryPanel (org.apache.syncope.client.console.panels.DirectoryPanel)2 ActionsPanel (org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel)2 Fragment (org.apache.wicket.markup.html.panel.Fragment)2