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


Java TableSectionElement类代码示例

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


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

示例1: resetFocusOnCell

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的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

示例2: redraw

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
@Override
protected void redraw() {

    TableSectionElement nbody = Document.get().createTBodyElement();

    for ( int iRow = 0; iRow < data.size(); iRow++ ) {

        DynamicDataRow rowData = data.get( iRow );

        TableRowElement tre = Document.get().createTRElement();
        tre.setClassName( getRowStyle( iRow ) );
        populateTableRowElement( tre,
                                 rowData );
        nbody.appendChild( tre );
    }

    // Update table to DOM
    table.replaceChild( nbody,
                        tbody );
    tbody = nbody;

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

示例3: getCell

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
/**
 * Get the TD element
 * 
 * @param root
 * @param column
 * @param row
 * @return
 */
public static TableCellElement getCell( Element root, int column, int row )
{
	TableSectionElement tbody = getTBodyElement( root );
	
	TableRowElement tr = tbody.getChild( row ).cast();
	TableCellElement td = tr.getChild( column ).cast();
	
	return td;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:18,代码来源:HtmlTableTemplate.java

示例4: getTableCellElementAncestor

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
private Element getTableCellElementAncestor( Element e ) {
    Element parent = e.getParentElement();
    while ( !TableSectionElement.is( parent )
            && !TableCellElement.is( parent ) ) {
        parent = parent.getParentElement();
    }
    return parent;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:9,代码来源:AbstractPopupEditCell.java

示例5: deleteRow

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
public void deleteRow( int index ) {

            //UI Components
            Widget widget = widgets.get( index );
            remove( widget );
            getBody().<TableSectionElement>cast().deleteRow( index );

            widgets.remove( index );
            fixStyles( index );
        }
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:11,代码来源:AbstractVerticalDecoratedGridSidebarWidget.java

示例6: getTableHeadElement

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
@Override
public TableSectionElement getTableHeadElement() {
	return super.getTableHeadElement();
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:5,代码来源:GridSection.java

示例7: getTableFootElement

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
@Override
public TableSectionElement getTableFootElement() {
	return super.getTableFootElement();
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:5,代码来源:GridSection.java

示例8: onBrowserEvent2

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
@Override
protected void onBrowserEvent2(Event event) {
    if (hasFilterHeaders()) {
        EventTarget eventTarget = event.getEventTarget();
        if (!Element.is(eventTarget)) {
          return;
        }
        final Element target = event.getEventTarget().cast();
        TableSectionElement thead = getTableHeadElement();
        TableSectionElement targetTableSection = null;
        TableCellElement targetTableCell = null;
        Element headerParent = null;
        
        Element maybeTableCell = null;
        Element cur = target;
        
        while (cur != null && targetTableSection == null) {
            if (cur == thead) {
                targetTableSection = cur.cast();
                if (maybeTableCell != null) {
                    targetTableCell = maybeTableCell.cast();
                    break;
                }
            }
            
            String tagName = cur.getTagName();
            if (TableCellElement.TAG_TD.equalsIgnoreCase(tagName)
                || TableCellElement.TAG_TH.equalsIgnoreCase(tagName)) {
              maybeTableCell = cur;
            }
            
            if (headerParent == null && getHeaderBuilder().isHeader(cur)) {
                headerParent = cur;
            }
            
            cur = cur.getParentElement();
        }
        if (targetTableCell != null) {
            String eventType = event.getType();
            TableRowElement targetTableRow = targetTableCell.getParentElement().cast();
            int col = targetTableCell.getCellIndex();
            if (targetTableSection == thead) {
                if (headerParent != null) {
                    Header<?> header =
                            getHeaderBuilder().getHeader(headerParent);
                    if (header != null) {
                      int headerIndex = getHeaderBuilder().getRowIndex(targetTableRow);
                      if (header instanceof StringFilterHeader) {
                          if (StringFilterHeader.isFilterFocusEvent(eventType)) {          
                              filterFocusedCellColumn = col;
                              filterFocusedCellRow = headerIndex;
                          } else {
                              filterFocusedCellColumn = -1;
                              filterFocusedCellRow = -1;
                          }
                      }
                     }
                  }
            }
        }
    }
    super.onBrowserEvent2(event);
}
 
开发者ID:kaaproject,项目名称:avro-ui,代码行数:64,代码来源:AvroUiDataGrid.java

示例9: getTBodyElement

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
public static TableSectionElement getTBodyElement( Element root )
{
	return root.getChild( 1 ).cast();
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:5,代码来源:HtmlTableTemplate.java

示例10: InputDatePicker

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
public InputDatePicker() {
	super(Document.get().createDivElement());

	StyleUtils.addStyle(this, InputDatePicker.STYLE_DATEPICKER);

	this.getElement().appendChild(this.datepickerHeader);
	StyleUtils.addStyle(this.datepickerHeader, InputDatePicker.STYLE_HEADER);

	/* month selecter */
	this.datepickerHeader.appendChild(this.monthPickerButton);
	StyleUtils.addStyle(this.monthPickerButton, InputDatePicker.STYLE_MONTH_PICKER_BUTTON);

	/* pagination */
	this.datepickerHeader.appendChild(this.monthPagerUl);
	StyleUtils.addStyle(this.monthPagerUl, InputDatePicker.STYLE_MONTH_PAGER);
	this.createLi(this.pagePreviusMonthLi, InputDatePicker.STYLE_MONTH_PREVIOUS, "&#9668;");
	this.createLi(this.pageTodayLi, InputDatePicker.STYLE_TODAY, "&#9673;");
	this.createLi(this.pageNextMonthLi, InputDatePicker.STYLE_MONTH_NEXT, "&#9658;");

	this.monthPagerUl.appendChild(this.pagePreviusMonthLi);
	this.monthPagerUl.appendChild(this.pageTodayLi);
	this.monthPagerUl.appendChild(this.pageNextMonthLi);

	/* Calendar Picker */
	this.getElement().appendChild(this.monthPicker);
	this.monthPicker.appendChild(this.monthPickerInner);
	StyleUtils.addStyle(this.monthPicker, InputDatePicker.STYLE_MONTH_PICKER);

	/* Calendar Picker */
	this.getElement().appendChild(this.calendarTable);
	StyleUtils.addStyle(this.calendarTable, InputDatePicker.STYLE_CALENDAR_PICKER);

	/* DayPicker Header */
	TableSectionElement head = Document.get().createTHeadElement();
	TableRowElement headRow = Document.get().createTRElement();
	this.calendarTable.appendChild(head);
	head.appendChild(headRow);
	for (int i = 0; i < 7; i++) {
		TableCellElement th = Document.get().createTHElement();
		headRow.appendChild(th);
		int dayToDisplay = (i + InputDatePicker.DATE_TIME_FORMAT_INFO.firstDayOfTheWeek()) % InputDatePicker.DAYS.length;
		th.setInnerText(InputDatePicker.DAYS[dayToDisplay]);
	}
	/* DayPicker Body */
	this.calendarTable.appendChild(this.calendatBody);

	this.today = InputDatePicker.ATTRIBUTE_DATE_FORMAT.parse(InputDatePicker.ATTRIBUTE_DATE_FORMAT.format(new Date()));
	this.setValue(this.today);

	Event.sinkEvents(this.getElement(), Event.ONKEYDOWN);
	Event.sinkEvents(this.monthPickerButton, Event.ONCLICK);
	Event.sinkEvents(this.pagePreviusMonthLi, Event.ONCLICK);
	Event.sinkEvents(this.pageTodayLi, Event.ONCLICK);
	Event.sinkEvents(this.pageNextMonthLi, Event.ONCLICK);

	this.redraw();
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:58,代码来源:InputDatePicker.java

示例11: TableHead

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
public TableHead() {
	super(TableSectionElement.TAG_THEAD);
	this.append(this.headerRow);
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:5,代码来源:TableHead.java

示例12: TableBody

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
@UiConstructor
public TableBody(String bodyId) {
	super(TableSectionElement.TAG_TBODY);
	this.bodyId = bodyId;
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:6,代码来源:TableBody.java

示例13: TableRowAdapter

import com.google.gwt.dom.client.TableSectionElement; //导入依赖的package包/类
/**
 * Constructs a new instance setting the number of columns for each row and attaching it to a table section element.
 * @param parentElement The table section to attach the item-rows under. In most cases you'll be fine with the other 
 * version of the constructor.
 * @param columns Number of columns each row will have, this number cannot be changed later.
 */
public TableRowAdapter(TableSectionElement parentElement, int columns) {
  super(parentElement);
  this.columns = columns;
}
 
开发者ID:turnsk,项目名称:gwtmvp,代码行数:11,代码来源:TableRowAdapter.java


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