本文整理汇总了Java中com.google.gwt.user.cellview.client.SimplePager.TextLocation类的典型用法代码示例。如果您正苦于以下问题:Java TextLocation类的具体用法?Java TextLocation怎么用?Java TextLocation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextLocation类属于com.google.gwt.user.cellview.client.SimplePager包,在下文中一共展示了TextLocation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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%");
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}