List of usage examples for com.vaadin.ui VerticalLayout getData
public Object getData()
From source file:org.jumpmind.vaadin.ui.sqlexplorer.TableInfoPanel.java
License:Open Source License
protected void populate(VerticalLayout layout) { AbstractMetaDataTableCreator creator = (AbstractMetaDataTableCreator) layout.getData(); Table table = creator.create();/*w w w. ja va 2 s. c o m*/ layout.addComponent(table); layout.setExpandRatio(table, 1); layout.setData(null); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.GroupSwichBtn.java
@Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (event.getClickedComponent() instanceof VerticalLayout) { VerticalLayout switchBtn = (VerticalLayout) event.getClickedComponent(); int row = (Integer) switchBtn.getData(); Label labelI = (Label) table.getComponent(0, row + 1); Label labelII = (Label) table.getComponent(2, row + 1); table.removeComponent(labelI);/*from w w w . j a v a 2s.co m*/ table.removeComponent(labelII); table.addComponent(labelII, 0, row + 1); table.setComponentAlignment(labelII, Alignment.MIDDLE_CENTER); table.addComponent(labelI, 2, row + 1); table.setComponentAlignment(labelI, Alignment.MIDDLE_CENTER); QuantDiseaseGroupsComparison comp = updatedComparisonList.get(row); comp.switchComparison(); updatedComparisonList.set(row, comp); } }