• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java CheckBoxMultipleChoice类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addEventsCheckBoxMultipleChoice

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
private void addEventsCheckBoxMultipleChoice(final Form<Void> layoutForm) {
	this.eventsCheckBoxMultipleChoice = new CheckBoxMultipleChoice<ReplayFileBean>("eventsCheckBoxMultipleChoice", new PropertyModel<List<ReplayFileBean>>(this, "selectedFiles"), beans);
	this.eventsCheckBoxMultipleChoice.setOutputMarkupId(true);
	layoutForm.add(this.eventsCheckBoxMultipleChoice);

	// this.eventsCheckGroup = new
	// CheckGroup<ReplayFileBean>("eventsCheckGroup",
	// new PropertyModel<List<ReplayFileBean>>(this, "selectedFiles"));
	// this.eventsCheckGroup.add(new CheckGroupSelector("groupSelector"));
	//
	// ListView<ReplayFileBean> files = new
	// ListView<ReplayFileBean>("beans", beans) {
	// @Override
	// protected void populateItem(ListItem<ReplayFileBean> item) {
	// item.add(new Label("name", item.getModelObject().toString()));
	// }
	// };
	// files.setReuseItems(true);
	// this.eventsCheckGroup.add(files);
	// this.eventsCheckGroup.setOutputMarkupId(true);
	// layoutForm.add(this.eventsCheckGroup);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:23,代码来源:CategoryPanel.java


示例2: ProjectCasDoctorPanel

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
public ProjectCasDoctorPanel(String id, IModel<Project> aProjectModel)
{
    super(id, aProjectModel);

    setOutputMarkupId(true);
    
    Form<FormModel> form = new Form<>("casDoctorForm", PropertyModel.of(this, "formModel"));
    add(form);

    CheckBoxMultipleChoice<Class<? extends Repair>> repairs = new CheckBoxMultipleChoice<>(
            "repairs");
    repairs.setModel(PropertyModel.of(this, "formModel.repairs"));
    repairs.setChoices(CasDoctor.scanRepairs());
    repairs.setChoiceRenderer(new ChoiceRenderer<>("simpleName"));
    repairs.setPrefix("<div class=\"checkbox\">");
    repairs.setSuffix("</div>");
    repairs.setLabelPosition(LabelPosition.WRAP_AFTER);
    form.add(repairs);
        
    form.add(new LambdaAjaxButton<FormModel>("check", this::actionCheck));
    form.add(new LambdaAjaxButton<FormModel>("repair", this::actionRepair));
    add(createMessageSetsView());
}
 
开发者ID:webanno,项目名称:webanno,代码行数:24,代码来源:ProjectCasDoctorPanel.java


示例3: addEventsCheckBoxMultipleChoice

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
private void addEventsCheckBoxMultipleChoice(final Form<Void> layoutForm) {

		final List<String> fileNames = Arrays.asList("shipToEnns", "shipToEnns_additionalKremsToEnns");

		this.eventsCheckBoxMultipleChoice = new CheckBoxMultipleChoice<String>("eventsCheckBoxMultipleChoice", new PropertyModel<List<String>>(this, "selectedFiles"), fileNames);
		this.eventsCheckBoxMultipleChoice.setOutputMarkupId(true);
		layoutForm.add(this.eventsCheckBoxMultipleChoice);
	}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:9,代码来源:Scenario3Panel.java


示例4: UserPermissionsPanel

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
public UserPermissionsPanel(String aId, IModel<Project> aProject, IModel<User> aUser)
{
    super(aId);
    
    setOutputMarkupId(true);
    setOutputMarkupPlaceholderTag(true);
    
    project = aProject;
    user = aUser;
    
    Form<Void> form = new Form<>("form");
    add(form);

    CheckBoxMultipleChoice<PermissionLevel> levels = new CheckBoxMultipleChoice<>("permissions");
    levels.setPrefix("<div class=\"checkbox\">");
    levels.setSuffix("</div>");
    levels.setLabelPosition(LabelPosition.WRAP_AFTER);
    // This model adapter handles loading/saving permissions directly to the DB
    levels.setModel(new LambdaModelAdapter<Collection<PermissionLevel>>(() -> {
        return projectRepository.getProjectPermissionLevels(user.getObject(),
                project.getObject());
    }, (lvls) -> {
        projectRepository.setProjectPermissionLevels(user.getObject(), project.getObject(),
                lvls);
    }));
    levels.setChoices(LambdaModel.of(() -> Arrays.asList(PermissionLevel.ADMIN,
                PermissionLevel.CURATOR, PermissionLevel.USER)));
    levels.setChoiceRenderer(new ChoiceRenderer<PermissionLevel>("name"));
    form.add(levels);
    
    form.add(new LambdaAjaxButton<>("save", this::actionSave));
    form.add(new LambdaAjaxLink("cancel", this::actionCancel));
}
 
开发者ID:webanno,项目名称:webanno,代码行数:34,代码来源:UserPermissionsPanel.java


示例5: CheckboxGroupPanel

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
public CheckboxGroupPanel(final String id, final CheckboxGroup<T> model) {
	super(id, model);

	this.checkgroup = new CheckBoxMultipleChoice<T>("inputField",
			new PropertyModel<Collection<T>>(model, "value"), model.getChoices());
	this.decorateComponent(this.checkgroup);
	this.checkgroup.setChoiceRenderer(WickedFormsChoiceRenderer.fromChoiceLabeller(model.getChoiceLabeller()));
	this.add(this.checkgroup);
}
 
开发者ID:adessoAG,项目名称:wicked-forms,代码行数:10,代码来源:CheckboxGroupPanel.java


示例6: addEventTypeCheckBoxMultipleChoice

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
private void addEventTypeCheckBoxMultipleChoice(final Form<Void> layoutForm) {

		final List<EapEventType> eventTypes = EapEventType.findAll();

		this.eventTypesCheckBoxMultipleChoice = new CheckBoxMultipleChoice<EapEventType>("eventTypesCheckBoxMultipleChoice", new PropertyModel<ArrayList<EapEventType>>(this, "selectedEventTypes"), eventTypes) {
			private static final long serialVersionUID = 5379816935206577577L;

			@Override
			protected boolean isDisabled(final EapEventType eventType, final int index, final String selected) {
				if (!SimpleCorrelationPanel.this.correlationPage.isSimpleCorrelationWithRules()) {
					// true for event types without matching attributes
					if (SimpleCorrelationPanel.this.selectedEventTypes.isEmpty()) {
						return false;
					} else {
						for (final TypeTreeNode commonAttribute : SimpleCorrelationPanel.this.commonCorrelationAttributes) {
							/*
							 * eventType.getValueTypes().contains(commonAttribute
							 * ) is not sufficient because equality does not
							 * consider attribute type
							 */
							for (final TypeTreeNode attributeOfEventType : eventType.getValueTypes()) {
								if (attributeOfEventType.getName().equals(commonAttribute.getName()) && (attributeOfEventType.getType() == commonAttribute.getType())) {
									return false;
								}
							}
						}
						return true;
					}
				} else {
					return true;
				}
			}
		};
		this.eventTypesCheckBoxMultipleChoice.add(new AjaxFormChoiceComponentUpdatingBehavior() {
			private static final long serialVersionUID = 1L;

			@Override
			protected void onUpdate(final AjaxRequestTarget target) {
				SimpleCorrelationPanel.this.commonCorrelationAttributes.clear();
				SimpleCorrelationPanel.this.correlationPage.clearAdvancedCorrelationPanelComponents();
				SimpleCorrelationPanel.this.correlationPage.getSimpleCorrelationPanel().getCorrelationAttributesSelect().setChoices(new ArrayList<TypeTreeNode>());
				if (!SimpleCorrelationPanel.this.selectedEventTypes.isEmpty()) {
					// simple correlation
					SimpleCorrelationPanel.this.commonCorrelationAttributes.addAll(SimpleCorrelationPanel.this.selectedEventTypes.get(0).getValueTypes());
					for (final EapEventType actualEventType : SimpleCorrelationPanel.this.selectedEventTypes) {
						SimpleCorrelationPanel.this.commonCorrelationAttributes.retainAll(actualEventType.getValueTypes());
					}
					SimpleCorrelationPanel.this.correlationAttributesSelect.setChoices(SimpleCorrelationPanel.this.commonCorrelationAttributes);
					// advanced correlation - time
					SimpleCorrelationPanel.this.correlationPage.setValuesOfAdvancedCorrelationPanelComponents(SimpleCorrelationPanel.this.selectedEventTypes);
				}
				SimpleCorrelationPanel.this.correlationPage.updateAdvancedCorrelationPanelComponents(target);
				target.add(SimpleCorrelationPanel.this.correlationAttributesSelect);
				target.add(SimpleCorrelationPanel.this.eventTypesCheckBoxMultipleChoice);
			}
		});
		this.eventTypesCheckBoxMultipleChoice.setOutputMarkupId(true);
		layoutForm.add(this.eventTypesCheckBoxMultipleChoice);
	}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:60,代码来源:SimpleCorrelationPanel.java


示例7: getEventTypesCheckBoxMultipleChoice

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
public CheckBoxMultipleChoice<EapEventType> getEventTypesCheckBoxMultipleChoice() {
	return this.eventTypesCheckBoxMultipleChoice;
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:4,代码来源:SimpleCorrelationPanel.java


示例8: setEventTypesCheckBoxMultipleChoice

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
public void setEventTypesCheckBoxMultipleChoice(final CheckBoxMultipleChoice<EapEventType> eventTypesCheckBoxMultipleChoice) {
	this.eventTypesCheckBoxMultipleChoice = eventTypesCheckBoxMultipleChoice;
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:4,代码来源:SimpleCorrelationPanel.java


示例9: addExistingEventTypeSelect

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
private Component addExistingEventTypeSelect() {

		this.eventTypesCheckBoxMultipleChoice = new CheckBoxMultipleChoice<EapEventType>("eventTypesCheckBoxMultipleChoice", new PropertyModel<ArrayList<EapEventType>>(this, "selectedEventTypes"), this.eventTypes) {
			@Override
			protected boolean isDisabled(final EapEventType eventType, final int index, final String selected) {
				// true for event types without matching attributes
				if (ExistingEventTypeEditor.this.selectedEventTypes.isEmpty()) {
					return false;
				} else {
					for (final TypeTreeNode commonAttribute : ExistingEventTypeEditor.this.commonCorrelationAttributes) {
						if (eventType.getValueTypes().contains(commonAttribute)) {
							return false;
						}
					}
					return true;
				}
			}
		};
		this.eventTypesCheckBoxMultipleChoice.add(new AjaxFormChoiceComponentUpdatingBehavior() {
			private static final long serialVersionUID = 1L;

			@Override
			protected void onUpdate(final AjaxRequestTarget target) {
				ExistingEventTypeEditor.this.commonCorrelationAttributes.clear();
				if (!ExistingEventTypeEditor.this.selectedEventTypes.isEmpty()) {
					ExistingEventTypeEditor.this.commonCorrelationAttributes.addAll(ExistingEventTypeEditor.this.selectedEventTypes.get(0).getValueTypes());
					for (final EapEventType actualEventType : ExistingEventTypeEditor.this.selectedEventTypes) {
						ExistingEventTypeEditor.this.commonCorrelationAttributes.retainAll(actualEventType.getValueTypes());
					}
				}
				ExistingEventTypeEditor.this.conditionInput.setSelectedEventTypes(ExistingEventTypeEditor.this.selectedEventTypes);
				ExistingEventTypeEditor.this.conditionInput.updateAttributesValues();
				target.add(ExistingEventTypeEditor.this.conditionInput.getConditionAttributeSelect());
				target.add(ExistingEventTypeEditor.this.conditionInput.getConditionValueSelect());
				target.add(ExistingEventTypeEditor.this.relevantEventTypeColumnsPalette);
				target.add(ExistingEventTypeEditor.this.eventTypesCheckBoxMultipleChoice);
			}
		});
		this.eventTypesCheckBoxMultipleChoice.setOutputMarkupId(true);
		return this.eventTypesCheckBoxMultipleChoice;
	}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:42,代码来源:ExistingEventTypeEditor.java


示例10: isChoice

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
private static boolean isChoice(Component component) {
	return (component instanceof RadioChoice) ||
			(component instanceof CheckBoxMultipleChoice) || (component instanceof RadioGroup) ||
			(component instanceof CheckGroup);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:6,代码来源:FormComponentChangeAjaxEventBehavior.java


示例11: init

import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice; //导入依赖的package包/类
private void init(final boolean edit) {
    addMenuLink(ListConsumers.class, new ResourceModel("menu.list.consumer"), null);
    addMenuLink(ConsumerAdministration.class, new ResourceModel("menu.add.consumer"), null);

    Form consumerForm = new Form<Void>("consumerForm") {
        @Override
        protected void onSubmit() {
            super.onSubmit();
            try {
                if (edit)
                    oAuthAdminService.updateConsumer(consumer);
                else
                    oAuthAdminService.createConsumer(consumer);
                setResponsePage(ListConsumers.class);
                getSession().info(consumer.getName() + " has been saved.");
            } catch (Exception e) {
                error("Couldn't update '" + consumer.getName() + "': " + e.getLocalizedMessage());
            }
        }
    };

    TextField<String> idTextField;
    if (edit) {
        idTextField = new TextField<String>("id");
        idTextField.add(new AttributeModifier("disabled", "disabled"));
        idTextField.setModel(Model.of(consumer.getId()));
    } else {
        idTextField = new RequiredTextField<String>("id", new PropertyModel<String>(consumer, "id"));
    }
    consumerForm.add(idTextField);

    consumerForm.add(new RequiredTextField<String>("name", new PropertyModel<String>(consumer, "name")));
    consumerForm.add(new TextArea<String>("description", new PropertyModel<String>(consumer, "description")));
    consumerForm.add(new TextField<String>("url", new PropertyModel<String>(consumer, "url")));
    consumerForm.add(new TextField<String>("callbackUrl", new PropertyModel<String>(consumer, "callbackUrl")));
    consumerForm.add(new RequiredTextField<String>("secret", new PropertyModel<String>(consumer, "secret")));
    consumerForm.add(new TextField<String>("accessorSecret",
            new PropertyModel<String>(consumer, "accessorSecret")));
    consumerForm.add(new TextField<Integer>("defaultValidity",
            new PropertyModel<Integer>(consumer, "defaultValidity")));

    // Create a list of possible rights as checkboxes, pre-check already granted permissions
    CheckBoxMultipleChoice<String> rightCheckboxes = new CheckBoxMultipleChoice<String>("rights",
            new PropertyModel<Collection<String>>(consumer, "rights"), getAvailableFunctions());
    consumerForm.add(rightCheckboxes);

    add(new Label("consumerName", consumer.getName()));
    add(consumerForm);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:50,代码来源:ConsumerAdministration.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GraphicalEditor类代码示例发布时间:2022-05-22
下一篇:
Java RenderDragon类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap