本文整理匯總了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;
}