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


Java IColumn类代码示例

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


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

示例1: addColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
public static void addColumn(TableProvider provider, List<IColumn<Map<String, Object>, String>> columns, AttributePojo attribute, TypeEnum type) {
    String column = attribute.getName();
    if (TypeEnum.Boolean == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.Boolean, Model.of(column), column, ProviderUtils::modelValue));
    } else if (TypeEnum.Long == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.Long, Model.of(column), column, ProviderUtils::modelValue));
    } else if (TypeEnum.Double == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.Double, Model.of(column), column, ProviderUtils::modelValue));
    } else if (TypeEnum.Character == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of(column), column, ProviderUtils::modelValue));
    } else if (TypeEnum.String == type || TypeEnum.Text == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of(column), column, ProviderUtils::modelValue));
    } else if (TypeEnum.Time == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.Time, Model.of(column), column, ProviderUtils::modelValue));
    } else if (TypeEnum.Date == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.Date, Model.of(column), column, ProviderUtils::modelValue));
    } else if (TypeEnum.DateTime == type) {
        columns.add(new TextFilterColumn(provider, ItemClass.DateTime, Model.of(column), column, ProviderUtils::modelValue));
    }
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:21,代码来源:ProviderUtils.java

示例2: doInitialize

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
@Override
protected void doInitialize(Border layout) {
    add(layout);

    RoleProvider provider = new RoleProvider();
    provider.selectField("roleId", String.class);

    FilterForm<Map<String, String>> filterForm = new FilterForm<>("filter-form", provider);
    layout.add(filterForm);

    List<IColumn<Map<String, Object>, String>> columns = new ArrayList<>();
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("name"), "name", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("description"), "description", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.Boolean, Model.of("system"), "system", this::modelValue));
    columns.add(new ActionFilterColumn(Model.of("action"), this::actions, this::clickable, this::itemCss, this::itemClick));

    DataTable<Map<String, Object>, String> dataTable = new DefaultDataTable<>("table", columns, provider, 20);
    dataTable.addTopToolbar(new FilterToolbar(dataTable, filterForm));
    filterForm.add(dataTable);

    BookmarkablePageLink<Void> refreshLink = new BookmarkablePageLink<>("refreshLink", RoleBrowsePage.class);
    layout.add(refreshLink);

    BookmarkablePageLink<Void> createLink = new BookmarkablePageLink<>("createLink", RoleCreatePage.class);
    layout.add(createLink);
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:27,代码来源:RoleBrowsePage.java

示例3: doInitialize

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
@Override
protected void doInitialize(Border layout) {
    add(layout);

    SectionProvider provider = new SectionProvider();
    provider.selectField("sectionId", String.class);

    FilterForm<Map<String, String>> filterForm = new FilterForm<>("filter-form", provider);
    layout.add(filterForm);

    List<IColumn<Map<String, Object>, String>> columns = new ArrayList<>();
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("title"), "title", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.Boolean, Model.of("system"), "system", this::modelValue));
    columns.add(new ActionFilterColumn(Model.of("action"), this::actions, this::clickable, this::itemCss, this::itemClick));

    DataTable<Map<String, Object>, String> dataTable = new DefaultDataTable<>("table", columns, provider, 20);
    dataTable.addTopToolbar(new FilterToolbar(dataTable, filterForm));
    filterForm.add(dataTable);

    BookmarkablePageLink<Void> refreshLink = new BookmarkablePageLink<>("refreshLink", SectionBrowsePage.class);
    layout.add(refreshLink);

    BookmarkablePageLink<Void> createLink = new BookmarkablePageLink<>("createLink", SectionCreatePage.class);
    layout.add(createLink);
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:26,代码来源:SectionBrowsePage.java

示例4: doInitialize

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
@Override
protected void doInitialize(Border layout) {
    add(layout);

    FileProvider provider = new FileProvider();

    FilterForm<Map<String, String>> filterForm = new FilterForm<>("filter-form", provider);
    layout.add(filterForm);

    List<IColumn<Map<String, Object>, String>> columns = new ArrayList<>();
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("fileId"), "fileId", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("name"), "name", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.Integer, Model.of("length"), "length", this::modelValue));
    columns.add(new TextFilterColumn(provider, ItemClass.String, Model.of("mime"), "mime", this::modelValue));
    columns.add(new ActionFilterColumn(Model.of("action"), this::actions, this::clickable, this::itemCss, this::itemClick));

    this.dataTable = new DefaultDataTable<>("table", columns, provider, 17);
    this.dataTable.addTopToolbar(new FilterToolbar(this.dataTable, filterForm));
    filterForm.add(this.dataTable);

    BookmarkablePageLink<Void> refreshLink = new BookmarkablePageLink<>("refreshLink", FileBrowsePage.class);
    layout.add(refreshLink);
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:24,代码来源:FileBrowsePage.java

示例5: initColumns

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private List<IColumn> initColumns() {
    List<IColumn> columns = new ArrayList<IColumn>();

    IColumn column = new LinkColumn<SelectableBean<ResourceType>>(createStringResource("ObjectType.name"), "name",
            "value.name") {

        @Override
        public void onClick(AjaxRequestTarget target, IModel<SelectableBean<ResourceType>> rowModel) {
            ResourceType resource = rowModel.getObject().getValue();
            resourceSelectedPerformed(target, resource);
        }
    };
    columns.add(column);


    return columns;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:18,代码来源:ResourceListPanel.java

示例6: createColumns

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
public static <T> List<IColumn<T, String>> createColumns(List<ColumnTypeDto<String>> columns) {
	List<IColumn<T, String>> tableColumns = new ArrayList<>();
	for (ColumnTypeDto<String> column : columns) {
		PropertyColumn<T, String> tableColumn = null;
		if (column.isSortable()) {
			tableColumn = createPropertyColumn(column.getColumnName(), column.getSortableColumn(),
					column.getColumnValue(), column.isMultivalue());

		} else {
			tableColumn = new PropertyColumn<T, String>(createStringResource(column.getColumnName()),
					column.getColumnValue());
		}
		tableColumns.add(tableColumn);

	}
	return tableColumns;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:18,代码来源:ColumnUtils.java

示例7: getDefaultColumns

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
public static <O extends ObjectType> List<IColumn<SelectableBean<O>, String>> getDefaultColumns(Class<? extends O> type) {
		if (type == null) {
			return getDefaultUserColumns();
		}

		if (type.equals(UserType.class)) {
			return getDefaultUserColumns();
		} else if (RoleType.class.equals(type)) {
			return getDefaultRoleColumns();
		} else if (OrgType.class.equals(type)) {
			return getDefaultOrgColumns();
		} else if (ServiceType.class.equals(type)) {
			return getDefaultServiceColumns();
		} else if (type.equals(TaskType.class)) {
			return getDefaultTaskColumns();
		} else if (type.equals(ResourceType.class)) {
			return getDefaultResourceColumns();
		} else {
			return new ArrayList<>();
//			throw new UnsupportedOperationException("Will be implemented eventually");
		}
	}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:23,代码来源:ColumnUtils.java

示例8: getEmptyIconColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getEmptyIconColumn(){
	return new IconColumn<SelectableBean<T>>(createIconColumnHeaderModel()) {
		private static final long serialVersionUID = 1L;

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel<String>() {
				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					return "";
				}
			};
		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:18,代码来源:ColumnUtils.java

示例9: getDefaultIcons

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getDefaultIcons(){
	return new IconColumn<SelectableBean<T>>(createStringResource("userBrowserDialog.type")) {

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel() {
				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					T object = rowModel.getObject().getValue();
					return object != null ? WebComponentUtil.createDefaultIcon(object.asPrismObject()) : null;
				}
			};

		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:19,代码来源:ColumnUtils.java

示例10: getRoleIconColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getRoleIconColumn(){
	return new IconColumn<SelectableBean<T>>(createIconColumnHeaderModel()) {
		private static final long serialVersionUID = 1L;

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel<String>() {
				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					T role = rowModel.getObject().getValue();
					return role != null ? WebComponentUtil.createRoleIcon(role.asPrismContainer()) : null;
				}
			};
		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:19,代码来源:ColumnUtils.java

示例11: getOrgIconColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getOrgIconColumn(){
	return new IconColumn<SelectableBean<T>>(createIconColumnHeaderModel()) {
		private static final long serialVersionUID = 1L;

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel<String>() {
				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					T org = rowModel.getObject().getValue();
					return org != null ? WebComponentUtil.createOrgIcon(org.asPrismContainer()) : null;
				}
			};
		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:19,代码来源:ColumnUtils.java

示例12: getServiceIconColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getServiceIconColumn(){
	return new IconColumn<SelectableBean<T>>(createIconColumnHeaderModel()) {

		/**
		 *
		 */
		private static final long serialVersionUID = 1L;

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel<String>() {

				/**
				 *
				 */
				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					T service = rowModel.getObject().getValue();
					return service != null ? WebComponentUtil.createServiceIcon(service.asPrismContainer()) : null;
				}
			};
		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:27,代码来源:ColumnUtils.java

示例13: getTaskIconColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getTaskIconColumn(){
	return new IconColumn<SelectableBean<T>>(createIconColumnHeaderModel()) {

		/**
		 *
		 */
		private static final long serialVersionUID = 1L;

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel<String>() {

				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					T task = rowModel.getObject().getValue();
					return task != null ? WebComponentUtil.createTaskIcon(task.asPrismContainer()) : null;
				}
			};
		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:24,代码来源:ColumnUtils.java

示例14: getAccessCertificationDefinitionIconColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getAccessCertificationDefinitionIconColumn(){
	return new IconColumn<SelectableBean<T>>(createIconColumnHeaderModel()) {
		private static final long serialVersionUID = 1L;

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel<String>() {
				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					return GuiStyleConstants.CLASS_OBJECT_CERT_DEF_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE_NORMAL;
				}
			};
		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:18,代码来源:ColumnUtils.java

示例15: getResourceIconColumn

import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; //导入依赖的package包/类
private static <T extends ObjectType> IColumn<SelectableBean<T>, String> getResourceIconColumn(){
	return new IconColumn<SelectableBean<T>>(createIconColumnHeaderModel()) {
		private static final long serialVersionUID = 1L;

		@Override
		protected IModel<String> createIconModel(final IModel<SelectableBean<T>> rowModel) {
			return new AbstractReadOnlyModel<String>() {
				private static final long serialVersionUID = 1L;

				@Override
				public String getObject() {
					T resource = rowModel.getObject().getValue();
					if (resource == null) {
						return GuiStyleConstants.CLASS_OBJECT_RESOURCE_ICON;
					} else {
						return WebComponentUtil.createResourceIcon(resource.asPrismContainer());
					}
				}
			};
		}
	};
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:23,代码来源:ColumnUtils.java


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