本文整理汇总了Java中com.google.gwt.user.client.ui.FlexTable.setWidget方法的典型用法代码示例。如果您正苦于以下问题:Java FlexTable.setWidget方法的具体用法?Java FlexTable.setWidget怎么用?Java FlexTable.setWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.FlexTable
的用法示例。
在下文中一共展示了FlexTable.setWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setCell
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public void setCell(int col, Cell cell) {
iCells[col] = cell;
if (iTable != null) {
FlexTable t = iTable.iTable;
cell.setColIdx(col);
cell.setRow(this);
if (cell.getWidget() == null)
t.setHTML(getRowIdx() + iTable.getHeaderRowsCount(), col, (cell.getValue() == null || cell.getValue().isEmpty() ? " " : cell.getValue()));
else
t.setWidget(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getWidget());
t.getFlexCellFormatter().setWordWrap(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getWordWrap());
t.getFlexCellFormatter().setColSpan(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getColSpan());
t.getFlexCellFormatter().setStyleName(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getStyleName());
t.getFlexCellFormatter().setWidth(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getWidth());
t.getFlexCellFormatter().setVerticalAlignment(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getVerticalAlignment());
t.getFlexCellFormatter().setHorizontalAlignment(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getHorizontalAlignment());
t.getFlexCellFormatter().getElement(getRowIdx() + iTable.getHeaderRowsCount(), col).setTitle(cell.getTitle());
}
}
示例2: ComparisonAxisSelector
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public ComparisonAxisSelector(String width) {
// The the other widgets have flextable layouts. Without it, this one doesn't line up.
layout = new FlexTable();
axes = new ListBox();
flex = new FlexTable();
// It looks funny without some sort of label on the same line.
HTML html = new HTML("Axis: ");
flex.setWidget(0, 0, html);
flex.setWidget(0, 1, axes);
disPanel = new DisclosurePanel("Compare");
disPanel.add(flex);
disPanel.setOpen(true);
// if ( width != null && !width.equals("") ) {
// disPanel.setWidth(width);
// }
layout.setWidget(0, 0, disPanel);
initWidget(layout);
}
示例3: DropDown
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public DropDown() {
current = new FlexTable();
current.addStyleName("datatable");
itemlist = new FlexTable();
dropdown = new PopupPanel(true);
scroller = new ScrollPanel();
scroller.add(itemlist);
dropdown.add(scroller);
down =new HTML(" ▼");
down.addStyleName("current-item");
initWidget(current);
HTML load = new HTML("loading...");
load.addStyleName("current-item");
current.setWidget(0, 0, load);
current.setWidget(0, 1, down);
current.addClickHandler(show);
}
示例4: ConfirmDeleteTablesAdminPopup
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public ConfirmDeleteTablesAdminPopup(String uriUser) {
super();
this.uriUser = uriUser;
AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT,
HELP_BALLOON_TXT);
deleteButton.addClickHandler(new ExecuteDelete());
FlexTable layout = new FlexTable();
HTML message = new HTML("Delete the ODK Tables user?");
layout.setWidget(0, 0, message);
layout.setWidget(0, 1, deleteButton);
layout.setWidget(0, 2, new ClosePopupButton(this));
setWidget(layout);
}
示例5: ConfirmPurgeUpToDatePopup
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public ConfirmPurgeUpToDatePopup(FormSummary summary, Date earliest) {
super();
this.summary = summary;
this.earliest = earliest;
AggregateButton confirm = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
confirm.addClickHandler(new PurgeHandler());
FlexTable layout = new FlexTable();
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Delete submissions data of ");
stringBuilder.append(summary.getTitle());
stringBuilder.append(" [");
stringBuilder.append(summary.getId());
stringBuilder.append("] up through ");
stringBuilder.append(earliest.toGMTString());
stringBuilder.append(". Incomplete submissions will not be deleted.");
layout.setWidget(0, 0, new HTML(stringBuilder.toString()));
layout.setWidget(0, 1, confirm);
layout.setWidget(0, 2, new ClosePopupButton(this));
setWidget(layout);
}
示例6: addHeaderColumns
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private void addHeaderColumns(final List<Column> columnList, final FlexTable flexTable) {
tableNameVsCheckBoxMap.get(selectedDataTableName).clear();
int columnNumber = 0;
for (Column headerColumn : columnList) {
HorizontalPanel headerRowPanel = new HorizontalPanel();
Label headerText = new Label(headerColumn.getName());
headerRowPanel.add(headerText);
headerRowPanel.setWidth("80px");
CheckBox validationCheckBox = new CheckBox();
validationCheckBox.setVisible(Boolean.FALSE);
headerRowPanel.add(validationCheckBox);
headerRowPanel.setCellVerticalAlignment(validationCheckBox, HasVerticalAlignment.ALIGN_MIDDLE);
tableNameVsCheckBoxMap.get(selectedDataTableName).add(validationCheckBox);
flexTable.setWidget(0, columnNumber, headerRowPanel);
flexTable.getCellFormatter().addStyleName(0, columnNumber, "wordWrap");
columnNumber++;
}
}
示例7: OdkTablesManageAppLevelFilesSubTab
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
/**
* Sets up the View Table subtab.
*/
public OdkTablesManageAppLevelFilesSubTab(OdkTablesTabUI parent) {
this.parent = parent;
addFileButton = new ServletPopupButton(ADD_FILE_BUTTON_TXT, ADD_FILE_TXT,
UIConsts.APP_LEVEL_FILE_UPLOAD_SERVLET_ADDR, this, ADD_FILE_TOOLTIP_TXT, ADD_FILE_BALLOON_TXT);
setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);
tableFileData = new OdkTablesViewAppLevelFileInfo(this);
selectTablePanel = new FlexTable();
selectTablePanel.getElement().setId("app_level_panel");
selectTablePanel.setHTML(0, 0, "<h2> Application Level Files </h2>");
if ( AggregateUI.getUI().getUserInfo().getGrantedAuthorities().contains(GrantedAuthorityName.ROLE_ADMINISTER_TABLES)) {
selectTablePanel.setWidget(1, 0, addFileButton);
}
topPanel = new HorizontalPanel();
topPanel.add(selectTablePanel);
topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_JUSTIFY);
add(topPanel);
add(tableFileData);
}
示例8: updateFilterHeader
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private void updateFilterHeader(FilterGroup group) {
copyButton.setEnabled(false);
removeButton.setEnabled(false);
if (group.getName() != null) {
if (!group.getName().equals(UIConsts.FILTER_NONE)) {
copyButton.setEnabled(true);
removeButton.setEnabled(true);
}
}
// create the filter group information
String filterName = group.getName();
if (filterName.equals(UIConsts.FILTER_NONE)) {
filterName = "";
}
FlexTable filterGroupHeader = new FlexTable();
filterGroupHeader.setWidget(0, 0, new Label(filterName));
filterGroupHeader.setWidget(0, 1, addFilter);
filterHeader.add(filterGroupHeader);
filterHeader.add(new MetadataCheckBox(group, parentSubTab));
}
示例9: OdkTablesConfirmDeleteInstanceFilePopup
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public OdkTablesConfirmDeleteInstanceFilePopup(AggregateSubTabBase basePanel, String tableId, String instanceId, String filePath) {
super();
this.basePanel = basePanel;
this.tableId = tableId;
this.instanceId = instanceId;
this.filePath = filePath;
AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
deleteButton.addClickHandler(new ExecuteDelete());
FlexTable layout = new FlexTable();
HTML message = new HTML("Are you sure you want to delete this file?");
layout.setWidget(0, 0, message);
layout.setWidget(0, 1, deleteButton);
layout.setWidget(0, 2, new ClosePopupButton(this));
setWidget(layout);
}
示例10: NewTablesAdminPopup
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public NewTablesAdminPopup() {
super();
users = new UserListBox();
AggregateButton addButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
addButton.addClickHandler(new CreateUser());
FlexTable layout = new FlexTable();
layout.setWidget(0, 0, new ClosePopupButton(this));
layout.setWidget(0, 1, new HTML(LABEL_TXT));
layout.setWidget(1, 0, new HTML("Users:"));
layout.setWidget(1, 1, users);
layout.setWidget(3, 1, addButton);
SecureGWT.getSecurityAdminService().getAllUsers(true, new ODKTablesAdminPopupCallback());
setWidget(layout);
}
示例11: OdkTablesConfirmDeleteAppLevelFilePopup
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public OdkTablesConfirmDeleteAppLevelFilePopup(AggregateSubTabBase basePanel, String odkClientApiVersion, String filePath) {
super();
this.basePanel = basePanel;
this.odkClientApiVersion = odkClientApiVersion;
this.filePath = filePath;
AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
deleteButton.addClickHandler(new ExecuteDelete());
FlexTable layout = new FlexTable();
HTML message = new HTML("Are you sure you want to delete this file?");
layout.setWidget(0, 0, message);
layout.setWidget(0, 1, deleteButton);
layout.setWidget(0, 2, new ClosePopupButton(this));
setWidget(layout);
}
示例12: OdkTablesConfirmDeleteRowPopup
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public OdkTablesConfirmDeleteRowPopup(OdkTablesViewTable parent,
String tableId, String rowId, String rowETag) {
super();
this.parentView = parent;
this.tableId = tableId;
this.rowId = rowId;
this.rowETag = rowETag;
AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT,
HELP_BALLOON_TXT);
deleteButton.addClickHandler(new ExecuteDelete());
FlexTable layout = new FlexTable();
HTML message = new HTML("Are you sure you want to delete this row?");
layout.setWidget(0, 0, message);
layout.setWidget(0, 1, deleteButton);
layout.setWidget(0, 2, new ClosePopupButton(this));
setWidget(layout);
}
示例13: SettingsWidget
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public SettingsWidget(String title, String panelID, String operationID, String optionID) {
this.operationID = operationID;
this.optionID = optionID;
closeButton = new PushButton("Close");
closeButton.addStyleDependentName("SMALLER");
closeButton.setTitle("Close settings panel for "+panelID);
closeButton.addClickListener(closeClick);
buttonBar = new HorizontalPanel();
buttonBar.add(closeButton);
datasetButton = new DatasetButton();
optionsButton = new OptionsButton(optionID, 300);
datasetButton.setOffset(0);
operations = new OperationsWidget(title);
operations.addClickHandler(operationsClickHandler);
settingsButton = new PushButton (title);
settingsButton.addStyleDependentName("SMALLER");
settingsButton.addClickListener(settingsButtonClick);
settingsPopup = new PopupPanel(false);
buttonBar.add(datasetButton);
buttonBar.add(optionsButton);
settingsLayout = new FlexTable();
settingsLayout.setWidget(0, 0, buttonBar);
settingsLayout.setWidget(1, 0, operations);
settingsPopup.add(settingsLayout);
settingsButton.setWidth("65px");
initWidget(settingsButton);
}
示例14: SearchMetadata
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
/**
* SearchMetadata
*/
public SearchMetadata(HasPropertyHandler propertyHandler) {
formManager = new FormManager(propertyHandler);
table = new FlexTable();
scrollPanel = new ScrollPanel(table);
// Table padding and spacing properties
formManager.getTable().setCellPadding(2);
formManager.getTable().setCellSpacing(2);
groupPopup = new GroupPopup();
groupPopup.setWidth("300px");
groupPopup.setHeight("125px");
groupPopup.setStyleName("okm-Popup");
groupPopup.addStyleName("okm-DisableSelect");
addGroup = new Button(Main.i18n("search.add.property.group"), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
groupPopup.show(UIDockPanelConstants.SEARCH);
}
});
table.setWidget(0, 0, addGroup);
table.setWidget(1, 0, formManager.getTable());
addGroup.setStyleName("okm-AddButton");
addGroup.addStyleName("okm-NoWrap");
initWidget(scrollPanel);
}
示例15: OdkTablesAdminSubTab
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public OdkTablesAdminSubTab() {
// vertical
setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);
nav = new FlexTable();
nav.setWidget(0, 0, new AddTablesAdminButton());
add(nav);
listOfAdmins = new OdkAdminListTable();
add(listOfAdmins);
}