本文整理汇总了Java中com.vaadin.ui.Table.setPageLength方法的典型用法代码示例。如果您正苦于以下问题:Java Table.setPageLength方法的具体用法?Java Table.setPageLength怎么用?Java Table.setPageLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Table
的用法示例。
在下文中一共展示了Table.setPageLength方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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));
}
示例5: generateUi
import com.vaadin.ui.Table; //导入方法依赖的package包/类
private void generateUi() {
logger.debug("GenerateUi aufgerufen");
headerLabel = new Label("Direkte Eingabe der Cash-Flows (in EUR)");
gap = new Label();
inputTable = new Table();
expandingGap = new Label();
headerLabel.setStyleName("periodHeaderLabel");
gap.setHeight("15px");
inputTable.setWidth(100, UNITS_PERCENTAGE);
inputTable.setStyleName("fcfTable");
inputTable.setPageLength(3);
expandingGap.setHeight(100, UNITS_PERCENTAGE);
addComponent(headerLabel);
addComponent(gap);
addComponent(inputTable);
addComponent(expandingGap);
setExpandRatio(expandingGap, 1.0f);
}
示例6: 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;
}
示例7: generateUi
import com.vaadin.ui.Table; //导入方法依赖的package包/类
private void generateUi() {
logger.debug("GenerateUi aufgerufen");
headerLabel = new Label("Eingabe der Werte zur Cash-Flow-Berechnung (in EUR)");
headerLabel2 = new Label("Eingabe des Fremdkapitals (in EUR)");
gap = new Label();
inputTable = new Table();
gap2 = new Label();
gap3 = new Label();
capitalStockInput = new Table();
expandingGap = new Label();
headerLabel.setStyleName("periodHeaderLabel");
headerLabel2.setStyleName("periodHeaderLabel");
gap.setHeight("15px");
gap2.setHeight("15px");
gap3.setHeight("15px");
inputTable.setWidth(100, UNITS_PERCENTAGE);
inputTable.setStyleName("fcfTable");
inputTable.setPageLength(15);
capitalStockInput.setWidth(100, UNITS_PERCENTAGE);
capitalStockInput.setStyleName("fcfTable");
capitalStockInput.setPageLength(1);
expandingGap.setHeight(100, UNITS_PERCENTAGE);
addComponent(headerLabel);
addComponent(gap);
addComponent(inputTable);
addComponent(gap2);
addComponent(headerLabel2);
addComponent(gap3);
addComponent(capitalStockInput);
// addComponent(expandingGap);
// setExpandRatio(expandingGap, 1.0f);
}
示例8: generateUi
import com.vaadin.ui.Table; //导入方法依赖的package包/类
private void generateUi() {
logger.debug("GenerateUi aufgerufen");
headerLabel = new Label("Eingabe der Werte zur Cash-Flow-Berechnung (in EUR)");
headerLabel2 = new Label("Eingabe des Fremdkapitals (in EUR)");
gap = new Label();
inputTable = new Table();
gap2 = new Label();
gap3 = new Label();
capitalStockInput = new Table();
expandingGap = new Label();
headerLabel.setStyleName("periodHeaderLabel");
headerLabel2.setStyleName("periodHeaderLabel");
gap.setHeight("15px");
gap2.setHeight("15px");
gap3.setHeight("15px");
inputTable.setWidth(100, UNITS_PERCENTAGE);
inputTable.setStyleName("fcfTable");
inputTable.setPageLength(13);
capitalStockInput.setWidth(100, UNITS_PERCENTAGE);
capitalStockInput.setStyleName("fcfTable");
capitalStockInput.setPageLength(1);
expandingGap.setHeight(100, UNITS_PERCENTAGE);
addComponent(headerLabel);
addComponent(gap);
addComponent(inputTable);
addComponent(gap2);
addComponent(headerLabel2);
addComponent(gap3);
addComponent(capitalStockInput);
// addComponent(expandingGap);
//
// setExpandRatio(expandingGap, 1.0f);
}
示例9: createTable
import com.vaadin.ui.Table; //导入方法依赖的package包/类
private void createTable() {
table = new Table();
table.setSizeFull();
table.setPageLength(SPUIDefinitions.ACCORDION_TAB_DETAILS_PAGE_LENGTH);
// Build Style
final StringBuilder style = new StringBuilder(ValoTheme.TABLE_COMPACT);
style.append(' ');
style.append(ValoTheme.TABLE_SMALL);
style.append(' ');
style.append(ValoTheme.TABLE_NO_VERTICAL_LINES);
// Set style
table.addStyleName(style.toString());
table.addStyleName("accordion-tab-table-style");
table.setImmediate(true);
}
示例10: 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);
}
}
示例11: addTableData
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void addTableData() {
LazyLoadingQuery lazyLoadingQuery = new TableDataQuery(tableName, managementService);
LazyLoadingContainer lazyLoadingContainer = new LazyLoadingContainer(lazyLoadingQuery, 10);
if (lazyLoadingContainer.size() > 0) {
Table data = new Table();
data.setContainerDataSource(lazyLoadingContainer);
data.setEditable(false);
data.setSelectable(true);
data.setColumnReorderingAllowed(true);
if (lazyLoadingQuery.size() < 10) {
data.setPageLength(0);
} else {
data.setPageLength(10);
}
addDetailComponent(data);
data.setWidth(100, UNITS_PERCENTAGE);
data.setHeight(100, UNITS_PERCENTAGE);
data.addStyleName(ExplorerLayout.STYLE_DATABASE_TABLE);
setDetailExpandRatio(data, 1.0f);
// Create column headers
TableMetaData metaData = managementService.getTableMetaData(tableName);
for (String columnName : metaData.getColumnNames()) {
data.addContainerProperty(columnName, String.class, null);
}
} else {
Label noDataLabel = new Label(i18nManager.getMessage(Messages.DATABASE_NO_ROWS));
noDataLabel.addStyleName(Reindeer.LABEL_SMALL);
addDetailComponent(noDataLabel);
setDetailExpandRatio(noDataLabel, 1.0f);
}
}
示例12: initProcessInstancesTable
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void initProcessInstancesTable() {
ProcessInstanceTableLazyQuery query = new ProcessInstanceTableLazyQuery(processDefinition.getId());
// Header
Label instancesTitle = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCES) + " (" + query.size() + ")");
instancesTitle.addStyleName(ExplorerLayout.STYLE_H3);
instancesTitle.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
instancesTitle.addStyleName(ExplorerLayout.STYLE_NO_LINE);
detailPanelLayout.addComponent(instancesTitle);
if (query.size() > 0) {
Label emptySpace = new Label(" ", Label.CONTENT_XHTML);
detailPanelLayout.addComponent(emptySpace);
Table instancesTable = new Table();
instancesTable.setWidth(400, UNITS_PIXELS);
if (query.size() > 6) {
instancesTable.setPageLength(6);
} else {
instancesTable.setPageLength(query.size());
}
LazyLoadingContainer container = new LazyLoadingContainer(query);
instancesTable.setContainerDataSource(container);
// container props
instancesTable.addContainerProperty(AlfrescoProcessInstanceTableItem.PROPERTY_ID, String.class, null);
instancesTable.addContainerProperty(AlfrescoProcessInstanceTableItem.PROPERTY_BUSINESSKEY, String.class, null);
instancesTable.addContainerProperty(AlfrescoProcessInstanceTableItem.PROPERTY_ACTIONS, Component.class, null);
// column alignment
instancesTable.setColumnAlignment(AlfrescoProcessInstanceTableItem.PROPERTY_ACTIONS, Table.ALIGN_CENTER);
// column header
instancesTable.setColumnHeader(AlfrescoProcessInstanceTableItem.PROPERTY_ID, i18nManager.getMessage(Messages.PROCESS_INSTANCE_ID));
instancesTable.setColumnHeader(AlfrescoProcessInstanceTableItem.PROPERTY_BUSINESSKEY, i18nManager.getMessage(Messages.PROCESS_INSTANCE_BUSINESSKEY));
instancesTable.setColumnHeader(AlfrescoProcessInstanceTableItem.PROPERTY_ACTIONS, i18nManager.getMessage(Messages.PROCESS_INSTANCE_ACTIONS));
instancesTable.setEditable(false);
instancesTable.setSelectable(true);
instancesTable.setNullSelectionAllowed(false);
instancesTable.setSortDisabled(true);
detailPanelLayout.addComponent(instancesTable);
} else {
Label noInstances = new Label(i18nManager.getMessage(Messages.PROCESS_NO_INSTANCES));
detailPanelLayout.addComponent(noInstances);
}
}
示例13: addTasks
import com.vaadin.ui.Table; //导入方法依赖的package包/类
protected void addTasks() {
Label header = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCE_HEADER_TASKS));
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));
Table taskTable = new Table();
taskTable.addStyleName(ExplorerLayout.STYLE_PROCESS_INSTANCE_TASK_LIST);
taskTable.setWidth(100, UNITS_PERCENTAGE);
// Fetch all tasks
List<HistoricTaskInstance> tasks = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(processInstance.getId())
.orderByHistoricTaskInstanceEndTime().desc()
.orderByHistoricActivityInstanceStartTime().desc()
.list();
if(tasks.size() > 0) {
// Finished icon
taskTable.addContainerProperty("finished", Component.class, null, "", null, Table.ALIGN_CENTER);
taskTable.setColumnWidth("finished", 22);
taskTable.addContainerProperty("name", String.class, null, i18nManager.getMessage(Messages.TASK_NAME),
null, Table.ALIGN_LEFT);
taskTable.addContainerProperty("priority", Integer.class, null, i18nManager.getMessage(Messages.TASK_PRIORITY),
null, Table.ALIGN_LEFT);
taskTable.addContainerProperty("assignee", Component.class, null, i18nManager.getMessage(Messages.TASK_ASSIGNEE),
null, Table.ALIGN_LEFT);
taskTable.addContainerProperty("dueDate", Component.class, null, i18nManager.getMessage(Messages.TASK_DUEDATE),
null, Table.ALIGN_LEFT);
taskTable.addContainerProperty("startDate", Component.class, null, i18nManager.getMessage(Messages.TASK_CREATE_TIME),
null, Table.ALIGN_LEFT);
taskTable.addContainerProperty("endDate", Component.class, null, i18nManager.getMessage(Messages.TASK_COMPLETE_TIME),
null, Table.ALIGN_LEFT);
panelLayout.addComponent(taskTable);
panelLayout.setExpandRatio(taskTable, 1.0f);
for(HistoricTaskInstance task : tasks) {
addTaskItem(task, taskTable);
}
taskTable.setPageLength(taskTable.size());
} else {
// No tasks
Label noTaskLabel = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCE_NO_TASKS));
panelLayout.addComponent(noTaskLabel);
}
}