本文整理汇总了Java中com.google.gwt.user.cellview.client.SimplePager.TextLocation类的典型用法代码示例。如果您正苦于以下问题:Java TextLocation类的具体用法?Java TextLocation怎么用?Java TextLocation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextLocation类属于com.google.gwt.user.cellview.client.SimplePager包,在下文中一共展示了TextLocation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: DefaultResourceListViewImpl
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的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
示例2: SnmpSelectListViewImpl
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的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
示例3: PanelPast
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的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
示例4: setupAnalyzerAndReportPanel2
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的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
示例5: addDialogWidgets
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的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
示例6: initializeTables
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:31,代码来源:PageableNodeList.java
示例7: PanelSettingImageLink
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:12,代码来源:PanelSettingImageLink.java
示例8: update
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:13,代码来源:PanelSettingIndicatedProblems.java
示例9: setupDecisionPanels
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:52,代码来源:DecisionUI.java
示例10: setupActionPanels
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:55,代码来源:ActionUI.java
示例11: setupDecisionRulePanel
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:47,代码来源:DecisionRuleUI.java
示例12: setupAlertPanel2
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:58,代码来源:AlertUI.java
示例13: addDialogWidgets
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:48,代码来源:HistoryPopup.java
示例14: PasswordView
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
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,代码行数:77,代码来源:PasswordView.java
示例15: create
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
public static SimplePager create() {
return new SimplePager(TextLocation.CENTER, getResources(), false, 0, true);
}
开发者ID:inepex,项目名称:ineform,代码行数:4,代码来源:PagerCreator.java
示例16: createPager
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
private SimplePager createPager() {
SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
pager.setDisplay(cellTable);
return pager;
}
开发者ID:nodchip,项目名称:QMAClone,代码行数:7,代码来源:PanelSettingThemeModeEditLogView.java
示例17: ProblemReportUi
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
public ProblemReportUi(List<PacketProblem> problems, boolean regist, boolean initialSort,
int maxProblemsPerPage) {
this.problems = problems;
if (initialSort) {
Collections.sort(problems, new Comparator<PacketProblem>() {
@Override
public int compare(PacketProblem o1, PacketProblem o2) {
return o1.id - o2.id;
}
});
}
cellTableProblem = new CellTableProblem(problems, regist, maxProblemsPerPage);
final SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
pager.setDisplay(cellTableProblem);
// cellTableProblem.addRangeChangeHandler(new RangeChangeEvent.Handler() {
// @Override
// public void onRangeChange(RangeChangeEvent EVENT) {
// Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
// @Override
// public void execute() {
// PlusOne.render();
// }
// });
// }
// });
cellTableProblem.addLoadingStateChangeHandler(new LoadingStateChangeEvent.Handler() {
@Override
public void onLoadingStateChanged(LoadingStateChangeEvent event) {
if (event.getLoadingState() != LoadingStateChangeEvent.LoadingState.LOADED) {
return;
}
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
PlusOne.render();
}
});
}
});
if (problems.size() < maxProblemsPerPage) {
pager.setVisible(false);
}
initWidget(uiBinder.createAndBindUi(this));
final int count = problems.size();
htmlHits.setHTML(SafeHtmlUtils.fromString(count + "件ヒット"));
if (!regist) {
buttonRegisterAll.setVisible(false);
}
}
开发者ID:nodchip,项目名称:QMAClone,代码行数:56,代码来源:ProblemReportUi.java
示例18: onInitialize
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
/**
* Initialize this example.
*/
@ShowcaseSource
@Override
public Widget onInitialize() {
resources = GWT.create(Resources.class);
resources.styles().ensureInjected();
// Create a DataGrid.
/*
* Set a key provider that provides a unique key for each contact. If key is
* used to identify contacts when fields (such as the name and address)
* change.
*/
dataGrid = new DataGrid<ContactInfo>(ContactDatabase.ContactInfo.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(constants.cwCustomDataGridEmpty()));
// Attach a column sort handler to the ListDataProvider to sort the list.
ListHandler<ContactInfo> sortHandler =
new ListHandler<ContactInfo>(ContactDatabase.get().getDataProvider().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 SelectionModel<ContactInfo> selectionModel =
new MultiSelectionModel<ContactInfo>(ContactDatabase.ContactInfo.KEY_PROVIDER);
dataGrid.setSelectionModel(selectionModel, DefaultSelectionEventManager
.<ContactInfo> 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.
ContactDatabase.get().addDataDisplay(dataGrid);
// Create the UiBinder.
Binder uiBinder = GWT.create(Binder.class);
return uiBinder.createAndBindUi(this);
}
开发者ID:Peergos,项目名称:Peergos,代码行数:61,代码来源:CwCustomDataGrid.java
示例19: onInitialize
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
/**
* Initialize this example.
*/
@ShowcaseSource
@Override
public Widget onInitialize() {
// Create a CellTable.
// Set a key provider that provides a unique key for each contact. If key is
// used to identify contacts when fields (such as the name and address)
// change.
cellTable = new CellTable<ContactInfo>(
ContactDatabase.ContactInfo.KEY_PROVIDER);
cellTable.setWidth("100%", true);
// Do not refresh the headers and footers every time the data is updated.
cellTable.setAutoHeaderRefreshDisabled(true);
cellTable.setAutoFooterRefreshDisabled(true);
// Attach a column sort handler to the ListDataProvider to sort the list.
ListHandler<ContactInfo> sortHandler = new ListHandler<ContactInfo>(
ContactDatabase.get().getDataProvider().getList());
cellTable.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(cellTable);
// Add a selection model so we can select cells.
final SelectionModel<ContactInfo> selectionModel = new MultiSelectionModel<ContactInfo>(
ContactDatabase.ContactInfo.KEY_PROVIDER);
cellTable.setSelectionModel(selectionModel,
DefaultSelectionEventManager.<ContactInfo> createCheckboxManager());
// Initialize the columns.
initTableColumns(selectionModel, sortHandler);
// Add the CellList to the adapter in the database.
ContactDatabase.get().addDataDisplay(cellTable);
// Create the UiBinder.
Binder uiBinder = GWT.create(Binder.class);
Widget widget = uiBinder.createAndBindUi(this);
return widget;
}
开发者ID:Peergos,项目名称:Peergos,代码行数:48,代码来源:CwCellTable.java
示例20: onInitialize
import com.google.gwt.user.cellview.client.SimplePager.TextLocation; //导入依赖的package包/类
/**
* Initialize this example.
*/
@ShowcaseSource
@Override
public Widget onInitialize() {
// Create a DataGrid.
/*
* Set a key provider that provides a unique key for each contact. If key is
* used to identify contacts when fields (such as the name and address)
* change.
*/
dataGrid = new DataGrid<ContactInfo>(ContactDatabase.ContactInfo.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(constants.cwDataGridEmpty()));
// Attach a column sort handler to the ListDataProvider to sort the list.
ListHandler<ContactInfo> sortHandler =
new ListHandler<ContactInfo>(ContactDatabase.get().getDataProvider().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 SelectionModel<ContactInfo> selectionModel =
new MultiSelectionModel<ContactInfo>(ContactDatabase.ContactInfo.KEY_PROVIDER);
dataGrid.setSelectionModel(selectionModel, DefaultSelectionEventManager
.<ContactInfo> createCheckboxManager());
// Initialize the columns.
initTableColumns(selectionModel, sortHandler);
// Add the CellList to the adapter in the database.
ContactDatabase.get().addDataDisplay(dataGrid);
// Create the UiBinder.
Binder uiBinder = GWT.create(Binder.class);
return uiBinder.createAndBindUi(this);
}
开发者ID:Peergos,项目名称:Peergos,代码行数:53,代码来源:CwDataGrid.java
注:本文中的com.google.gwt.user.cellview.client.SimplePager.TextLocation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论