當前位置: 首頁>>代碼示例>>Java>>正文


Java Table.setPageLength方法代碼示例

本文整理匯總了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;
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:21,代碼來源:EmailLayout.java

示例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;
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:22,代碼來源:NetworkLayout.java

示例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;
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:18,代碼來源:NetworkLayout.java

示例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));
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:17,代碼來源:AgentStatusWindow.java

示例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);

}
 
開發者ID:DHBW-Karlsruhe,項目名稱:businesshorizon2,代碼行數:23,代碼來源:DirektViewImpl.java

示例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;
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:15,代碼來源:SummaryLayout.java

示例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);
			
		}
 
開發者ID:DHBW-Karlsruhe,項目名稱:businesshorizon2,代碼行數:37,代碼來源:GesamtkostenVerfahrenViewImpl.java

示例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);
			
		}
 
開發者ID:DHBW-Karlsruhe,項目名稱:businesshorizon2,代碼行數:37,代碼來源:UmsatzkostenVerfahrenViewImpl.java

示例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);
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:16,代碼來源:ConfirmationTab.java

示例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);
  }
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:38,代碼來源:ProcessInstanceDetailPanel.java

示例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);
  }
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:37,代碼來源:DatabaseDetailPanel.java

示例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("&nbsp;", 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);
  }
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:51,代碼來源:AlfrescoProcessDefinitionDetailPanel.java

示例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("&nbsp;", 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);
  }
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:54,代碼來源:ProcessInstanceDetailPanel.java


注:本文中的com.vaadin.ui.Table.setPageLength方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。