本文整理匯總了Java中com.vaadin.data.util.BeanItemContainer.addAll方法的典型用法代碼示例。如果您正苦於以下問題:Java BeanItemContainer.addAll方法的具體用法?Java BeanItemContainer.addAll怎麽用?Java BeanItemContainer.addAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.data.util.BeanItemContainer
的用法示例。
在下文中一共展示了BeanItemContainer.addAll方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: generateComboBox
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
/**
* @param liste
* @param libNull
* @return une combo grace a la liste
*/
private ComboBox generateComboBox(final List<String> liste, final String libNull) {
ComboBox sampleIdCB = new ComboBox();
sampleIdCB.setPageLength(20);
sampleIdCB.setTextInputAllowed(false);
BeanItemContainer<String> dataList = new BeanItemContainer<>(String.class);
dataList.addBean(applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()));
if (libNull != null) {
dataList.addBean(libNull);
}
dataList.addAll(liste);
sampleIdCB
.setNullSelectionItemId(applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()));
sampleIdCB.setContainerDataSource(dataList);
sampleIdCB.setImmediate(true);
return sampleIdCB;
}
示例2: getDatasource
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
/**
* Sets up datasource that needs to be attached the table
*
* @return
*/
private Indexed getDatasource() {
BeanItemContainer<Customer> container = new BeanItemContainer<Customer>(
Customer.class);
container.addAll(DatasourceFactory.getCustomerDatasource(20));
return container;
}
示例3: getDatasource
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
/**
*
* Initalizes the datasource
*
* @return
*/
protected Indexed getDatasource() {
BeanItemContainer<VehicleInfo> container = new BeanItemContainer<VehicleInfo>(
VehicleInfo.class);
container.addAll(DatasourceFactory.getVehicleSalesDS());
container.addNestedContainerBean("sales2012");
container.addNestedContainerBean("sales2013");
container.addNestedContainerBean("sales2014");
return container;
}
示例4: showResult
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
private void showResult(Object result) {
resultLayout.removeAllComponents();
String label;
if (result == null) {
resultLayout.addComponent(new Label("No Result"));
return;
}
if (result instanceof String) {
label = (String)result;
resultLayout.addComponent(new Label(label));
return;
}
if (result instanceof List) {
List<Element> resultList = (List<Element>)result;
BeanItemContainer<Element> dataSource = new BeanItemContainer<Element>(Element.class);
dataSource.addAll(resultList);
Table table = new Table();
table.setContainerDataSource(dataSource);
table.setSizeFull();
// create generated column and specify our "generator/formatter"
// table.addGeneratedColumn("rules", new RuleGenerator());
resultLayout.addComponent(table);
return;
}
}
示例5: buildPanel
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
protected void buildPanel(String introText) {
this.setSpacing(true);
this.setSizeFull();
this.addComponent(new Label(introText));
grid.setSizeFull();
grid.setSelectionMode(SelectionMode.MULTI);
BeanItemContainer<ReleasePackage> container = new BeanItemContainer<>(ReleasePackage.class);
container.addAll(configService.findReleasePackages());
grid.setContainerDataSource(container);
grid.setColumns("name", "versionLabel", "releaseDate");
grid.addSelectionListener((e) -> rowSelected());
this.addComponent(grid);
this.setExpandRatio(grid, 1);
}
示例6: getAlleKlassen
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
public static BeanItemContainer<KlasseLaso> getAlleKlassen(BeanItemContainer<KlasseLaso> unsortedContainer) {
BeanItemContainer<KlasseLaso> eintraege = new BeanItemContainer<KlasseLaso>(KlasseLaso.class);
for (KlasseLaso klassenItem : unsortedContainer.getItemIds()) {
eintraege.addBean(klassenItem);
}
eintraege.sort(new Object[] {KlassePojo.KLASSENNAME_COLUMN}, new boolean[] {true});
BeanItemContainer<KlasseLaso> resultSchueler = new BeanItemContainer<KlasseLaso>(KlasseLaso.class);
resultSchueler.addAll(eintraege.getItemIds());
return resultSchueler;
}
示例7: letzteKlassenLoeschen
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
private static void letzteKlassenLoeschen() {
BeanItemContainer<KlasseLaso> klassen = new BeanItemContainer<KlasseLaso>(KlasseLaso.class);
klassen.addAll(KlasseContainer.getInstance().getItemIds());
for (KlasseLaso klasse : klassen.getItemIds()) {
if (klasse.getKlassentyp().isKlassenstufenorientiert() && KlassenstufenUtils.getKlassenstufe(klasse.getKlassenname()) == LebSettingsContainer.getLebSettings().getLetzteKlassenstufe()) {
for (SchuelerLaso schueler : SchuelerContainer.getAllSchuelerOfKlasse(klasse.getPojo()).getItemIds()) {
SchuelerContainer.getInstance().deleteSchueler(schueler);
}
KlasseContainer.getInstance().deleteKlasse(klasse);
}
}
}
示例8: faecherLoeschen
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
private static void faecherLoeschen(AdminDashboard adminDashboard) throws Exception {
BeanItemContainer<FachLaso> faecher = new BeanItemContainer<FachLaso>(FachLaso.class);
faecher.addAll(FachContainer.getInstance().getItemIds());
for (FachLaso fach : faecher.getItemIds()) {
for (SchuelerPojo schueler: ZuordnungFachSchuelerContainer.getAllSchuelerOfFach(fach.getPojo()).getItemIds()) {
new ZuordnungFachSchuelerHandler(schueler, fach.getPojo(), true, adminDashboard).setZugeordnet(false);
}
FachContainer.getInstance().deleteFach(fach);
}
}
示例9: updateColumnsContainer
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
protected void updateColumnsContainer(BeanItemContainer<DiagrammePreferenceValue> container, List<DiagrammePreferenceValue> values) {
container.removeAllItems();
container.addAll(values);
}
示例10: EditAgentDeploymentPanel
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
public EditAgentDeploymentPanel(ApplicationContext context, AgentDeploy agentDeployment, IAgentDeploymentChangeListener listener,
TabbedPanel tabbedPanel) {
this.context = context;
this.agentDeployment = agentDeployment;
this.listener = listener;
this.tabbedPanel = tabbedPanel;
VerticalLayout vlay = new VerticalLayout();
FormLayout form = new FormLayout();
form.setSpacing(true);
form.setMargin(true);
form.addComponent(getNameComponent());
form.addComponent(getLogLevelComponent());
form.addComponent(getStartTypeComponent());
vlay.addComponent(form);
cronLayout = new HorizontalLayout();
cronLayout.setSpacing(true);
cronLayout.setMargin(true);
cronLayout.addComponent(getScheduleComponent("Second"));
cronLayout.addComponent(getScheduleComponent("Minute"));
cronLayout.addComponent(getScheduleComponent("Hour"));
cronLayout.addComponent(getScheduleComponent("Day"));
cronLayout.addComponent(getScheduleComponent("Month"));
cronLayout.addComponent(getScheduleComponent("Day of Week"));
cronLayout.addComponent(getScheduleComponent("Year"));
vlay.addComponent(cronLayout);
FormLayout cronForm = new FormLayout();
cronForm.setSpacing(true);
cronForm.setMargin(true);
cronForm.addComponent(getCronComponent());
vlay.addComponent(cronForm);
table = new Table();
table.setSizeFull();
BeanItemContainer<AgentFlowDeployParm> container = new BeanItemContainer<AgentFlowDeployParm>(AgentFlowDeployParm.class);
table.setContainerDataSource(container);
table.setEditable(true);
table.setSelectable(true);
table.setTableFieldFactory(new EditFieldFactory());
table.setVisibleColumns("name", "value");
table.setColumnHeaders("Parameter Name", "Value");
container.addAll(agentDeployment.getAgentDeploymentParms());
setSplitPosition(60f);
setFirstComponent(vlay);
setSecondComponent(table);
updateScheduleEnable();
updateScheduleFields();
}
示例11: getSortedFachdefinitionen
import com.vaadin.data.util.BeanItemContainer; //導入方法依賴的package包/類
public static BeanItemContainer<FachdefinitionLaso> getSortedFachdefinitionen() {
BeanItemContainer<FachdefinitionLaso> fachdefinitionen = new BeanItemContainer<FachdefinitionLaso>(FachdefinitionLaso.class);
fachdefinitionen.addAll(getInstance().getItemIds());
fachdefinitionen.sort(new Object[]{FachdefinitionLaso.FACHTYP_COLUMN, FachdefinitionPojo.FACHBEZEICHNUNG_COLUMN}, new boolean[] {false, true});
return fachdefinitionen;
}