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


Java TextLocation.CENTER属性代码示例

本文整理汇总了Java中com.google.gwt.user.cellview.client.SimplePager.TextLocation.CENTER属性的典型用法代码示例。如果您正苦于以下问题:Java TextLocation.CENTER属性的具体用法?Java TextLocation.CENTER怎么用?Java TextLocation.CENTER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.google.gwt.user.cellview.client.SimplePager.TextLocation的用法示例。


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

示例1: DefaultResourceListViewImpl

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,代码行数:25,代码来源:DefaultResourceListViewImpl.java

示例2: SnmpSelectListViewImpl

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,代码行数:25,代码来源:SnmpSelectListViewImpl.java

示例3: PanelPast

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,代码行数:16,代码来源:PanelPast.java

示例4: setupAnalyzerAndReportPanel2

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,代码行数:35,代码来源:AnalyzerAndReportUI.java

示例5: addDialogWidgets

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,代码行数:32,代码来源:ControlledVocabularyTermLinksView.java

示例6: initializeTables

private void initializeTables() {

        m_ipInterfaceTable.setPageSize(19);
        m_ipInterfaceTable.addSelectEventHandler(this);
        
        m_ipIfaceDataProvider = new ListDataProvider<IpInterface>();
        m_ipIfaceDataProvider.addDataDisplay(m_ipInterfaceTable);
        
        SimplePager ipSimplePager = new SimplePager(TextLocation.CENTER, (Resources) GWT.create(OnmsSimplePagerResources.class), true, 1000, false);
        ipSimplePager.setWidth("100%");
        ipSimplePager.setDisplay(m_ipInterfaceTable);
        ipSimplePager.startLoading();
        m_ipTableDiv.add(ipSimplePager);
        
        m_physicalInterfaceTable.setPageSize(20);
        m_physicalInterfaceTable.addSelectEventHandler(this);
        
        m_physicalIfaceDataProvider = new ListDataProvider<PhysicalInterface>();
        m_physicalIfaceDataProvider.addDataDisplay(m_physicalInterfaceTable);
        
        SimplePager physicalSimplePager = new SimplePager(TextLocation.CENTER, (Resources) GWT.create(OnmsSimplePagerResources.class), true, 1000, false);
        physicalSimplePager.setWidth("100%");
        physicalSimplePager.setDisplay(m_physicalInterfaceTable);
        physicalSimplePager.startLoading();
        m_physTableDiv.add(physicalSimplePager);
        
        m_ipInterfaceTableDiv.getElement().getStyle().setOverflow(Overflow.AUTO);
        m_physicalTableDiv.getElement().getStyle().setOverflow(Overflow.AUTO);
        
    }
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:30,代码来源:PageableNodeList.java

示例7: PanelSettingImageLink

public PanelSettingImageLink() {
	setHorizontalAlignment(ALIGN_CENTER);

	final CellTableImageLink cellTableImageLink = new CellTableImageLink();
	final SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	final SimplePager simplePager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
	simplePager.setDisplay(cellTableImageLink);

	add(simplePager);
	add(cellTableImageLink);
}
 
开发者ID:nodchip,项目名称:QMAClone,代码行数:11,代码来源:PanelSettingImageLink.java

示例8: update

private void update(List<PacketProblem> problems) {
	clear();

	CellTableProblem table = new CellTableProblem(problems, false, PAGE_SIZE);
	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager simplePager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0,
			true);
	simplePager.setDisplay(table);

	add(simplePager);
	add(table);
}
 
开发者ID:nodchip,项目名称:QMAClone,代码行数:12,代码来源:PanelSettingIndicatedProblems.java

示例9: setupDecisionPanels

public void setupDecisionPanels(ScrollPanel decisionPanel, DockLayoutPanel dPanel) {
	// Create a CellTable.
	final CellTable<DecisionDTO> table = new CellTable<DecisionDTO>();
	setupDecisionDisplayPanel(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);

    final SingleSelectionModel<DecisionDTO> selectionModel = new SingleSelectionModel<DecisionDTO>();
    table.setSelectionModel(selectionModel);

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

	greetingService.getDecisions(new AsyncCallbackAdapter<List<DecisionDTO>>() {
		/*
		public void onFailure(Throwable caught) {
			errorLabelDisplay.setText(SERVER_ERROR);
		}
		*/
		// Called by onFailure if the session is still valid
		public void doFailureAction() {
			errorLabelDisplay.setText(SERVER_ERROR);
		}

		public void onSuccess(List<DecisionDTO> result) {
			dataProvider.setList(result);
		}
	});

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

	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelControl = new Label();
	HorizontalPanel controlPanel = new HorizontalPanel();
	controlPanel.addStyleName("essencePanel");
	controlPanel.setSpacing(10);
	setupControlPanel(controlPanel, errorLabelControl, dataProvider);
	vPanel.add(controlPanel);	
    
	vPanel.add(errorLabelControl);
	dPanel.addNorth(vPanel, 10);
}
 
开发者ID:dpinney,项目名称:essence,代码行数:51,代码来源:DecisionUI.java

示例10: setupActionPanels

public void setupActionPanels(ScrollPanel ActionPanel, DockLayoutPanel dPanel) {
	

	// Create a CellTable.
	final CellTable<ActionDTO> table = new CellTable<ActionDTO>();
	setupActionDisplayPanel(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);

    final SingleSelectionModel<ActionDTO> selectionModel = new SingleSelectionModel<ActionDTO>();
    table.setSelectionModel(selectionModel);

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

	greetingService.getActions(new AsyncCallbackAdapter<List<ActionDTO>>() {
		/*
		public void onFailure(Throwable caught) {
			errorLabelDisplay.setText(SERVER_ERROR);
		}
		*/
		
		// Called by onFailure if the session is still valid
		public void doFailureAction() {
			errorLabelDisplay.setText(SERVER_ERROR);
		}

		public void onSuccess(List<ActionDTO> result) {
			dataProvider.setList(result);
		}
	});

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

	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelControl = new Label();
	HorizontalPanel controlPanel = new HorizontalPanel();
	controlPanel.addStyleName("essencePanel");
	controlPanel.setSpacing(10);
	setupControlPanel(controlPanel, errorLabelControl, dataProvider);
	vPanel.add(controlPanel);	
    
	vPanel.add(errorLabelControl);
	dPanel.addNorth(vPanel, 10);
}
 
开发者ID:dpinney,项目名称:essence,代码行数:54,代码来源:ActionUI.java

示例11: setupDecisionRulePanel

public void setupDecisionRulePanel(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {
	

	final Label errorLabelDisplay = new Label();

	// Create a CellTable.
	final CellTable<DecisionRuleDTO> table = new CellTable<>();
	setupDecisionRuleDisplayPanel(table, errorLabelDisplay);

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

	final SingleSelectionModel<DecisionRuleDTO> selectionModel = new SingleSelectionModel<>();
    table.setSelectionModel(selectionModel);

	greetingService.getDecisionRules(new AsyncCallbackAdapter<List<DecisionRuleDTO>>() {
		// Called by onFailure if the session is still valid
		public void doFailureAction() {
			errorLabelDisplay.setText(SERVER_ERROR);
		}

		public void onSuccess(List<DecisionRuleDTO> result) {
			dataProvider.setList(result);
		}
	});

	VerticalPanel displayPanel = new VerticalPanel();
	displayPanel.add(pager);
	displayPanel.add(table);
	displayPanel.add(errorLabelDisplay);
	displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
	analyzerPanel.add(displayPanel);
	
	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelActivateDetector = new Label();
	HorizontalPanel addRuleAndFilterPanel = new HorizontalPanel();
	addRuleAndFilterPanel.addStyleName("essencePanel");
	addRuleAndFilterPanel.setSpacing(10);
	setupControlPanel(addRuleAndFilterPanel, errorLabelActivateDetector, dataProvider);
	vPanel.add(addRuleAndFilterPanel);	
    
	vPanel.add(errorLabelActivateDetector);
	dPanel.addNorth(vPanel, 10);
}
 
开发者ID:dpinney,项目名称:essence,代码行数:46,代码来源:DecisionRuleUI.java

示例12: setupAlertPanel2

public void setupAlertPanel2(SplitLayoutPanel alertPanel) {
    // Create a CellTable.
    final CellTable<AlertDTO> table = new CellTable<>();
    setupAlertsDisplayPanel(table, dataProvider);

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

    greetingService.getAlerts(alertFilterType, new AsyncCallbackAdapter<List<AlertDTO>>() {
        // Called by onFailure if the session is still valid
        public void doFailureAction() {
            errorLabelDisplay.setText(SERVER_ERROR);
        }

        public void onSuccess(List<AlertDTO> result) {
            dataProvider.setList(result);

            alertRetrievalTimer = new Timer() {
                @Override
                public void run() {
                    updateDataProviderOnTimer();
                }
            };

            //alertRetrievalTimer.schedule(10000);
        }
    });

    alertPanel.getElement().setId("diplayPanel");
    alertPanel.setTitle("Alerts");

    statusPanel = new ScrollPanel();
    statusPanel.getElement().setId("statusPanel");
    alertPanel.addEast(statusPanel, 350);

    HorizontalPanel buttons = new HorizontalPanel();
    buttons.addStyleName("essencePanel");
    buttons.getElement().setId("buttonsFlowPanel");
    buttons.setSpacing(10);
    setupButtons(buttons);

    VerticalPanel vertPanel = new VerticalPanel();
    vertPanel.getElement().setId("vertPanel");
    vertPanel.add(buttons);
    vertPanel.add(errorLabelDisplay);
    vertPanel.add(pager);
    vertPanel.add(table);

    ScrollPanel tableScrollPanel = new ScrollPanel();
    tableScrollPanel.getElement().setId("tableScrollPanel");
    tableScrollPanel.addStyleName("reportPanelScroll");
    tableScrollPanel.add(vertPanel);
    alertPanel.add(tableScrollPanel);
}
 
开发者ID:dpinney,项目名称:essence,代码行数:57,代码来源:AlertUI.java

示例13: addDialogWidgets

private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();					
	HorizontalPanel filterPanel = new HorizontalPanel();
	Label filterLabel = new Label("Keyword Filter:");
	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);
				}
			}
		}
	};
	Button closeButton = new Button("Close");
	closeButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
		}
	});
	
	filterLabel.addStyleName("dialog-label");
	
	filterPanel.addStyleName("dialog-hpanel");
	filterPanel.add(filterLabel);
	filterPanel.add(filterTextBox);
	filterPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
					
	pager.addStyleName("centered-hortz");				    
	pager.setDisplay(table);
	
	vertPanel.addStyleName("dialog-vpanel");
	vertPanel.add(filterPanel);
	vertPanel.add(table);
	vertPanel.add(pager);
    vertPanel.add(closeButton);
    vertPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_CENTER);
	dialogBox.setWidget(vertPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:47,代码来源:HistoryPopup.java

示例14: PasswordView

public PasswordView() {

		// Create a DataGrid.

		/*
		 * Set a key provider that provides a unique key for each PasswordCard.
		 * If key is used to identify PasswordCard when fields (such as the url
		 * and login) change.
		 */
		ProvidesKey<PasswordCard> KEY_PROVIDER = new ProvidesKey<PasswordCard>() {
			@Override
			public Object getKey(PasswordCard item) {
				return item == null ? null : item.getId();
			}
		};

		dataGrid = new DataGrid<PasswordCard>(20, tableRes, KEY_PROVIDER);
		dataGrid.setWidth("100%");

		/*
		 * Do not refresh the headers every time the data is updated. The footer
		 * depends on the current data, so we do not disable auto refresh on the
		 * footer.
		 */
		dataGrid.setAutoHeaderRefreshDisabled(true);

		// Set the message to display when the table is empty.
		dataGrid.setEmptyTableWidget(new Label("Vide"));

		// Attach a column sort handler to the ListDataProvider to sort the
		// list.
		dataProvider = new ListDataProvider<PasswordCard>();
		ListHandler<PasswordCard> sortHandler = new ListHandler<PasswordCard>(dataProvider.getList());
		dataGrid.addColumnSortHandler(sortHandler);

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

		// Add a selection model so we can select cells.
		final NoSelectionModel<PasswordCard> selectionModel = new NoSelectionModel<PasswordCard>();
		selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
			@Override
			public void onSelectionChange(SelectionChangeEvent event) {
				// final PasswordCard passwordCard =
				// selectionModel.getLastSelectedObject();

			}
		});

		dataGrid.setSelectionModel(selectionModel);

		/*
		 * final SelectionModel<PasswordCard> selectionModel = new
		 * MultiSelectionModel<PasswordCard>( KEY_PROVIDER);
		 */
		/*
		 * dataGrid.setSelectionModel(selectionModel,
		 * DefaultSelectionEventManager .<PasswordCard>
		 * createCheckboxManager());
		 */

		// Initialize the columns.
		initializeColumns(sortHandler);

		// Specify a custom table.
		dataGrid.setTableBuilder(new CustomTableBuilder());
		dataGrid.setHeaderBuilder(new CustomHeaderBuilder());
		dataGrid.setFooterBuilder(new CustomFooterBuilder());

		// Add the CellList to the adapter in the database.
		dataProvider.addDataDisplay(dataGrid);

		initWidget(uiBinder.createAndBindUi(this));
	}
 
开发者ID:guiguib,项目名称:yaph,代码行数:76,代码来源:PasswordView.java

示例15: create

public static SimplePager create() {
    return new SimplePager(TextLocation.CENTER, getResources(), false, 0, true);
}
 
开发者ID:inepex,项目名称:ineform,代码行数:3,代码来源:PagerCreator.java


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