本文整理汇总了Java中com.vaadin.ui.Table.setSortDisabled方法的典型用法代码示例。如果您正苦于以下问题:Java Table.setSortDisabled方法的具体用法?Java Table.setSortDisabled怎么用?Java Table.setSortDisabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Table
的用法示例。
在下文中一共展示了Table.setSortDisabled方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initMatchingUsersTable
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void initMatchingUsersTable() {
matchingUsersTable = new Table();
matchingUsersTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
matchingUsersTable.setSelectable(true);
matchingUsersTable.setEditable(false);
matchingUsersTable.setImmediate(true);
matchingUsersTable.setNullSelectionAllowed(false);
matchingUsersTable.setSortDisabled(true);
if (multiSelect) {
matchingUsersTable.setMultiSelect(true);
}
matchingUsersTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.USER_16));
matchingUsersTable.setColumnWidth("icon", 16);
matchingUsersTable.addContainerProperty("userName", String.class, null);
matchingUsersTable.setWidth(300, UNITS_PIXELS);
matchingUsersTable.setHeight(200, UNITS_PIXELS);
userSelectionLayout.addComponent(matchingUsersTable);
}
示例2: initMembersTable
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void initMembersTable() {
LazyLoadingQuery query = new GroupMembersQuery(group.getId(), this);
if (query.size() > 0) {
membersTable = new Table();
membersTable.setWidth(100, UNITS_PERCENTAGE);
membersTable.setHeight(400, UNITS_PIXELS);
membersTable.setEditable(false);
membersTable.setSelectable(false);
membersTable.setSortDisabled(false);
LazyLoadingContainer container = new LazyLoadingContainer(query, 10);
membersTable.setContainerDataSource(container);
membersTable.addContainerProperty("id", Button.class, null);
membersTable.addContainerProperty("firstName", String.class, null);
membersTable.addContainerProperty("lastName", String.class, null);
membersTable.addContainerProperty("email", String.class, null);
membersTable.addContainerProperty("actions", Component.class, null);
membersLayout.addComponent(membersTable);
} else {
noMembersTable = new Label(i18nManager.getMessage(Messages.GROUP_NO_MEMBERS));
membersLayout.addComponent(noMembersTable);
}
}
示例3: initGroupTable
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void initGroupTable() {
groupTable = new Table();
groupTable.setNullSelectionAllowed(false);
groupTable.setSelectable(true);
groupTable.setMultiSelect(true);
groupTable.setSortDisabled(true);
groupTable.setWidth(460, UNITS_PIXELS);
groupTable.setHeight(275, UNITS_PIXELS);
addComponent(groupTable);
GroupSelectionQuery query = new GroupSelectionQuery(identityService, userId);
LazyLoadingContainer container = new LazyLoadingContainer(query, 10);
groupTable.setContainerDataSource(container);
groupTable.addContainerProperty("id", String.class, null);
groupTable.addContainerProperty("name", String.class, null);
groupTable.addContainerProperty("type", String.class, null);
}
示例4: initGroupsTable
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void initGroupsTable() {
groupsForUserQuery = new GroupsForUserQuery(identityService, this, user.getId());
if (groupsForUserQuery.size() > 0) {
groupTable = new Table();
groupTable.setSortDisabled(true);
groupTable.setHeight(150, UNITS_PIXELS);
groupTable.setWidth(100, UNITS_PERCENTAGE);
groupLayout.addComponent(groupTable);
groupContainer = new LazyLoadingContainer(groupsForUserQuery, 10);
groupTable.setContainerDataSource(groupContainer);
groupTable.addContainerProperty("id", Button.class, null);
groupTable.setColumnExpandRatio("id", 22);
groupTable.addContainerProperty("name", String.class, null);
groupTable.setColumnExpandRatio("name", 45);
groupTable.addContainerProperty("type", String.class, null);
groupTable.setColumnExpandRatio("type", 22);
groupTable.addContainerProperty("actions", Component.class, null);
groupTable.setColumnExpandRatio("actions", 11);
groupTable.setColumnAlignment("actions", Table.ALIGN_CENTER);
} else {
noGroupsLabel = new Label(i18nManager.getMessage(Messages.USER_NO_GROUPS));
groupLayout.addComponent(noGroupsLabel);
}
}
示例5: createList
import com.vaadin.ui.Table; //导入方法依赖的package包/类
@Override
protected Table createList() {
final Table processDefinitionTable = new Table();
processDefinitionTable.addStyleName(ExplorerLayout.STYLE_PROCESS_DEFINITION_LIST);
// Set non-editable, selectable and full-size
processDefinitionTable.setEditable(false);
processDefinitionTable.setImmediate(true);
processDefinitionTable.setSelectable(true);
processDefinitionTable.setNullSelectionAllowed(false);
processDefinitionTable.setSortDisabled(true);
processDefinitionTable.setSizeFull();
LazyLoadingQuery lazyLoadingQuery = new ProcessDefinitionListQuery(repositoryService);
this.processDefinitionContainer = new LazyLoadingContainer(lazyLoadingQuery, 10);
processDefinitionTable.setContainerDataSource(processDefinitionContainer);
// Listener to change right panel when clicked on a task
processDefinitionTable.addListener(new Property.ValueChangeListener() {
private static final long serialVersionUID = 1L;
public void valueChange(ValueChangeEvent event) {
Item item = processDefinitionTable.getItem(event.getProperty().getValue());
String processDefinitionId = (String) item.getItemProperty("id").getValue();
showProcessDefinitionDetail(processDefinitionId);
}
});
// Create columns
processDefinitionTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.PROCESS_22));
processDefinitionTable.setColumnWidth("icon", 22);
processDefinitionTable.addContainerProperty("name", String.class, null);
processDefinitionTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
return processDefinitionTable;
}
示例6: initProcessInstancesTable
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void initProcessInstancesTable() {
ProcessInstanceTableLazyQuery query = new ProcessInstanceTableLazyQuery(processDefinition.getId());
// Header
Label instancesTitle = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCES) + " (" + query.size() + ")");
instancesTitle.addStyleName(ExplorerLayout.STYLE_H3);
instancesTitle.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
instancesTitle.addStyleName(ExplorerLayout.STYLE_NO_LINE);
detailPanelLayout.addComponent(instancesTitle);
if (query.size() > 0) {
Label emptySpace = new Label(" ", Label.CONTENT_XHTML);
detailPanelLayout.addComponent(emptySpace);
Table instancesTable = new Table();
instancesTable.setWidth(400, UNITS_PIXELS);
if (query.size() > 6) {
instancesTable.setPageLength(6);
} else {
instancesTable.setPageLength(query.size());
}
LazyLoadingContainer container = new LazyLoadingContainer(query);
instancesTable.setContainerDataSource(container);
// container props
instancesTable.addContainerProperty(AlfrescoProcessInstanceTableItem.PROPERTY_ID, String.class, null);
instancesTable.addContainerProperty(AlfrescoProcessInstanceTableItem.PROPERTY_BUSINESSKEY, String.class, null);
instancesTable.addContainerProperty(AlfrescoProcessInstanceTableItem.PROPERTY_ACTIONS, Component.class, null);
// column alignment
instancesTable.setColumnAlignment(AlfrescoProcessInstanceTableItem.PROPERTY_ACTIONS, Table.ALIGN_CENTER);
// column header
instancesTable.setColumnHeader(AlfrescoProcessInstanceTableItem.PROPERTY_ID, i18nManager.getMessage(Messages.PROCESS_INSTANCE_ID));
instancesTable.setColumnHeader(AlfrescoProcessInstanceTableItem.PROPERTY_BUSINESSKEY, i18nManager.getMessage(Messages.PROCESS_INSTANCE_BUSINESSKEY));
instancesTable.setColumnHeader(AlfrescoProcessInstanceTableItem.PROPERTY_ACTIONS, i18nManager.getMessage(Messages.PROCESS_INSTANCE_ACTIONS));
instancesTable.setEditable(false);
instancesTable.setSelectable(true);
instancesTable.setNullSelectionAllowed(false);
instancesTable.setSortDisabled(true);
detailPanelLayout.addComponent(instancesTable);
} else {
Label noInstances = new Label(i18nManager.getMessage(Messages.PROCESS_NO_INSTANCES));
detailPanelLayout.addComponent(noInstances);
}
}
示例7: createList
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected Table createList() {
groupTable = new Table();
groupTable.setEditable(false);
groupTable.setImmediate(true);
groupTable.setSelectable(true);
groupTable.setNullSelectionAllowed(false);
groupTable.setSortDisabled(true);
groupTable.setSizeFull();
groupListQuery = new GroupListQuery();
groupListContainer = new LazyLoadingContainer(groupListQuery, 20);
groupTable.setContainerDataSource(groupListContainer);
// Column headers
groupTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.GROUP_22));
groupTable.setColumnWidth("icon", 22);
groupTable.addContainerProperty("name", String.class, null);
groupTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
// Listener to change right panel when clicked on a user
groupTable.addListener(new Property.ValueChangeListener() {
private static final long serialVersionUID = 1L;
public void valueChange(ValueChangeEvent event) {
Item item = groupTable.getItem(event.getProperty().getValue()); // the value of the property is the itemId of the table entry
if(item != null) {
String groupId = (String) item.getItemProperty("id").getValue();
setDetailComponent(new GroupDetailPanel(GroupPage.this, groupId));
// Update URL
ExplorerApp.get().setCurrentUriFragment(
new UriFragment(GroupNavigator.GROUP_URI_PART, groupId));
} else {
// Nothing is selected
setDetailComponent(null);
ExplorerApp.get().setCurrentUriFragment(new UriFragment(GroupNavigator.GROUP_URI_PART, groupId));
}
}
});
return groupTable;
}