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


Java Table.setEditable方法代码示例

本文整理汇总了Java中com.vaadin.ui.Table.setEditable方法的典型用法代码示例。如果您正苦于以下问题:Java Table.setEditable方法的具体用法?Java Table.setEditable怎么用?Java Table.setEditable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.Table的用法示例。


在下文中一共展示了Table.setEditable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:22,代码来源:SelectUsersPopupWindow.java

示例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);
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:27,代码来源:GroupDetailPanel.java

示例3: addTableData

import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void addTableData() {
  LazyLoadingQuery lazyLoadingQuery = new TableDataQuery(tableName, managementService);
  LazyLoadingContainer lazyLoadingContainer = new LazyLoadingContainer(lazyLoadingQuery, 10);
  
  if (lazyLoadingContainer.size() > 0) {
    
    Table data = new Table();
    data.setContainerDataSource(lazyLoadingContainer);
    data.setEditable(false);
    data.setSelectable(true);
    data.setColumnReorderingAllowed(true);
    if (lazyLoadingQuery.size() < 10) {
      data.setPageLength(0);
    } else {
      data.setPageLength(10);
    }
    addDetailComponent(data);
    
    data.setWidth(100, UNITS_PERCENTAGE);
    data.setHeight(100, UNITS_PERCENTAGE);
    data.addStyleName(ExplorerLayout.STYLE_DATABASE_TABLE);
    setDetailExpandRatio(data, 1.0f);
    
    // Create column headers
    TableMetaData metaData = managementService.getTableMetaData(tableName);
    for (String columnName : metaData.getColumnNames()) {
      data.addContainerProperty(columnName, String.class, null);
    }
    
  } else {
    Label noDataLabel = new Label(i18nManager.getMessage(Messages.DATABASE_NO_ROWS));
    noDataLabel.addStyleName(Reindeer.LABEL_SMALL);
    addDetailComponent(noDataLabel);
    setDetailExpandRatio(noDataLabel, 1.0f);
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:37,代码来源:DatabaseDetailPanel.java

示例4: 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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:39,代码来源:ProcessDefinitionPage.java

示例5: 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("&nbsp;", 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);
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:51,代码来源:AlfrescoProcessDefinitionDetailPanel.java

示例6: 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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:43,代码来源:GroupPage.java


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