本文整理汇总了Java中com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter方法的典型用法代码示例。如果您正苦于以下问题:Java FlexTable.FlexCellFormatter方法的具体用法?Java FlexTable.FlexCellFormatter怎么用?Java FlexTable.FlexCellFormatter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.FlexTable
的用法示例。
在下文中一共展示了FlexTable.FlexCellFormatter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setColumnSortStyle
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public void setColumnSortStyle(int col, int dir) {
int row = 0;
FlexTable.FlexCellFormatter formatter = _table.getFlexCellFormatter();
switch(dir) {
case Column.Sort.ASCENDING:
formatter.removeStyleName(row, col, STYLE_DESCENDING);
formatter.addStyleName(row, col, STYLE_ASCENDING);
break;
case Column.Sort.DESCENDING:
formatter.removeStyleName(row, col, STYLE_ASCENDING);
formatter.addStyleName(row, col, STYLE_DESCENDING);
break;
default:
formatter.removeStyleName(row, col, STYLE_ASCENDING);
formatter.removeStyleName(row, col, STYLE_DESCENDING);
break;
}
}
示例2: renderEmpty
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
protected void renderEmpty(String message, String style) {
int r = 1;
while(_table.getRowCount() > 1) _table.removeRow(1);
_table.setWidget(r, 0, new Label(message));
FlexTable.FlexCellFormatter formatter = (FlexTable.FlexCellFormatter)_table.getCellFormatter();
formatter.setColSpan(r, 0, _layout.getVisibleColumnCount());
formatter.setRowSpan(r, 0, _size);
formatter.setStylePrimaryName(r, 0, style);
_table.getRowFormatter().setStyleName(r, STYLE_ROW);
_table.getRowFormatter().addStyleName(r, STYLE_ROW_EMPTY);
}
示例3: resetEmpty
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
protected void resetEmpty() {
int r = 1;
FlexTable.FlexCellFormatter formatter = (FlexTable.FlexCellFormatter)_table.getCellFormatter();
if(_table.getRowCount() > 1) {
formatter.removeStyleName(r, 0, STYLE_NO_DATA);
formatter.removeStyleName(r, 0, STYLE_ERROR);
formatter.setColSpan(r, 0, 1);
formatter.setRowSpan(r, 0, 1);
}
}
示例4: updateItemTitle
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private void updateItemTitle() {
HTML titleHTML= new HTML(_title);
titleHTML.addStyleName("group-title");
FlexTable.FlexCellFormatter formatter= _content.getFlexCellFormatter();
_content.setWidget(0, TITLE_POS,titleHTML);
String width;
if (_title.length()< 20) width= "200px";
else if (_title.length()< 20) width= "250px";
else if (_title.length()< 25) width= "300px";
else width= "350px";
formatter.setWidth(0, TITLE_POS, width);
}
示例5: layoutDetails
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private void layoutDetails() {
_content.clear();
_content.addStyleName("download-group-header");
updateItemTitle();
_content.setWidget(0, SUBTITLE_POS,_workingIcon);
_content.setWidget(0, ABORT_BUTTON_POS, _abortButton);
_content.setWidget(0, WORKING_ICON_POS, _workingIcon);
FlexTable.FlexCellFormatter formatter= _content.getFlexCellFormatter();
formatter.setWidth(0, ABORT_BUTTON_POS, "35px");
formatter.setWidth(0, WORKING_ICON_POS, "20px");
BackgroundStatus bgStat= _monItem.getStatus();
int partCnt= getPartCount(_monItem);
if (_monItem.getState()==BackgroundState.STARTING ||
(partCnt==0 && !bgStat.isDone()) ) {
Widget w= createWorkingWidget(STATUS_STARTING_TXT);
_content.setWidget(0,STATUS_POS,w);
}
else {
TablePos tpos;
for(int i= 0; (i<partCnt); i++) {
_detailUI[i]= new DetailUIInfo();
tpos= getStatusPosCol(_monItem,i);
_content.setWidget(tpos.getRow(), tpos.getCol(), makeDetailStateWidget(i));
formatter.setWidth(tpos.getRow(), tpos.getCol(), "250px");
if (tpos.getCol()==STATUS_ALT_POS) {
formatter.setHorizontalAlignment(tpos.getRow(), tpos.getCol(), HasHorizontalAlignment.ALIGN_RIGHT);
}
formatter.setWidth(i, ABORT_BUTTON_POS, "35px");
}
}
_warningsButton= GwtUtil.makeLinkButton(_prop.makeBase("warnings"),
new ClickHandler() {
public void onClick(ClickEvent ev) {
showWarnings((Widget)ev.getSource());
}
});
_content.setWidget(partCnt,WARNINGS_POS,_warningsButton);
// formatter.setColSpan(partCnt,WARNINGS_POS,3 );
formatter.setHorizontalAlignment(partCnt,WARNINGS_POS, HasHorizontalAlignment.ALIGN_RIGHT);
_warningsButton.setVisible(false);
}
示例6: layout
import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private void layout() {
Map<String, GeneralCommand> privateCommandMap = new HashMap<String, GeneralCommand>(7);
AllPlots.loadPrivateVisCommands(privateCommandMap, MiniPlotWidget.this);
MenuGeneratorV2 privateMenugen= MenuGeneratorV2.create(privateCommandMap,null);
_flipFrame= new HTML();
GwtUtil.setStyles(_flipFrame, "borderColor", "transparent",
"background", "transparent",
"padding", "0 0 12px 25px",
"color", "#49a344");
selectionMbar= privateMenugen.makeMenuToolBarFromProp("VisSelectionMenuBar", false);
Widget flipMbar= privateMenugen.makeMenuToolBarFromProp("VisFlipMenuBar", false);
_plotPanel= new PlotLayoutPanel(this,_plotWidgetFactory);
GwtUtil.setStyles(selectionMbar, "background", "none",
"border", "none");
GwtUtil.setStyles(flipMbar, "background", "none",
"border", "none");
_topPanel.addNorth(_selectionMbarDisplay, TOOLBAR_SIZE);
_topPanel.addNorth(_flipMbarDisplay, TOOLBAR_SIZE);
_topPanel.add(_plotPanel);
hideSelectionBar();
setFlipBarVisible(false);
// HTML oLabel= new HTML("<i>Options: </i>");
// _selectionMbarDisplay.setWidget(0,0,oLabel);
// _selectionMbarDisplay.setWidget(0,1,selectionMbar);
// _selectionMbarDisplay.setWidget(0,2, areaSelectAdditionActionBar);
HTML iLabel= new HTML("<i>Change Image: </i>");
_flipMbarDisplay.setWidget(0, 0, iLabel);
GwtUtil.setStyle(iLabel, "padding", "0 0 6px 3px");
_flipMbarDisplay.setWidget(0,1,flipMbar);
_flipMbarDisplay.setWidget(0,2,_flipFrame);
// FlexTable.FlexCellFormatter fm= _selectionMbarDisplay.getFlexCellFormatter();
// fm.setColSpan(0,1,5);
// fm.setColSpan(0,0,1);
FlexTable.FlexCellFormatter fm2= _flipMbarDisplay.getFlexCellFormatter();
fm2.setColSpan(0,1,5);
fm2.setColSpan(0,0,1);
new PlotMover(_plotView);
}