当前位置: 首页>>代码示例>>Java>>正文


Java SimplePager类代码示例

本文整理汇总了Java中com.google.gwt.user.cellview.client.SimplePager的典型用法代码示例。如果您正苦于以下问题:Java SimplePager类的具体用法?Java SimplePager怎么用?Java SimplePager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SimplePager类属于com.google.gwt.user.cellview.client包,在下文中一共展示了SimplePager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DomainList

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
public DomainList() {
	
	table = new CellTable<>(15, (Resources) GWT.create(TableResources.class));
	
	table.addColumn( new Column<String,SafeHtml>(new SafeHtmlCell() ) {
		@Override
		public SafeHtml getValue(String domain) {
			return new LinkHtml( domain, "javascript:selectDomain(\"" + domain + "\")" ); };
	}, "Domain");
	
	dataProvider = new ListDataProvider<String>();
	dataProvider.addDataDisplay( table );
	
	SimplePager pager = new SimplePager();
    pager.setDisplay( table );
    
    table.setWidth("100%");
	tablePanel.add( table );
	tablePanel.add( pager );
	tablePanel.setWidth("100%");
	
	
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:24,代码来源:DomainList.java

示例2: reloadTable

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
private void reloadTable(List<Pair<RiskAnalysisSessionInfo, Boolean>> sessions) {
	table.setRowData(0, sessions);
	
	dataProvider = new ListDataProvider<Pair<RiskAnalysisSessionInfo, Boolean>>();
	dataProvider.addDataDisplay( table );
	
	for( int i = 0; i < sessions.size(); i++ ) {
		dataProvider.getList().add( sessions.get(i) );
	}
	
	pager = new SimplePager();
    pager.setDisplay( table );
    
    table.setWidth("100%");
    
    tablePanel.clear();
	tablePanel.add( table );
	tablePanel.add( pager );
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:20,代码来源:MainPageModule.java

示例3: createPagingDataGrid

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
public static UIObject createPagingDataGrid(DataGridGVO gvo, String uuid, String parent) {
	

	QCellTable table = new QCellTable(gvo,uuid,parent);
	RendererHelper.fillIn(gvo, table, uuid, parent, gvo.getContext());
	FlowPanel fp = new FlowPanel();
	fp.add(table);
	
	if (gvo.getPageSize()!=null){
		if (gvo.getPageSize()>0){
			SimplePager pager = new SimplePager();
			pager.setDisplay(table);
			
			fp.add(pager);			
		}
	}
	
	UIObject uiObject = fp;
	return uiObject;
	
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:22,代码来源:ImprovedDatagridFactory.java

示例4: ListView

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
public ListView(final ListPresenter<LISTITEM> presenter, Cell<LISTITEM> itemDisplayCell) {
	this.presenter = presenter;	
	this.cellList = new CellList<LISTITEM>(itemDisplayCell);
	
	cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);

    // Add a selection model to handle user selection.
    final SingleSelectionModel<LISTITEM> selectionModel = new SingleSelectionModel<LISTITEM>();
    cellList.setSelectionModel(selectionModel);
    selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
      public void onSelectionChange(SelectionChangeEvent event) {
        LISTITEM selected = selectionModel.getSelectedObject();
        if (selected != null) {
          presenter.onSelectionChanged(event, selectionModel);
        }
      }
    });
	this.pagerTop = new SimplePager();
	this.pagerTop.setDisplay(this.cellList);
	this.pagerBottom = new SimplePager();
	this.pagerBottom.setDisplay(this.cellList);
	
	initWidget((Widget)uiBinder.createAndBindUi(this));		
}
 
开发者ID:jkonert,项目名称:socom,代码行数:25,代码来源:ListView.java

示例5: DefaultResourceListViewImpl

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
public DefaultResourceListViewImpl() {
    initWidget(uiBinder.createAndBindUi(this));
    
    m_layoutPanel.setSize("100%", "335px");
    
    m_dataProvider = new ListDataProvider<ResourceListItem>();
    m_dataProvider.addDataDisplay(m_resourceTable);
    
    SimplePager pager = new SimplePager(TextLocation.CENTER);
    pager.setStyleName("onms-table-no-borders-margin");
    pager.getElement().getStyle().setBackgroundColor("#E0E0E0");
    pager.getElement().getStyle().setWidth(100, Unit.PCT);
    pager.setDisplay(m_resourceTable);
    m_simplePagerContainer.add(pager);
    
    m_resourceTable.getSelectionModel().addSelectionChangeHandler(new Handler() {
        
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            m_presenter.onResourceItemSelected();
        }
    });
    
    m_resourceTable.setWidth("100%");
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:26,代码来源:DefaultResourceListViewImpl.java

示例6: SnmpSelectListViewImpl

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
public SnmpSelectListViewImpl() {
    initWidget(uiBinder.createAndBindUi(this));
    m_layoutPanel.setSize("100%", "500px");
    m_layoutPanel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    m_layoutPanel.getElement().getStyle().setBorderWidth(1, Unit.PX);
    m_layoutPanel.getElement().getStyle().setBorderColor("#D0D0D0");
    
    m_snmpSelectTable.setWidth("100%");
    m_snmpSelectTable.setCollectUpdateHandler(new SnmpSelectTableCollectUpdateHandler() {
        
        @Override
        public void onSnmpInterfaceCollectUpdated(int ifIndex, String oldValue, String newValue) {
            m_presenter.onSnmpInterfaceCollectUpdated(ifIndex, oldValue, newValue);
        }
    });
    
    m_simplePager = new SimplePager(TextLocation.CENTER, (Resources) GWT.create(OnmsSimplePagerResources.class), true, 1000, false);
    m_simplePager.setWidth("100%");
    m_simplePager.setDisplay(m_snmpSelectTable);
    m_pagerContainer.add(m_simplePager);
    
    m_dataList = new ListDataProvider<SnmpCellListItem>();
    m_dataList.addDataDisplay(m_snmpSelectTable);
    
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:26,代码来源:SnmpSelectListViewImpl.java

示例7: PanelPast

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
public PanelPast() {
	cellListChatLog = new CellListChatLog(new PastChatDataProvider(this));

	final SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	simplePagerHeader = new SimplePager(TextLocation.CENTER, pagerResources, true, 10, true);
	simplePagerHeader.setDisplay(cellListChatLog);
	simplePagerHeader.setPageSize(Constant.CHAT_MAX_RESPONSES);

	simplePagerFooter = new SimplePager(TextLocation.CENTER, pagerResources, true, 10, true);
	simplePagerFooter.setDisplay(cellListChatLog);
	simplePagerFooter.setPageSize(Constant.CHAT_MAX_RESPONSES);

	initWidget(uiBinder.createAndBindUi(this));

	datePicker.addValueChangeHandler(this);
}
 
开发者ID:nodchip,项目名称:QMAClone,代码行数:17,代码来源:PanelPast.java

示例8: updatePaginationState

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
/**
  * This updates the current active page, and the enabled state
  * of the previous and next buttons in the Pagination based
  * on the state of the given SimplePager.
  * @param pager the SimplePager of the CellTable/DataGrid
  */
 private void updatePaginationState(final SimplePager pager) {

     for (int i = 0; i < getWidgetCount(); i++) {
         if (i == 0) { //previous button
             ((AnchorListItem)getWidget(i)).setEnabled(pager.hasPreviousPage());
         }
         else if (i == getWidgetCount() - 1) { //next button
             ((AnchorListItem)getWidget(i)).setEnabled(pager.hasNextPage());
         }
         else {
             int index = i - 1;
             if (index == pager.getPage()) {
                 ((AnchorListItem)getWidget(i)).setActive(true);
             }
             else {
                 ((AnchorListItem)getWidget(i)).setActive(false);
             }
         }
     }
}
 
开发者ID:gwtbootstrap3,项目名称:gwtbootstrap3,代码行数:27,代码来源:Pagination.java

示例9: initGrid

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
private void initGrid() {
    // Init the logs grid.
    logsGrid = new CellTable<>(KEY_PROVIDER);
    logsGrid.setWidth("100%",
                      true);

    // Do not refresh the headers and footers every time the data is updated.
    logsGrid.setAutoHeaderRefreshDisabled(true);
    logsGrid.setAutoFooterRefreshDisabled(true);

    // Create a Pager to control the table.
    final SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    logsGridPager = new SimplePager(SimplePager.TextLocation.CENTER,
                                    pagerResources,
                                    false,
                                    0,
                                    true);

    logsGridPager.setDisplay(logsGrid);
    presenter.addDataDisplay(logsGrid);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:22,代码来源:NotificationsView.java

示例10: initGrid

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
private void initGrid() {
    // Init the logs grid.
    logsGrid = new CellTable<Notification>(presenter.KEY_PROVIDER);
    logsGrid.setWidth("100%",
                      true);
    // Do not refresh the headers and footers every time the data is updated.
    logsGrid.setAutoHeaderRefreshDisabled(true);
    logsGrid.setAutoFooterRefreshDisabled(true);
    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    logsGridPager = new SimplePager(SimplePager.TextLocation.CENTER,
                                    pagerResources,
                                    false,
                                    0,
                                    true);
    logsGridPager.setDisplay(logsGrid);
    presenter.addDataDisplay(logsGrid);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:19,代码来源:NotificationsView.java

示例11: setupAnalyzerAndReportPanel2

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
public void setupAnalyzerAndReportPanel2(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {
	// Create a CellTable.
	final CellTable<AnalyzerResultDTO> table = new CellTable<AnalyzerResultDTO>();
	setupAnalyzeResultDisplayPanel(table, dataProvider);

	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
	pager.setDisplay(table);
	dataProvider.addDataDisplay(table);

	// Set the width of each column.
	// table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
	final Label errorLabelDisplay = new Label();

	VerticalPanel displayPanel = new VerticalPanel();
	displayPanel.add(pager);
	displayPanel.add(table);
	displayPanel.add(errorLabelDisplay);
	displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
	analyzerPanel.add(displayPanel);

	// DoS detector panel
	// Any detector error message
	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelActivateDetector = new Label();

	HorizontalPanel detectorPanel = new HorizontalPanel();
	detectorPanel.addStyleName("essencePanel");
	detectorPanel.setSpacing(10);
	setupDetectorPanel(detectorPanel, errorLabelActivateDetector, dataProvider);
	vPanel.add(detectorPanel);	
    
	vPanel.add(errorLabelActivateDetector);
	dPanel.addNorth(vPanel, 10);
}
 
开发者ID:dpinney,项目名称:essence,代码行数:36,代码来源:AnalyzerAndReportUI.java

示例12: addDialogWidgets

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();					
	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true) {
		@Override
		public void setPageStart(int index) {
			HasRows display = getDisplay();
			if (display != null) {
				Range range = display.getVisibleRange();
				int pageSize = range.getLength();
				if (isRangeLimited() && display.isRowCountExact()) {
					index = Math.min(index, display.getRowCount() - 1);
				}
				index = Math.max(0, index);
				if (index != range.getStart()) {
					display.setVisibleRange(index, pageSize);
				}
			}
		}
	};
			
	vertPanel.addStyleName("dialog-vpanel");
					
	
	vertPanel.add(table);
	vertPanel.add(pager);
    
	pager.setDisplay(table);
	pager.addStyleName("centered-hortz");    
    				
	dialogBox.setWidget(vertPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:33,代码来源:ControlledVocabularyTermLinksView.java

示例13: initImagesGrid

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
private void initImagesGrid() {
    imagesGrid = new CellTable<KieImage>(KEY_PROVIDER);
    imagesGrid.setWidth("100%", true);

    // Do not refresh the headers and footers every time the data is updated.
    imagesGrid.setAutoHeaderRefreshDisabled(true);
    imagesGrid.setAutoFooterRefreshDisabled(true);

    // Attach a column sort handler to the ListDataProvider to sort the list.
    ColumnSortEvent.ListHandler<KieImage> sortHandler = new ColumnSortEvent.ListHandler<KieImage>(imagesProvider.getList());
    imagesGrid.addColumnSortHandler(sortHandler);

    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(imagesGrid);

    // Add a selection model so we can select cells.
    final SelectionModel<KieImage> selectionModel = new MultiSelectionModel<KieImage>(KEY_PROVIDER);
    imagesGrid.setSelectionModel(selectionModel,
            DefaultSelectionEventManager.<KieContainer>createCheckboxManager());

    // Initialize the columns.
    initTableColumns(selectionModel, sortHandler);

    // Add the CellList to the adapter in the database.
    addDataDisplay(imagesGrid);
}
 
开发者ID:kiegroup,项目名称:kie-docker-ci,代码行数:29,代码来源:ImagesView.java

示例14: initArtifactsGrid

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
private void initArtifactsGrid() {
    artifactsGrid = new CellTable<KieArtifact>(KEY_PROVIDER);
    artifactsGrid.setWidth("100%", true);

    // Do not refresh the headers and footers every time the data is updated.
    artifactsGrid.setAutoHeaderRefreshDisabled(true);
    artifactsGrid.setAutoFooterRefreshDisabled(true);

    // Attach a column sort handler to the ListDataProvider to sort the list.
    ColumnSortEvent.ListHandler<KieArtifact> sortHandler = new ColumnSortEvent.ListHandler<KieArtifact>(gridProvider.getList());
    artifactsGrid.addColumnSortHandler(sortHandler);

    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(artifactsGrid);

    // Add a selection model so we can select cells.
    final SelectionModel<KieArtifact> selectionModel = new MultiSelectionModel<KieArtifact>(KEY_PROVIDER);
    artifactsGrid.setSelectionModel(selectionModel,
            DefaultSelectionEventManager.<KieArtifact>createCheckboxManager());

    // Initialize the columns.
    initTableColumns(selectionModel, sortHandler);

    // Add the CellList to the adapter in the database.
    addDataDisplay(artifactsGrid);
}
 
开发者ID:kiegroup,项目名称:kie-docker-ci,代码行数:29,代码来源:ArtifactsView.java

示例15: KieContainersExplorer

import com.google.gwt.user.cellview.client.SimplePager; //导入依赖的package包/类
@UiConstructor
public KieContainersExplorer() {

    containerList = new CellTable<KieContainer>(KEY_PROVIDER);
    containerList.setWidth("100%", true);

    // Do not refresh the headers and footers every time the data is updated.
    containerList.setAutoHeaderRefreshDisabled(true);
    containerList.setAutoFooterRefreshDisabled(true);

    // Attach a column sort handler to the ListDataProvider to sort the list.
    ColumnSortEvent.ListHandler<KieContainer> sortHandler = new ColumnSortEvent.ListHandler<KieContainer>(containersProvider.getList());
    containerList.addColumnSortHandler(sortHandler);

    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(containerList);

    // Add a selection model so we can select cells.
    final SelectionModel<KieContainer> selectionModel = new MultiSelectionModel<KieContainer>(KEY_PROVIDER);
    containerList.setSelectionModel(selectionModel,
            DefaultSelectionEventManager.<KieContainer>createCheckboxManager());

    // Initialize the columns.
    initTableColumns(selectionModel, sortHandler);

    // Add the CellList to the adapter in the database.
    addDataDisplay(containerList);
    
    initWidget(uiBinder.createAndBindUi(this));
}
 
开发者ID:kiegroup,项目名称:kie-docker-ci,代码行数:33,代码来源:KieContainersExplorer.java


注:本文中的com.google.gwt.user.cellview.client.SimplePager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。