当前位置: 首页>>代码示例>>Java>>正文


Java Panel类代码示例

本文整理汇总了Java中org.apache.wicket.markup.html.panel.Panel的典型用法代码示例。如果您正苦于以下问题:Java Panel类的具体用法?Java Panel怎么用?Java Panel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Panel类属于org.apache.wicket.markup.html.panel包,在下文中一共展示了Panel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSearchForm

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
private Panel createSearchForm(String id) {
    final SearchFormPanel form = new SearchFormPanel(id, getModel()) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            // reset expansion state of search results
            searchResultsPanel.resetExpansion();

            //transition from simple
            if (simpleModeModel.getObject()) {
                simpleModeModel.setObject(false);
                if (target != null) {
                    target.prependJavaScript("cb|transitionFromSimple(cb);");
                    target.add(searchContainer); //update everything within container
                }
            }

            updateSelection(target);
        }

    };
    form.setOutputMarkupId(true);
    return form;
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:25,代码来源:FacetedSearchPage.java

示例2: addScenarioTabs

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
private void addScenarioTabs() {
	tabs = new ArrayList<ITab>();

	// tabs.add(new AbstractTab(new Model<String>("GET Scenario 3")) {
	// @Override
	// public Panel getPanel(final String panelId) {
	// return new Scenario3Panel(panelId, panel);
	// }
	// });

	final Map<String, List<ReplayFileBean>> fileBeans = ReplayerContainer.getFileBeans();

	for (final String category : fileBeans.keySet()) {
		tabs.add(new AbstractTab(new Model<String>(category)) {
			@Override
			public Panel getPanel(final String panelId) {
				return new CategoryPanel(panelId, panel, category, fileBeans.get(category));
			}
		});
	}

	this.layoutForm.addOrReplace(new Collapsible("collapsible", tabs, Model.of(-1)));
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:24,代码来源:FilesPanel.java

示例3: getPanel

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
@Override
public WebMarkupContainer getPanel(final String containerId) {
    final Object modelValue = panelModel.getObject();
    final Panel panel = PanelFactory.get().getPanel(containerId, modelValue);
    final Boolean behaviorAdded = panel.getMetaData(KEY_DISABLED_BEHAVIOR_ADDED);
    if (behaviorAdded == null || !behaviorAdded) {
        panel.setMetaData(KEY_DISABLED_BEHAVIOR_ADDED, true);
        panel.add(new Behavior() {
            @Override
            public void onConfigure(final Component component) {
                super.onConfigure(component);
                component.setEnabled(ModelTab.this.isEnabled());
            }
        });
    } else {
        throw new IllegalStateException(
                "KEY_DISABLED_BEHAVIOR_ADDED not expected, since panels are normally not cached!");
    }
    return panel;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:21,代码来源:ModelTab.java

示例4: process

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
@Override
public void process(final Component component) {
    Assertions.assertThat(isShowing()).isFalse();
    final Panel modalPanel = PanelFactory.get().getPanel(ModalContainer.PANEL_MARKUP_ID, modelObject);
    if (modal == null) {
        final HtmlContext parentContext = HtmlContext.get(component);
        if (parentContext != null) {
            modal = parentContext.getComponentRegistry().getComponent(ModalHtmlElement.WICKET_ID);
        }
    }
    if (modal == null) {
        modal = Components.findComponent(ModalContainer.class, component);
    }
    if (modal == null) {
        //use root modal
        modal = Components.findComponent(ModalContainer.class, component.getPage());
    }
    Assertions.assertThat(modal).as("No %s found in component hierarchy!", ModalContainer.class).isNotNull();
    final IModel<String> title = getTitle(modalPanel);
    modal.show(title, modalPanel, dimension);
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:22,代码来源:ShowModalPanelGuiTask.java

示例5: getModuleSpecificTabbedPanel

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
/**
 * Returns the module-specific tabbed panel to display
 *
 * @param forcedModule ID module to display instead of a one that might be specified in the parameters
 * @return Module specific tabbed panel
 */
private Panel getModuleSpecificTabbedPanel(String forcedModule) {
    String buildName = getBuildName();
    String buildNumber = getBuildNumber();
    String buildStarted = null;
    String moduleId;

    /**
     * If the forced module is specified, it means that the user entered a request with a module id, but no build
     * started parameter
     */
    if (StringUtils.isNotBlank(forcedModule)) {
        moduleId = forcedModule;
    } else {
        //Normal request from artifactory, containing all needed parameters
        buildStarted = getStringParameter(BUILD_STARTED);
        moduleId = getModuleId();
    }
    Build build = getBuild(buildName, buildNumber, buildStarted);
    Module module = getModule(build, moduleId);
    pageParameters.set(BUILD_STARTED, buildStarted);
    pageParameters.set(MODULE_ID, moduleId);
    return new BuildTabbedPanel(CHILD_PANEL_ID, build, module);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:30,代码来源:BuildBrowserRootPage.java

示例6: ViewFriends

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
public ViewFriends(final String userUuid) {
	
	log.debug("ViewFriends()");
	
	//get user viewing this page
	final String currentUserUuid = sakaiProxy.getCurrentUserId();
			
	//check person viewing this page (currentuserId) is allowed to view userId's friends - unless admin
	if(!sakaiProxy.isSuperUser()){
		boolean isFriendsListVisible = privacyLogic.isActionAllowed(userUuid, currentUserUuid, PrivacyType.PRIVACY_OPTION_MYFRIENDS);
		if(!isFriendsListVisible) {
			throw new ProfileFriendsIllegalAccessException("User: " + currentUserUuid + " is not allowed to view the friends list for: " + userUuid);
		}
	}
	
	//show confirmed friends panel for the given user
	Panel confirmedFriends = new ConfirmedFriends("confirmedFriends", userUuid);
	confirmedFriends.setOutputMarkupId(true);
	add(confirmedFriends);
	
	//post view event
	sakaiProxy.postEvent(ProfileConstants.EVENT_FRIENDS_VIEW_OTHER, "/profile/"+userUuid, false);
	
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:25,代码来源:ViewFriends.java

示例7: getLink

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
@Override
public AbstractLink getLink(String id) {
	return new AjaxLink<Void>(id) {

		private static final long serialVersionUID = 1L;

		@Override
		public void onClick(AjaxRequestTarget target) {
			if (widget.hasSettings()) {
				WidgetPanel widgetPanel = findParent(WidgetPanel.class);
				Panel settingsPanel = widgetPanel.getSettingsPanel();
				settingsPanel.setVisible(true);
				target.add(settingsPanel);
			}
		}
		
	};
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:19,代码来源:WidgetAction.java

示例8: buildTabList

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
private List<ITab> buildTabList() {

        final List<ITab> tabs = new ArrayList<>();

        for (final SchemaType schemaType : SchemaType.values()) {
            tabs.add(new AbstractTab(new Model<>(schemaType.name())) {

                private static final long serialVersionUID = 1037272333056449378L;

                @Override
                public Panel getPanel(final String panelId) {
                    return new SchemaTypePanel(panelId, schemaType, pageReference);
                }
            });
        }
        return tabs;
    }
 
开发者ID:apache,项目名称:syncope,代码行数:18,代码来源:SchemasPanel.java

示例9: customResultBody

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
protected Panel customResultBody(final String panelId, final AnyWrapper<A> item, final Serializable result) {
    if (!(result instanceof ProvisioningResult)) {
        throw new IllegalStateException("Unsupported result type");
    }

    return new StatusPanel(
            panelId,
            ((ProvisioningResult<A>) result).getEntity(),
            new ListModel<>(new ArrayList<>()),
            ((ProvisioningResult<A>) result).getPropagationStatuses().stream().
                    map(input -> {
                        ConnObjectTO before = input.getBeforeObj();
                        ConnObjectWrapper afterObjWrapper = new ConnObjectWrapper(
                                ((ProvisioningResult<A>) result).getEntity(),
                                input.getResource(),
                                input.getAfterObj());
                        return Pair.of(before, afterObjWrapper);
                    }).collect(Collectors.toList()),
            pageRef);
}
 
开发者ID:apache,项目名称:syncope,代码行数:23,代码来源:AnyDirectoryPanel.java

示例10: getValuePanel

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
/**
 * Get panel for attribute value (not remote status).
 *
 * @param id component id to be replaced with the fragment content.
 * @param attrTO remote attribute.
 * @return fragment.
 */
private Panel getValuePanel(final String id, final String schemaName, final AttrTO attrTO) {
    Panel field;
    if (attrTO == null) {
        field = new AjaxTextFieldPanel(id, schemaName, new Model<>());
    } else if (CollectionUtils.isEmpty(attrTO.getValues())) {
        field = new AjaxTextFieldPanel(id, schemaName, new Model<>());
    } else if (ConnIdSpecialName.PASSWORD.equals(schemaName)) {
        field = new AjaxTextFieldPanel(id, schemaName, new Model<>("********"));
    } else if (attrTO.getValues().size() == 1) {
        field = new AjaxTextFieldPanel(id, schemaName, new Model<>(attrTO.getValues().get(0)));
    } else {
        field = new MultiFieldPanel.Builder<>(new ListModel<>(attrTO.getValues())).build(
                id,
                schemaName,
                new AjaxTextFieldPanel("panel", schemaName, new Model<>()));
    }

    field.setEnabled(false);
    return field;
}
 
开发者ID:apache,项目名称:syncope,代码行数:28,代码来源:ConnObjectPanel.java

示例11: Details

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
public Details(final RoleWrapper modelObject) {
    add(new AjaxTextFieldPanel(
            "key", "key", new PropertyModel<>(modelObject.getInnerObject(), "key"), false).
            setEnabled(StringUtils.isEmpty(modelObject.getInnerObject().getKey())));

    // ------------------------
    // dynMembershipCond
    // ------------------------
    add(new Accordion("dynMembershipCond", Collections.<ITab>singletonList(
            new AbstractTab(new ResourceModel("dynMembershipCond", "Dynamic USER Membership Conditions")) {

        private static final long serialVersionUID = 1037272333056449378L;

        @Override
        public Panel getPanel(final String panelId) {
            return new UserSearchPanel.Builder(
                    new PropertyModel<>(modelObject, "dynClauses")).
                    required(true).build(panelId);
        }
    }), Model.of(StringUtils.isBlank(modelObject.getDynMembershipCond()) ? -1 : 0)).setOutputMarkupId(true));
    // ------------------------
}
 
开发者ID:apache,项目名称:syncope,代码行数:23,代码来源:RoleWizardBuilder.java

示例12: addAction

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
/**
 * Adds the given action. If the action is a panel, it is added as a child
 * to this container.
 */
public ActionsColumn<T> addAction(DataTableAction<T> action) {

    if (accessController == null) {
        throw new RuntimeException("You must set the access controller on the data table before adding actions");
    }

    if (accessController.canAccess(action.getClass())) {
        actions.add(action);
    }

    if (action instanceof Panel) {
        dataTablePanel.addPanel((Panel) action);
    }

    return this;
}
 
开发者ID:jkrasnay,项目名称:panelized,代码行数:21,代码来源:ActionsColumn.java

示例13: executeAction

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
public void executeAction(AjaxRequestTarget target) {
    Entity entity = getActionContext().getEntity();
    try {
        Report report = (Report) entity;
        Panel workPanel;
        if (ReportConstants.NEXT.equals(report.getType())) {
            workPanel = new UploadNextReportPanel("work", report);
            //setResponsePage(new UploadNextReportPage(report));
        } else {
            workPanel = new UploadJasperReportPanel("work", report);
            //setResponsePage(new UploadJasperReportPage(report));
        }

        EntityBrowserPanel panel = findParent(EntityBrowserPanel.class);
        panel.forwardWorkspace(workPanel, target);

    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:21,代码来源:UpdateActionLink.java

示例14: forwardWorkspace

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
public void forwardWorkspace(Panel panel, AjaxRequestTarget target) {
    if (stack.size() > STACK_MAX_SIZE) {
        // clear all
        stack.pop();
        while (stack.size() > 1) {
            stack.pop();
        }
    }

    panel.setOutputMarkupId(true);
    workContainer.replace(panel);
    stack.push(panel);

    if (target != null) {
        target.add(workContainer);
    }
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:18,代码来源:StackPanel.java

示例15: getPanel

import org.apache.wicket.markup.html.panel.Panel; //导入依赖的package包/类
public Panel getPanel(String panelId) {
	if (type == GENERAL_SETTINGS) {
		return new GeneralSettingsPanel("panel");
	} else if (type == DISTRIBUTION_SETTINGS) {
		return new DistributionSettingsPanel("panel");	
	} else if (type == JASPER_SETTINGS) {
		return new JasperSettingsPanel("panel");
	} else if (type == LOOK_SETTINGS) {
		return new ChangeLogoPanel("panel");
	} else if (type == SYNCHRONIZER_SETTINGS) {
		return new SynchronizerSettingsPanel("panel");
	} else if (type == THREAD_POOL_SETTINGS) {
		return new SchedulerSettingsPanel("panel");
	} else if (type == IFRAME_SETTINGS) {
		return new IFrameSettingsPanel("panel");
	} else if (type == INTEGRATION_SETTINGS) {
		return new IntegrationSettingsPanel("panel");
	} else if (type == HISTORY_SETTINGS) {			
		return new CleanHistorySettingsPanel("panel");
	} else {			
		return new GeneralSettingsPanel("panel");
	}
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:24,代码来源:SettingsTab.java


注:本文中的org.apache.wicket.markup.html.panel.Panel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。