com.vaadin.event.ItemClickEvent.ItemClickListener Java Examples
The following examples show how to use
com.vaadin.event.ItemClickEvent.ItemClickListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ActionStatusMsgGrid.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
/** * Constructor. * * @param i18n * @param eventBus */ protected ActionStatusMsgGrid(final VaadinMessageSource i18n, final UIEventBus eventBus) { super(i18n, eventBus, null); noMsgText = createNoMessageProxy(i18n); setSingleSelectionSupport(new SingleSelectionSupport()); setDetailsSupport(new DetailsSupport()); alignGenerator = new AlignCellStyleGenerator(null, null, rightAlignedColumns); addStyleName(SPUIStyleDefinitions.ACTION_HISTORY_MESSAGE_GRID); setDetailsGenerator(new MessageDetailsGenerator()); this.addItemClickListener(new ItemClickListener() { private static final long serialVersionUID = 1L; @Override public void itemClick(final ItemClickEvent event) { final Object itemId = event.getItemId(); setDetailsVisible(itemId, !isDetailsVisible(itemId)); } }); init(); }
Example #2
Source File: PIPSQLResolverEditorWindow.java From XACML with MIT License | 4 votes |
protected void initializeSourceTable(String fields) { // // Add data into the container // this.populateData(this.fieldPrefix, fields, this.fieldsContainer); // // Set GUI properties // this.tableRequiredAttributes.setContainerDataSource(this.fieldsContainer); this.tableRequiredAttributes.setPageLength((this.fieldsContainer.size() == 0 ? 3 : this.fieldsContainer.size() + 1)); this.tableRequiredAttributes.setSizeFull(); this.tableRequiredAttributes.setColumnCollapsingAllowed(true); this.tableRequiredAttributes.setVisibleColumns(new Object[] {"identifier", "id", "category", "datatype", "shortId", "shortCategory", "shortDatatype"}); this.tableRequiredAttributes.setColumnHeaders(new String[] {"Field", "Attribute Id", "Category", "Data Type", "Attribute Id", "Category", "Data Type"}); this.tableRequiredAttributes.setColumnCollapsed("id", true); this.tableRequiredAttributes.setColumnCollapsed("category", true); this.tableRequiredAttributes.setColumnCollapsed("datatype", true); this.tableRequiredAttributes.setSelectable(true); // // Setup its handler // this.tableRequiredAttributes.addActionHandler(this); // // Respond to events // this.tableRequiredAttributes.addItemClickListener(new ItemClickListener() { private static final long serialVersionUID = 1L; @Override public void itemClick(ItemClickEvent event) { if (event.isDoubleClick()) { Object id = event.getItemId(); if (id == null) { // // Really shouldn't get here // return; } BeanItem<ResolverAttribute> beanItem = self.fieldsContainer.getItem(id); if (beanItem == null) { // // Again, shouldn't get here // return; } self.editAttribute(self.tableRequiredAttributes, beanItem.getBean()); } } }); }
Example #3
Source File: PIPSQLResolverEditorWindow.java From XACML with MIT License | 4 votes |
protected void initializeAttributeTable(String parameters) { // // Add data into the container // this.populateData(this.parameterPrefix, parameters, this.parametersContainer); // // setup gui properties // this.tableAttributes.setContainerDataSource(this.parametersContainer); this.tableAttributes.setPageLength(this.parametersContainer.size() + 1); this.tableAttributes.setSizeFull(); this.tableAttributes.setColumnCollapsingAllowed(true); this.tableAttributes.setVisibleColumns(new Object[] {"identifier", "id", "category", "datatype", "shortId", "shortCategory", "shortDatatype"}); this.tableAttributes.setColumnHeaders(new String[] {"Position", "Attribute Id", "Category", "Data Type", "Attribute Id", "Category", "Data Type"}); this.tableAttributes.setColumnCollapsed("id", true); this.tableAttributes.setColumnCollapsed("category", true); this.tableAttributes.setColumnCollapsed("datatype", true); this.tableAttributes.setSelectable(true); // // Setup its handler // this.tableAttributes.addActionHandler(this); // // Respond to events // this.tableAttributes.addItemClickListener(new ItemClickListener() { private static final long serialVersionUID = 1L; @Override public void itemClick(ItemClickEvent event) { if (event.isDoubleClick()) { Object id = event.getItemId(); if (id == null) { // // Really shouldn't get here // return; } BeanItem<ResolverAttribute> beanItem = self.parametersContainer.getItem(id); if (beanItem == null) { // // Again, shouldn't get here // return; } self.editAttribute(self.tableAttributes, beanItem.getBean()); } } }); }
Example #4
Source File: TableComponent.java From jdal with Apache License 2.0 | 4 votes |
public void addItemClickListener(ItemClickListener listener) { getTable().addItemClickListener(listener); }
Example #5
Source File: TableComponent.java From jdal with Apache License 2.0 | 4 votes |
public void removeItemClickListener(ItemClickListener listener) { getTable().removeItemClickListener(listener); }