• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TableCellElement类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.gwt.dom.client.TableCellElement的典型用法代码示例。如果您正苦于以下问题:Java TableCellElement类的具体用法?Java TableCellElement怎么用?Java TableCellElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TableCellElement类属于com.google.gwt.dom.client包,在下文中一共展示了TableCellElement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addGroupCell

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
protected void addGroupCell(String text) {
    // String only content is optimized by not using Label widget
    Element tdElement = DOM.createTD();
    final TableCellElement td = tdElement.cast();
    initCellWithText(text, ALIGN_LEFT, "", false, true, null, td);

    // Enchance DOM for table cell
    Element container = (Element) td.getChild(0);
    String containerInnerHTML = container.getInnerHTML();

    container.setInnerHTML("");

    expander = DOM.createDiv();
    expander.setInnerHTML(" ");

    expander.setClassName(CLASSNAME + "-group-cell-expander");
    DOM.appendChild(container, expander);

    Element contentDiv = DOM.createDiv();
    contentDiv.setInnerHTML(containerInnerHTML);

    contentDiv.setClassName(CLASSNAME + "-float");
    DOM.appendChild(container, contentDiv);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:25,代码来源:CubaGroupTableWidget.java


示例2: initCellWithText

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
protected void initCellWithText(String text, char align, String style, boolean textIsHTML,
                                boolean sorted, String description, TableCellElement td) {
    super.initCellWithText(text, align, style, textIsHTML, sorted, description, td);

    Element tdElement = td.cast();
    Tools.textSelectionEnable(tdElement, _delegate.textSelectionEnabled);

    if (_delegate.clickableColumns != null && _delegate.clickableColumns.contains(currentColumnKey)) {
        Element wrapperElement = tdElement.getFirstChildElement();
        final Element clickableSpan = DOM.createSpan().cast();
        clickableSpan.setClassName(CUBA_TABLE_CLICKABLE_CELL_STYLE);

        clickableSpan.setInnerText(wrapperElement.getInnerText());

        wrapperElement.removeAllChildren();
        DOM.appendChild(wrapperElement, clickableSpan);
    }

    if (_delegate.multiLineCells) {
        Style wrapperStyle = tdElement.getFirstChildElement().getStyle();
        wrapperStyle.setWhiteSpace(Style.WhiteSpace.PRE_LINE);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:25,代码来源:CubaTreeTableWidget.java


示例3: initCellWithText

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
protected void initCellWithText(String text, char align, String style, boolean textIsHTML,
                                boolean sorted, String description, TableCellElement td) {
    super.initCellWithText(text, align, style, textIsHTML, sorted, description, td);

    final Element tdElement = td.cast();
    Tools.textSelectionEnable(tdElement, _delegate.textSelectionEnabled);

    if (_delegate.clickableColumns != null && _delegate.clickableColumns.contains(currentColumnKey)) {
        Element wrapperElement = tdElement.getFirstChildElement();
        final Element clickableSpan = DOM.createSpan().cast();
        clickableSpan.setClassName(CUBA_TABLE_CLICKABLE_CELL_STYLE);

        clickableSpan.setInnerText(wrapperElement.getInnerText());

        wrapperElement.removeAllChildren();
        DOM.appendChild(wrapperElement, clickableSpan);
    }

    if (_delegate.multiLineCells) {
        Style wrapperStyle = tdElement.getFirstChildElement().getStyle();
        wrapperStyle.setWhiteSpace(Style.WhiteSpace.PRE_LINE);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:25,代码来源:CubaScrollTableWidget.java


示例4: populateDialog

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
/**
 * Fills the main grid data
 */
protected void populateDialog(){
	
	addNewGrid( 1, false, "", false);
       
       //Set the login label
       final TableCellElement loginLabelCell = (TableCellElement) Document.get().getElementById(LOGIN_LABEL_CELL_ID);
       Label loginField = InterfaceUtils.getNewFieldLabel( titlesI18N.loginNameField(), true );
       loginLabelCell.setInnerHTML( loginField.toString() );

       //Set the password label
       final TableCellElement passwordLabelCell = (TableCellElement) Document.get().getElementById(PASSWORD_LABEL_CELL_ID);
       Label passwordField = InterfaceUtils.getNewFieldLabel( titlesI18N.passwordField(), true );
       passwordLabelCell.setInnerHTML( passwordField.toString() );
       
       //Set the progress bar element
       final TableCellElement progressBarCell = (TableCellElement) Document.get().getElementById(PROGRESS_BAR_CELL_ID);
       progressBarCell.appendChild( progressBarUI.getElement() );
       
	addToGrid( FIRST_COLUMN_INDEX, form, false, false );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:24,代码来源:UserLoginDialogUI.java


示例5: focusFirstEditableElementFromFirstElementOfRow

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
public static void focusFirstEditableElementFromFirstElementOfRow(Grid grid, int rowIndex,
		GridFocusHandler gridFocusHandler, boolean shiftKeyDown) {
	NavigationUtil.focusCell(grid, rowIndex, 0, gridFocusHandler);
	TableCellElement element = NavigationUtil.getFocusedCell(grid)
		.getElement();

	if (element == null) {
		return;
	}

	if (hasInputElement(element, shiftKeyDown)) {
		return;
	}

	int counter = getNextInputElementCounter(element, shiftKeyDown);

	if (counter > 0) {
		NavigationUtil.focusCell(grid, rowIndex, counter, gridFocusHandler);
	} else if (counter == -1) {
		focusFirstEditableElementFromFirstElementOfRow(grid, rowIndex + 1, gridFocusHandler, shiftKeyDown);
	}
}
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:23,代码来源:NavigationUtil.java


示例6: focusLastEditableElementFromFirstElementOfRow

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
public static void focusLastEditableElementFromFirstElementOfRow(Grid grid, int rowIndex,
		GridFocusHandler gridFocusHandler, boolean shiftKeyDown) {
	gridFocusHandler.setShiftKeyDown(true);

	NavigationUtil.focusCell(grid, rowIndex, grid.getColumnCount() - 1, gridFocusHandler);
	TableCellElement element = NavigationUtil.getFocusedCell(grid)
		.getElement();

	if (element == null) {
		return;
	}

	if (hasInputElement(element, shiftKeyDown)) {
		return;
	}

	int counter = getPreviousInputElementCounter(element, shiftKeyDown);

	if (counter > 0) {
		NavigationUtil.focusCell(grid, rowIndex, (grid.getColumnCount() - 1) - counter, gridFocusHandler);
	} else if (counter == -1) {
		focusLastEditableElementFromFirstElementOfRow(grid, rowIndex - 1, gridFocusHandler, shiftKeyDown);
	}

}
 
开发者ID:vaadin,项目名称:grid-renderers-collection-addon,代码行数:26,代码来源:NavigationUtil.java


示例7: getViewCell

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
public TableCellElement getViewCell(int aRow, int aCol) {
	GridSection<T> targetSection;
	if (aRow < frozenRows) {
		if (aCol < frozenColumns) {
			targetSection = frozenLeft;
		} else {
			aCol -= frozenColumns;
			targetSection = frozenRight;
		}
	} else {
		aRow -= frozenRows;
		if (aCol < frozenColumns) {
			targetSection = scrollableLeft;
		} else {
			aCol -= frozenColumns;
			targetSection = scrollableRight;
		}
	}
	return targetSection.getCell(aRow, aCol);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:21,代码来源:Grid.java


示例8: resetFocusOnCell

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
protected boolean resetFocusOnCell() {
    boolean focused = false;
    if (hasFilterHeaders() && filterFocusedCellColumn > -1 && filterFocusedCellRow > -1) {
        TableSectionElement thead = getTableHeadElement();
        NodeList<TableRowElement> rows = thead.getRows();
        if (filterFocusedCellRow < rows.getLength()) {
            TableRowElement row = rows.getItem(filterFocusedCellRow);
            NodeList<TableCellElement> cells = row.getCells();
            if (filterFocusedCellColumn < cells.getLength()) {
                TableCellElement cell = cells.getItem(filterFocusedCellColumn);
                if (getHeaderBuilder().isHeader(cell)) {
                    Header<?> header = getHeaderBuilder().getHeader(cell);
                    Context context = new Context(0, 0, header.getKey());
                    focused = resetFocusOnFilterCellImpl(context, header, cell);
                }
            }
        }
    }
    if (!focused) {
        focused = super.resetFocusOnCell();
    }
    return focused;
}
 
开发者ID:kaaproject,项目名称:avro-ui,代码行数:25,代码来源:AvroUiDataGrid.java


示例9: ensureEnoughCells

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
private void ensureEnoughCells( int nb )
{
	if( cells.size() >= nb )
		return;

	for( int i = cells.size(); i < nb; i++ )
	{
		if( tr.getChildCount() < i + 1 )
		{
			TableCellElement td = Document.get().createTDElement();
			tr.appendChild( td );
		}

		CellImpl cell = i == 0 ? new TreeCellImpl() : new CellImpl();
		cells.add( cell );
	}
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:18,代码来源:DataTable.java


示例10: ensureTdOk

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
private void ensureTdOk()
{
	TableCellElement td = getTd();
	if( td == null )
		return;
	
	int count = td.getChildCount();
	
	if( count <= 0 )
	{
		SpanElement treeView = Document.get().createSpanElement();
		td.appendChild( treeView );
		
		DOM.sinkEvents( treeView, Event.ONCLICK );
		DOM.setEventListener( treeView, this );
	}
	
	if( count <= 1 )
	{
		SpanElement content = Document.get().createSpanElement();
		td.appendChild( content );
	}
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:24,代码来源:DataTable.java


示例11: setWidget

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
public void setWidget( Widget widget )
{
	clearCellWidget();

	TableCellElement td = getTd();
	if( td != null )
	{
		td.setInnerText( "" );

		childWidget = widget;
		if( childWidget != null )
		{
			customPanel.addIn( td, childWidget );
		}
	}
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:18,代码来源:DataTable.java


示例12: TDSelecter

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
TDSelecter() {
	super(TableCellElement.TAG_TD);
	if (TableSelecter.this.singleSelection) {
		this.inputElem = InputElement.as(DOM.createInputRadio(TableSelecter.this.groupId));
	} else {
		this.inputElem = InputElement.as(DOM.createInputCheck());
	}
	this.getElement().appendChild(this.inputElem);
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:10,代码来源:TableSelecter.java


示例13: getResizerInformation

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
protected ResizerInformation getResizerInformation( int mx ) {
    boolean isPrimed = false;
    ResizerInformation resizerInfo = new ResizerInformation();
    for ( int iCol = 0; iCol < widget.headerRows[ 0 ].getChildCount(); iCol++ ) {
        TableCellElement tce = widget.headerRows[ 0 ].getChild( iCol ).<TableCellElement>cast();
        int cx = tce.getAbsoluteRight();
        if ( Math.abs( mx - cx ) <= 5 ) {
            isPrimed = true;
            resizerInfo.setResizePrimed( isPrimed );
            resizerInfo.setResizeColumn( widget.headerColumns.get( iCol ) );
            resizerInfo.setResizeColumnLeft( tce.getAbsoluteLeft() );
            break;
        }
    }
    if ( isPrimed ) {
        setCursorType( Cursor.COL_RESIZE );
    } else {
        setCursorType( Cursor.DEFAULT );
    }

    return resizerInfo;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:24,代码来源:TemplateDataHeaderWidget.java


示例14: populateTableRowElement

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
private TableRowElement populateTableRowElement( TableRowElement tre,
                                                 DynamicDataRow rowData ) {

    tre.getStyle().setHeight( resources.rowHeight(),
                              Unit.PX );
    for ( int iCol = 0; iCol < columns.size(); iCol++ ) {
        DynamicColumn<T> column = columns.get( iCol );
        if ( column.isVisible() ) {
            TableCellElement tce = makeTableCellElement( iCol,
                                                         rowData );
            if ( tce != null ) {
                tre.appendChild( tce );
            }
        }
    }

    return tre;

}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:20,代码来源:AbstractVerticalMergableGridWidget.java


示例15: hideColumn

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
void hideColumn( int index ) {
    if ( index < 0 ) {
        throw new IllegalArgumentException( "index cannot be less than zero" );
    }
    if ( index > columns.size() ) {
        throw new IllegalArgumentException( "index cannot be greater than the number of rows" );
    }

    for ( int iRow = 0; iRow < data.size(); iRow++ ) {
        DynamicDataRow rowData = data.get( iRow );
        CellValue<? extends Comparable<?>> cell = rowData.get( index );

        if ( cell.getRowSpan() > 0 ) {
            Coordinate hc = cell.getHtmlCoordinate();
            TableRowElement tre = tbody.getRows().getItem( hc.getRow() );
            TableCellElement tce = tre.getCells().getItem( hc.getCol() );
            tre.removeChild( tce );
        }
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:22,代码来源:AbstractVerticalMergableGridWidget.java


示例16: selectCell

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
void selectCell( CellValue<? extends Comparable<?>> cell ) {
    if ( cell == null ) {
        throw new IllegalArgumentException( "cell cannot be null" );
    }

    Coordinate hc = cell.getHtmlCoordinate();
    TableRowElement tre = tbody.getRows().getItem( hc.getRow() )
            .<TableRowElement>cast();
    TableCellElement tce = tre.getCells().getItem( hc.getCol() )
            .<TableCellElement>cast();

    //Cell selected style takes precedence
    String cellSelectedStyle = resources.cellTableCellSelected();
    String cellOtherwiseStyle = resources.cellTableCellOtherwise();
    String cellMultipleValuesStyle = resources.cellTableCellMultipleValues();

    tce.removeClassName( cellMultipleValuesStyle );
    tce.removeClassName( cellOtherwiseStyle );
    tce.addClassName( cellSelectedStyle );
    tce.focus();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:23,代码来源:AbstractVerticalMergableGridWidget.java


示例17: showColumn

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Override
void showColumn( int index ) {
    if ( index < 0 ) {
        throw new IllegalArgumentException( "index cannot be less than zero" );
    }
    if ( index > columns.size() ) {
        throw new IllegalArgumentException( "index cannot be greater than the number of rows" );
    }

    for ( int iRow = 0; iRow < data.size(); iRow++ ) {
        DynamicDataRow rowData = data.get( iRow );
        TableCellElement tce = makeTableCellElement( index,
                                                     rowData );
        if ( tce != null ) {

            CellValue<? extends Comparable<?>> cell = rowData.get( index );
            Coordinate hc = cell.getHtmlCoordinate();

            TableRowElement tre = tbody.getRows().getItem( hc.getRow() );
            TableCellElement ntce = tre.insertCell( hc.getCol() );
            tre.replaceChild( tce,
                              ntce );
        }
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:26,代码来源:AbstractVerticalMergableGridWidget.java


示例18: getSelectedCellExtents

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
/**
 * Retrieve the extents of a cell
 * @param cv The cell for which to retrieve the extents
 * @return
 */
CellSelectionDetail getSelectedCellExtents( CellValue<? extends Comparable<?>> cv ) {

    if ( cv == null ) {
        throw new IllegalArgumentException( "cv cannot be null" );
    }

    // Cells in hidden columns do not have extents
    if ( !columns.get( cv.getCoordinate().getCol() ).isVisible() ) {
        return null;
    }

    Coordinate hc = cv.getHtmlCoordinate();
    TableRowElement tre = tbody.getRows().getItem( hc.getRow() ).<TableRowElement>cast();
    TableCellElement tce = tre.getCells().getItem( hc.getCol() ).<TableCellElement>cast();
    int offsetX = tce.getOffsetLeft();
    int offsetY = tce.getOffsetTop();
    int w = tce.getOffsetWidth();
    int h = tce.getOffsetHeight();
    CellSelectionDetail e = new CellSelectionDetail( cv.getCoordinate(),
                                                     offsetX,
                                                     offsetY,
                                                     h,
                                                     w );
    return e;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:31,代码来源:AbstractMergableGridWidget.java


示例19: displayQuireItem

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
private void displayQuireItem(com.google.gwt.dom.client.Document htmldoc,
		TableElement table, Element item) {
	TableRowElement tr = table.insertRow(-1);

	TableCellElement td1 = tr.insertCell(-1);
	TableCellElement td2 = tr.insertCell(-1);
	TableCellElement td3 = tr.insertCell(-1);

	td1.setInnerText(item.getAttribute("n"));

	NodeList l = item.getElementsByTagName("locus");

	if (l.getLength() > 0) {
		Element locus = (Element) l.item(0);

		td2.appendChild(displayLocus(htmldoc, locus));

		for (Node n = locus.getNextSibling(); n != null; n = n
				.getNextSibling()) {
			td3.appendChild(displayDescription(htmldoc, n));
		}
	}
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:24,代码来源:Book.java


示例20: ResultCellTable

import com.google.gwt.dom.client.TableCellElement; //导入依赖的package包/类
@Inject
public ResultCellTable(final @Assisted int pageSize,
                       final @NotNull CellTableResourcesQueryResults cellTableResources,
                       final @NotNull SqlRequestLauncherConstants constants) {
    super(pageSize, cellTableResources);

    final InlineLabel emptyWidget = new InlineLabel(constants.emptyResult());
    setEmptyTableWidget(emptyWidget);
    emptyWidget.setStyleName(cellTableResources.cellTableStyle().emptyTableWidget());

    addCellPreviewHandler(new CellPreviewEvent.Handler<List<String>>() {
        @Override
        public void onCellPreview(CellPreviewEvent<List<String>> event) {
            if ("click".equals(event.getNativeEvent().getType())) {
                TableCellElement cellElement = getRowElement(event.getIndex()).getCells().getItem(event.getColumn());
                cellElement.setTitle(cellElement.getInnerText());
            }
        }
    });
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:21,代码来源:ResultCellTable.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Transaction类代码示例发布时间:2022-05-21
下一篇:
Java RequestListener类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap