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


Java Table.addContainerProperty方法代码示例

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


在下文中一共展示了Table.addContainerProperty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createTable

import com.vaadin.ui.Table; //导入方法依赖的package包/类
private Table createTable() {
    Table table = new Table();
    table.setSizeFull();
    table.setPageLength(0);
    table.setSelectable(false);
    table.setColumnCollapsingAllowed(true);
    table.setColumnReorderingAllowed(true);
    table.setImmediate(true);
    table.setNullSelectionAllowed(false);
    table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    table.addContainerProperty("Name", String.class, null);
    table.addContainerProperty("Value", String.class, null);

    // initializing email table with empty values
    table.addItem(new Object[] { "Outgoing Mail Server (SMTP): ", "" }, new Integer(1));
    table.addItem(new Object[] { "Port: ", "" }, new Integer(2));
    table.addItem(new Object[] { "Email Id: ", "" }, new Integer(3));

    return table;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:21,代码来源:EmailLayout.java

示例2: createNetworkTable

import com.vaadin.ui.Table; //导入方法依赖的package包/类
private Table createNetworkTable() {
    Table table = new Table();
    table.setSizeFull();
    table.setPageLength(0);
    table.setSelectable(false);
    table.setColumnCollapsingAllowed(true);
    table.setColumnReorderingAllowed(true);
    table.setImmediate(true);
    table.setNullSelectionAllowed(false);
    table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    table.addContainerProperty("Name", String.class, null);
    table.addContainerProperty("Value", String.class, null);

    // initializing network table with empty values
    table.addItem(new Object[] { "IPv4 Address: ", "" }, new Integer(1));
    table.addItem(new Object[] { "Netmask:", "" }, new Integer(2));
    table.addItem(new Object[] { "Default Gateway: ", "" }, new Integer(3));
    table.addItem(new Object[] { "Primary DNS Server: ", "" }, new Integer(4));
    table.addItem(new Object[] { "Secondary DNS Server: ", "" }, new Integer(5));
    return table;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:22,代码来源:NetworkLayout.java

示例3: createNATTable

import com.vaadin.ui.Table; //导入方法依赖的package包/类
private Table createNATTable() {
    Table table = new Table();
    table.setSizeFull();
    table.setPageLength(0);
    table.setSelectable(false);
    table.setColumnCollapsingAllowed(true);
    table.setColumnReorderingAllowed(true);
    table.setImmediate(true);
    table.setNullSelectionAllowed(false);
    table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    table.addContainerProperty("Name", String.class, null);
    table.addContainerProperty("Value", String.class, null);

    // initializing network table with empty values
    table.addItem(new Object[] { "Public IPv4 Address: ", "" }, new Integer(1));
    return table;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:18,代码来源:NetworkLayout.java

示例4: addCommonTableItems

import com.vaadin.ui.Table; //导入方法依赖的package包/类
private void addCommonTableItems(Table statusTable) {
    statusTable.setImmediate(true);
    statusTable.setStyleName(ValoTheme.TABLE_COMPACT);

    statusTable.addContainerProperty("Property", String.class, "");
    statusTable.addContainerProperty("Value", String.class, "");
    statusTable.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    statusTable.setPageLength(0);
    statusTable.setReadOnly(true);

    statusTable.addItem(new Object[] { "Name: ", "" }, new Integer(1));
    statusTable.addItem(new Object[] { "Local IP: ", "" }, new Integer(2));
    statusTable.addItem(new Object[] { "Public IP: ", "" }, new Integer(3));
    statusTable.addItem(new Object[] { "V.Server: ", "" }, new Integer(4));
    statusTable.addItem(new Object[] { "Manager IP: ", "" }, new Integer(5));
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:17,代码来源:AgentStatusWindow.java

示例5: 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

示例6: createList

import com.vaadin.ui.Table; //导入方法依赖的package包/类
@Override
protected Table createList() {
  final Table tableList = new Table();
  
  // Listener to change right panel when clicked on a task
  tableList.addListener(new Property.ValueChangeListener() {
    private static final long serialVersionUID = 8811553575319455854L;
    public void valueChange(ValueChangeEvent event) {
      // The itemId of the table list is the tableName
      String tableName = (String) event.getProperty().getValue();
      setDetailComponent(new DatabaseDetailPanel(tableName));
     
     // Update URL
     ExplorerApp.get().setCurrentUriFragment(
       new UriFragment(DatabaseNavigator.TABLE_URI_PART, tableName));
    }
  });
  
  // Create column headers
  tableList.addContainerProperty("icon", Embedded.class, null);
  tableList.setColumnWidth("icon", 22);
  tableList.addContainerProperty("tableName", String.class, null);
  tableList.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
  
  return tableList;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:27,代码来源:DatabasePage.java

示例7: 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

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

示例9: initRelatedContentTable

import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected Table initRelatedContentTable() {
  Table table = new Table();
  table.setWidth(100, UNITS_PERCENTAGE);
  table.addStyleName(ExplorerLayout.STYLE_RELATED_CONTENT_LIST);
  
  // Invisible by default, only shown when attachments are present
  table.setVisible(false);
  table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);

  table.addContainerProperty("type", Embedded.class, null);
  table.setColumnWidth("type", 16);
  table.addContainerProperty("name", Component.class, null);
  
  relatedContentLayout.addComponent(table);
  return table;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:HistoricTaskDetailPanel.java

示例10: createList

import com.vaadin.ui.Table; //导入方法依赖的package包/类
@Override
protected Table createList() {
  taskTable = new Table();
  taskTable.addStyleName(ExplorerLayout.STYLE_TASK_LIST);
  taskTable.addStyleName(ExplorerLayout.STYLE_SCROLLABLE);
  
  // Listener to change right panel when clicked on a task
  taskTable.addListener(getListSelectionListener());
  
  this.lazyLoadingQuery = createLazyLoadingQuery();
  this.taskListContainer = new LazyLoadingContainer(lazyLoadingQuery, 10);
  taskTable.setContainerDataSource(taskListContainer);
  
  // Create column header
  taskTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.TASK_22));
  taskTable.setColumnWidth("icon", 22);
  
  taskTable.addContainerProperty("name", String.class, null);
  taskTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
  
  return taskTable;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:23,代码来源:TaskPage.java

示例11: createTable

import com.vaadin.ui.Table; //导入方法依赖的package包/类
private Table createTable() {
    Table table = new Table();
    table.setSizeFull();
    table.setPageLength(0);
    table.setSelectable(false);
    table.setColumnCollapsingAllowed(true);
    table.setColumnReorderingAllowed(true);
    table.setImmediate(true);
    table.setNullSelectionAllowed(false);
    table.addContainerProperty("Name", String.class, null);
    table.addContainerProperty("Status", String.class, null);
    table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    return table;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:15,代码来源:SummaryLayout.java

示例12: createList

import com.vaadin.ui.Table; //导入方法依赖的package包/类
@Override
protected Table createList() {
  final Table deploymentTable = new Table();
  
  LazyLoadingQuery deploymentListQuery = new DeploymentListQuery();
  deploymentListContainer = new LazyLoadingContainer(deploymentListQuery, 10);
  deploymentTable.setContainerDataSource(deploymentListContainer);
          
  // Listener to change right panel when clicked on a deployment
  deploymentTable.addListener(new Property.ValueChangeListener() {
    private static final long serialVersionUID = 8811553575319455854L;
    public void valueChange(ValueChangeEvent event) {
      Item item = deploymentTable.getItem(event.getProperty().getValue()); // the value of the property is the itemId of the table entry
      if(item != null) {
        String deploymentId = (String) item.getItemProperty("id").getValue();
        setDetailComponent(new DeploymentDetailPanel(deploymentId, DeploymentPage.this));
        
        // Update URL
        ExplorerApp.get().setCurrentUriFragment(
          new UriFragment(DeploymentNavigator.DEPLOYMENT_URI_PART, deploymentId));
      } else {
        // Nothing is selected
        setDetailComponent(null);
        ExplorerApp.get().setCurrentUriFragment(new UriFragment(DeploymentNavigator.DEPLOYMENT_URI_PART));
      }
    }
  });
  
  // Create column headers
  deploymentTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.DEPLOYMENT_22));
  deploymentTable.setColumnWidth("icon", 22);
  
  deploymentTable.addContainerProperty("name", String.class, null);
  deploymentTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
  
  return deploymentTable;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:38,代码来源:DeploymentPage.java

示例13: createList

import com.vaadin.ui.Table; //导入方法依赖的package包/类
@Override
protected Table createList() {
  final Table jobTable = new Table();
  
  LazyLoadingQuery jobListQuery = new JobListQuery();
  jobListContainer = new LazyLoadingContainer(jobListQuery, 10);
  jobTable.setContainerDataSource(jobListContainer);
          
  // Listener to change right panel when clicked on a deployment
  jobTable.addListener(new Property.ValueChangeListener() {
    private static final long serialVersionUID = 8811553575319455854L;
    public void valueChange(ValueChangeEvent event) {
      Item item = jobTable.getItem(event.getProperty().getValue()); // the value of the property is the itemId of the table entry
      if(item != null) {
        String jobId = (String) item.getItemProperty("id").getValue();

        setDetailComponent(new JobDetailPanel(jobId, JobPage.this));
        // Update URL
        ExplorerApp.get().setCurrentUriFragment(
          new UriFragment(JobNavigator.JOB_URL_PART, jobId));
      } else {
        // Nothing is selected
        setDetailComponent(null);
        ExplorerApp.get().setCurrentUriFragment(new UriFragment(JobNavigator.JOB_URL_PART));
      }
    }
  });
  
  // Create column headers
  jobTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.JOB_22));
  jobTable.setColumnWidth("icon", 22);
  
  jobTable.addContainerProperty("name", String.class, null);
  jobTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
  
  return jobTable;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:38,代码来源:JobPage.java

示例14: addVariables

import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void addVariables() {
  Label header = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCE_HEADER_VARIABLES));
  header.addStyleName(ExplorerLayout.STYLE_H3);
  header.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
  header.addStyleName(ExplorerLayout.STYLE_NO_LINE);
  panelLayout.addComponent(header);
  
  panelLayout.addComponent(new Label(" ", Label.CONTENT_XHTML));
  
  // variable sorting is done in-memory (which is ok, since normally there aren't that many vars)
  Map<String, Object> variables = new TreeMap<String, Object>(runtimeService.getVariables(processInstance.getId())); 
  
  if(variables.size() > 0) {
    
    Table variablesTable = new Table();
    variablesTable.setWidth(60, UNITS_PERCENTAGE);
    variablesTable.addStyleName(ExplorerLayout.STYLE_PROCESS_INSTANCE_TASK_LIST);
    
    variablesTable.addContainerProperty("name", String.class, null, i18nManager.getMessage(Messages.PROCESS_INSTANCE_VARIABLE_NAME), null, Table.ALIGN_LEFT);
    variablesTable.addContainerProperty("value", String.class, null, i18nManager.getMessage(Messages.PROCESS_INSTANCE_VARIABLE_VALUE), null, Table.ALIGN_LEFT);
    
    for (String variable : variables.keySet()) {
      Item variableItem = variablesTable.addItem(variable);
      variableItem.getItemProperty("name").setValue(variable);
      
      // Get string value to show
      String theValue = variableRendererManager.getStringRepresentation(variables.get(variable));
      variableItem.getItemProperty("value").setValue(theValue);
    }
    
    variablesTable.setPageLength(variables.size());
    panelLayout.addComponent(variablesTable);
  } else {
    Label noVariablesLabel = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCE_NO_VARIABLES));
    panelLayout.addComponent(noVariablesLabel);
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:38,代码来源:ProcessInstanceDetailPanel.java

示例15: createList

import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected Table createList() {
  final Table table = new Table();
  
  LazyLoadingQuery query = new ProcessInstanceListQuery();
  processInstanceContainer = new LazyLoadingContainer(query);
  table.setContainerDataSource(processInstanceContainer);
  
  table.addListener(new Property.ValueChangeListener() {
    private static final long serialVersionUID = 1L;
    public void valueChange(ValueChangeEvent event) {
      Item item = table.getItem(event.getProperty().getValue()); // the value of the property is the itemId of the table entry
      if(item != null) {
        String processInstanceId = (String) item.getItemProperty("id").getValue();
        setDetailComponent(new AlfrescoProcessInstanceDetailPanel(processInstanceId, ProcessInstancePage.this));
        
        // Update URL
        ExplorerApp.get().setCurrentUriFragment(
          new UriFragment(ProcessInstanceNavigator.PROCESS_INSTANCE_URL_PART, processInstanceId));
      } else {
        // Nothing is selected
        setDetailComponent(null);
        ExplorerApp.get().setCurrentUriFragment(new UriFragment(ProcessInstanceNavigator.PROCESS_INSTANCE_URL_PART));
      }
    }
  });
  
  // Create column headers
  table.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.PROCESS_22));
  table.setColumnWidth("icon", 22);
  
  table.addContainerProperty("name", String.class, null);
  table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
  
  return table;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:36,代码来源:ProcessInstancePage.java


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