当前位置: 首页>>代码示例>>Java>>正文


Java FlexTable.FlexCellFormatter方法代码示例

本文整理汇总了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;
  }
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:19,代码来源:Table.java

示例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);
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:12,代码来源:Table.java

示例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);
  }
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:11,代码来源:Table.java

示例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);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:14,代码来源:DownloadGroupPanel.java

示例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);
    }
 
开发者ID:lsst,项目名称:firefly,代码行数:50,代码来源:DownloadGroupPanel.java

示例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);
    }
 
开发者ID:lsst,项目名称:firefly,代码行数:60,代码来源:MiniPlotWidget.java


注:本文中的com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。