本文整理汇总了Java中com.google.gwt.user.client.ui.FlexTable.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java FlexTable.setStyleName方法的具体用法?Java FlexTable.setStyleName怎么用?Java FlexTable.setStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.FlexTable
的用法示例。
在下文中一共展示了FlexTable.setStyleName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTableWithStyles
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable createTableWithStyles(Element element) {
table = new FlexTable();
table.setStyleName(styleNames.QP_REPORT_TABLE());
String cls = element.getAttribute(CLASS);
if (cls != null) {
table.addStyleName(cls);
}
return table;
}
示例2: addDataTableColumnTitles
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
/**
* This method is called when it is time to fill in the column titles of the data table
* @param dataTable the data table to add columns to
*/
protected void addDataTableColumnTitles(FlexTable dataTable) {
//Fill the table headings
int column = 0;
dataTable.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_STYLE_NAME );
//Add the entry index column title
Label roomNumberLabel = new Label(titlesI18N.indexColumnTitle());
roomNumberLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
dataTable.setWidget(0, column++, roomNumberLabel );
//Add the select data entries column to the data table
if( doNeedSelectColumn ) {
addSelectorColumnTitleToDataTable(0, column++);
}
//Add the gender column title
Label genderLabel = new Label(titlesI18N.genderColumnTitle());
genderLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
dataTable.setWidget(0, column++, genderLabel );
//Add the online/offline status column title
Label statusLabel = new Label( titlesI18N.statusColumnTitle() );
statusLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
dataTable.setWidget(0, column++, statusLabel );
//Add the last online date column title
Label lastOnlineLabel = new Label( titlesI18N.lastOnlineFieldTitle() );
lastOnlineLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
dataTable.setWidget(0, column++, lastOnlineLabel );
//Add the user login name column title
Label userLoginLabel = new Label(titlesI18N.userLoginColumnTitle());
userLoginLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
dataTable.setWidget(0, column++, userLoginLabel );
}
示例3: newPreferencesTable
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable newPreferencesTable() {
FlexTable table = new FlexTable();
table.setStyleName("mf-growsTable");
table.removeAllRows();
return table;
}
示例4: initModule
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
@Override
public void initModule(Element element) {
FlexTable table = new FlexTable();
table.setStyleName(styleNames.QP_TABLE_TABLE());
Map<String, String> styles = styleSocket.getStyles(element);
if (styles.containsKey(EMPIRIA_TABLE_CELLPADDING)) {
int padding = NumberUtils.tryParseInt(styles.get(EMPIRIA_TABLE_CELLPADDING), -1);
if (padding != -1) {
table.setCellPadding(padding);
}
}
if (styles.containsKey(EMPIRIA_TABLE_CELLSPACING)) {
int spacing = NumberUtils.tryParseInt(styles.get(EMPIRIA_TABLE_CELLSPACING), -1);
if (spacing != -1) {
table.setCellSpacing(spacing);
}
}
NodeList trNodes = element.getElementsByTagName("tr");
for (int r = 0; r < trNodes.getLength(); r++) {
NodeList tdNodes = ((Element) trNodes.item(r)).getElementsByTagName("td");
for (int d = 0; d < tdNodes.getLength(); d++) {
Panel dPanel = new FlowPanel();
dPanel.setStyleName(styleNames.QP_TABLE_CELL());
getBodyGenerator().generateBody(tdNodes.item(d), dPanel);
table.setWidget(r, d, dPanel);
int colspan = 1;
if (tdNodes.item(d).getNodeType() == Node.ELEMENT_NODE && ((Element) tdNodes.item(d)).hasAttribute("colspan")) {
colspan = NumberUtils.tryParseInt(((Element) tdNodes.item(d)).getAttribute("colspan"), 1);
}
if (colspan > 1) {
table.getFlexCellFormatter().setColSpan(r, d, colspan);
}
int rowspan = 1;
if (tdNodes.item(d).getNodeType() == Node.ELEMENT_NODE && ((Element) tdNodes.item(d)).hasAttribute("rowspan")) {
rowspan = NumberUtils.tryParseInt(((Element) tdNodes.item(d)).getAttribute("rowspan"), 1);
}
if (rowspan > 1) {
table.getFlexCellFormatter().setRowSpan(r, d, rowspan);
}
}
}
tablePanel.add(table);
}
示例5: InfoPanelImpl
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public InfoPanelImpl() {
super("cell");
iText = new P("text");
add(iText);
iHint = new ClickableHint(""); iHint.setStyleName("hint");
add(iHint);
iUpdateInfo = new Callback() {
@Override
public void execute(Callback callback) {
if (callback != null) callback.execute(null);
}
};
iInfo = new FlexTable();
iInfo.setStyleName("unitime-InfoTable");
// iUpdateInfo = updateInfo;
iInfoPanel = new PopupPanel();
iInfoPanel.setWidget(iInfo);
iInfoPanel.setStyleName("unitime-PopupHint");
sinkEvents(Event.ONMOUSEOVER);
sinkEvents(Event.ONMOUSEOUT);
sinkEvents(Event.ONMOUSEMOVE);
iShowInfo = new Timer() {
@Override
public void run() {
if (iInfo.getRowCount() == 0) return;
iUpdateInfo.execute(new Callback() {
public void execute(Callback callback) {
iInfoPanel.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
@Override
public void setPosition(int offsetWidth, int offsetHeight) {
int maxX = Window.getScrollLeft() + Window.getClientWidth() - offsetWidth - 10;
iInfoPanel.setPopupPosition(Math.min(iX, maxX), iY);
}
});
if (callback != null) callback.execute(null);
}
});
}
};
iHideInfo = new Timer() {
@Override
public void run() {
iInfoPanel.hide();
}
};
iDefaultClickHandler = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (iUrl != null && !iUrl.isEmpty())
ToolBox.open(GWT.getHostPageBaseURL() + iUrl);
}
};
iTextClick = iHint.addClickHandler(iDefaultClickHandler);
iHintClick = iText.addClickHandler(iDefaultClickHandler);
iHint.setTabIndex(-1);
}
示例6: newScheduleTable
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable newScheduleTable() {
FlexTable table = new FlexTable();
table.setStyleName("s2-scheduleTable");
table.removeAllRows();
return table;
}
示例7: newShiftsTable
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable newShiftsTable() {
FlexTable table = new FlexTable();
table.setStyleName("s2-solutionTable");
table.removeAllRows();
return table;
}