com.vaadin.ui.Table.select()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中com.vaadin.ui.Table.select()方法的一些代码示例,展示了Table.select()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.select()方法的具体详情如下:
包路径:com.vaadin.ui.Table
类名称:Table
方法名:select

Table.select介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private static void selectEntityToDeleteInTable(final Long id, final Table table) {
  table.select(id);
}

代码示例来源:origin: eclipse/hawkbit

private static void selectEntityToDeleteInTable(final Long id, final Table table) {
  table.select(id);
}

代码示例来源:origin: org.activiti/activiti-explorer

public void notifyGroupChanged(String managementId) {
 // Clear cache
  managementTable.removeAllItems();
 
 // select changed group
 managementTable.select(Integer.valueOf(managementId));
}

代码示例来源:origin: org.activiti/activiti-explorer

@Override
protected void initUi() {
 super.initUi();
 if (modelId == null) {
  table.select(table.firstItemId());
 } else {
  table.select(modelId);
 }
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * Handles the item selection.<p>
 *
 * @param itemId the selected item id
 */
public void handleSelection(CmsUUID itemId) {
  Set<CmsUUID> selection = getSelectedIds();
  if (selection == null) {
    m_fileTable.select(itemId);
  } else if (!selection.contains(itemId)) {
    m_fileTable.setValue(null);
    m_fileTable.select(itemId);
  }
}

代码示例来源:origin: org.activiti/activiti-explorer

@Override
protected void initUi() {
 super.initUi();
 int index = 0;
 if (managementId != null) {
  index = Integer.valueOf(managementId);
 }
 managementTable.select(index);
 managementTable.setCurrentPageFirstItemId(index);
}

代码示例来源:origin: org.opennms.features/vaadin-surveillance-views

@Override
  public void buttonClick(Button.ClickEvent clickEvent) {
    RowDef rowDef = (RowDef) rowsTable.getValue();
    if (rowDef != null) {
      int rowDefIndex = rowOrder.get(rowDef);
      RowDef rowDefToSwap = null;
      for (Map.Entry<RowDef, Integer> entry : rowOrder.entrySet()) {
        if (entry.getValue().intValue() == rowDefIndex - 1) {
          rowDefToSwap = entry.getKey();
          break;
        }
      }
      if (rowDefToSwap != null) {
        rowsTable.unselect(rowDef);
        rowOrder.remove(rowDef);
        rowOrder.remove(rowDefToSwap);
        rowOrder.put(rowDef, rowDefIndex - 1);
        rowOrder.put(rowDefToSwap, rowDefIndex);
        rows.sort(new Object[]{"label"}, new boolean[]{true});
        rowsTable.refreshRowCache();
        rowsTable.select(rowDef);
      }
    }
  }
});

代码示例来源:origin: org.opennms.features/vaadin-surveillance-views

@Override
  public void buttonClick(Button.ClickEvent clickEvent) {
    RowDef rowDef = (RowDef) rowsTable.getValue();
    if (rowDef != null) {
      int rowDefIndex = rowOrder.get(rowDef);
      RowDef rowDefToSwap = null;
      for (Map.Entry<RowDef, Integer> entry : rowOrder.entrySet()) {
        if (entry.getValue().intValue() == rowDefIndex + 1) {
          rowDefToSwap = entry.getKey();
          break;
        }
      }
      if (rowDefToSwap != null) {
        rowsTable.unselect(rowDef);
        rowOrder.remove(rowDef);
        rowOrder.remove(rowDefToSwap);
        rowOrder.put(rowDef, rowDefIndex + 1);
        rowOrder.put(rowDefToSwap, rowDefIndex);
        rows.sort(new Object[]{"label"}, new boolean[]{true});
        rowsTable.refreshRowCache();
        rowsTable.select(rowDef);
      }
    }
  }
});

代码示例来源:origin: org.activiti/activiti-explorer

public void selectElement(int index) {
 if (table.getContainerDataSource().size() > index) {
  table.select(index);
  table.setCurrentPageFirstItemId(index);
 }
}

代码示例来源:origin: org.activiti/activiti-explorer

@Override
public void attach() {
 super.attach();
 if (attachmentTypes.size() > 0) {
  attachmentTypes.select(attachmentTypes.firstItemId());
 }
}

代码示例来源:origin: org.activiti/activiti-explorer

public void notifyGroupChanged(String groupId) {
 // Clear cache
 groupTable.removeAllItems();
 groupListContainer.removeAllItems();
 
 // select changed group
 groupTable.select(groupListContainer.getIndexForObjectId(groupId));
}

代码示例来源:origin: org.activiti/activiti-explorer

@Override
protected void initUi() {
 super.initUi();
 
 populateTableList(); // tablelist is NOT lazy loaded, since there are only a few tables
 if (tableName == null) {
  selectElement(0);
 } else {
  table.select(tableName);
 }
}

代码示例来源:origin: org.activiti/activiti-explorer

/**
 * Call when some user data has been changed
 */
public void notifyUserChanged(String userId) {
 // Clear cache
 userTable.removeAllItems();
 userListContainer.removeAllItems();
 
 userTable.select(userListContainer.getIndexForObjectId(userId));
}

代码示例来源:origin: org.opennms.features/vaadin-snmp-events-and-metrics

/**
 * Adds the handler.
 */
private void addHandler() {
  org.opennms.netmgt.config.datacollection.Parameter p = new org.opennms.netmgt.config.datacollection.Parameter();
  p.setKey("New Parameter");
  p.setValue("New Value");
  table.select(container.addOnmsBean(p));
}

代码示例来源:origin: org.activiti/activiti-explorer

public void buttonClick(ClickEvent event) {
  addMatchingUser(loggedInUser.getId(), loggedInUser.getFullName());
  matchingUsersTable.select(loggedInUser.getId());
  fireEvent(new SubmitEvent(doneButton, SubmitEvent.SUBMITTED));
  close();
 }
});

代码示例来源:origin: org.opennms.features/vaadin-snmp-events-and-metrics

/**
 * Adds the handler.
 */
private void addHandler() {
  MibObj obj = new MibObj();
  obj.setOid(".1.1.1.1");
  obj.setInstance("0");
  obj.setType("gauge");
  obj.setAlias("test");
  table.select(container.addOnmsBean(obj));
}

代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin

@Override
public void select(T item) {
  ObjectUtils.argumentNotNull(item, "Item must be not null");
  switch (getRenderingMode()) {
  case GRID:
    getGrid().select(requireDataSource().getId(item));
    break;
  case TABLE:
    getTable().select(requireDataSource().getId(item));
    break;
  default:
    break;
  }
}

代码示例来源:origin: org.activiti/activiti-explorer

public AccountSelectionPopup(String title) {
 super(title); // builds up UI
 setWidth(600, UNITS_PIXELS);
 setHeight(400, UNITS_PIXELS);
 this.i18nManager = ExplorerApp.get().getI18nManager();
 
 // TODO: components are eager loaded. For performance they should be lazy loaded (eg through factory)
 
 // Imap
 initImapComponent();
 String imap = i18nManager.getMessage(Messages.PROFILE_ACCOUNT_IMAP);
 addSelectionItem(new Embedded(null, Images.IMAP), imap, imapForm, imapClickListener);
 
 // Alfresco
 initAlfrescoComponent();
 addSelectionItem(new Embedded(null, Images.ALFRESCO), 
     i18nManager.getMessage(Messages.PROFILE_ACCOUNT_ALFRESCO), 
     alfrescoForm, alfrescoClickListener);
 
 selectionTable.select(imap);
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private void buildSourceTable() {
  sourceTable = new Table();
  sourceTable.setId(SPUIDefinitions.TWIN_TABLE_SOURCE_ID);
  sourceTable.setSelectable(true);
  sourceTable.setMultiSelect(true);
  sourceTable.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES);
  sourceTable.addStyleName(ValoTheme.TABLE_NO_STRIPES);
  sourceTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
  sourceTable.addStyleName(ValoTheme.TABLE_SMALL);
  sourceTable.setImmediate(true);
  sourceTable.setSizeFull();
  sourceTable.addStyleName("dist_type_twin-table");
  sourceTable.setSortEnabled(false);
  sourceTableContainer = new IndexedContainer();
  sourceTableContainer.addContainerProperty(DIST_TYPE_NAME, String.class, "");
  sourceTableContainer.addContainerProperty(DIST_TYPE_DESCRIPTION, String.class, "");
  sourceTable.setContainerDataSource(sourceTableContainer);
  sourceTable.setVisibleColumns(DIST_TYPE_NAME);
  sourceTable.setColumnHeaders(i18n.getMessage("header.dist.twintable.available"));
  sourceTable.setColumnExpandRatio(DIST_TYPE_NAME, 1.0F);
  createSourceTableData();
  addTooltip();
  sourceTable.select(sourceTable.firstItemId());
}

代码示例来源:origin: eclipse/hawkbit

private void buildSourceTable() {
  sourceTable = new Table();
  sourceTable.setId(SPUIDefinitions.TWIN_TABLE_SOURCE_ID);
  sourceTable.setSelectable(true);
  sourceTable.setMultiSelect(true);
  sourceTable.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES);
  sourceTable.addStyleName(ValoTheme.TABLE_NO_STRIPES);
  sourceTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
  sourceTable.addStyleName(ValoTheme.TABLE_SMALL);
  sourceTable.setImmediate(true);
  sourceTable.setSizeFull();
  sourceTable.addStyleName("dist_type_twin-table");
  sourceTable.setSortEnabled(false);
  sourceTableContainer = new IndexedContainer();
  sourceTableContainer.addContainerProperty(DIST_TYPE_NAME, String.class, "");
  sourceTableContainer.addContainerProperty(DIST_TYPE_DESCRIPTION, String.class, "");
  sourceTable.setContainerDataSource(sourceTableContainer);
  sourceTable.setVisibleColumns(DIST_TYPE_NAME);
  sourceTable.setColumnHeaders(i18n.getMessage("header.dist.twintable.available"));
  sourceTable.setColumnExpandRatio(DIST_TYPE_NAME, 1.0F);
  createSourceTableData();
  addTooltip();
  sourceTable.select(sourceTable.firstItemId());
}

相关文章

微信公众号

最新文章

更多