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


Java TableCellElement.appendChild方法代码示例

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


在下文中一共展示了TableCellElement.appendChild方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: DataTable

import com.google.gwt.dom.client.TableCellElement; //导入方法依赖的package包/类
public DataTable()
{
	// wrapper Div
	wrapper = Document.get().createDivElement();
	wrapper.getStyle().setPosition( Position.RELATIVE );
	wrapper.setTabIndex( 0 ); // for focusability

	// headings table
	theadTable = Document.get().createTableElement();
	theadTable.setClassName( "table" );
	theadTable.getStyle().setWidth( 100, Unit.PCT );
	theadTable.getStyle().setTableLayout( TableLayout.FIXED );
	
	headTableColgroup = Document.get().createElement( "colgroup" );
	
	// headings elements
	thead = Document.get().createTHeadElement();
	theadtr = Document.get().createTRElement();

	// main table
	table = Document.get().createTableElement();
	table.setClassName( "table" );
	table.getStyle().setWidth( 100, Unit.PCT );
	table.getStyle().setTableLayout( TableLayout.FIXED );
	
	tableColgroup = Document.get().createElement( "colgroup" );

	// table body
	tbody = Document.get().createTBodyElement();

	// wrapper table
	wrapperTable = Document.get().createTableElement();
	wrapperTable.getStyle().setTableLayout( TableLayout.FIXED );
	wrapperTable.getStyle().setWidth( 100, Unit.PCT );
	wrapperTable.getStyle().setHeight( 100, Unit.PCT );
	TableRowElement tr0 = Document.get().createTRElement();
	TableCellElement td0 = Document.get().createTDElement();
	DivElement div0 = Document.get().createDivElement();
	div0.getStyle().setWidth( 100, Unit.PCT );
	TableRowElement tr1 = Document.get().createTRElement();
	tr1.getStyle().setHeight( 100, Unit.PCT );
	TableCellElement td1 = Document.get().createTDElement();
	DivElement div1 = Document.get().createDivElement();
	div1.getStyle().setHeight( 100, Unit.PCT );
	div1.getStyle().setWidth( 100, Unit.PCT );
	div1.getStyle().setPosition( Position.RELATIVE );
	DivElement div2 = Document.get().createDivElement();
	div2.getStyle().setPosition( Position.ABSOLUTE );
	div2.getStyle().setTop( 0, Unit.PX );
	div2.getStyle().setLeft( 0, Unit.PX );
	div2.getStyle().setRight( 0, Unit.PX );
	div2.getStyle().setBottom( 0, Unit.PX );
	div2.getStyle().setOverflow( Overflow.AUTO );

	// bind together
	theadTable.appendChild( headTableColgroup );
	theadTable.appendChild( thead.<Node> cast() );
	thead.appendChild( theadtr.<Node> cast() );
	table.appendChild( tableColgroup );
	table.appendChild( tbody.<Node> cast() );
	td0.appendChild( div0 );
	div0.appendChild( theadTable.<Node> cast() );
	div1.appendChild( div2 );
	div2.appendChild( table );
	td1.appendChild( div1.<Node> cast() );
	tr0.appendChild( td0 );
	tr1.appendChild( td1 );
	wrapperTable.appendChild( tr0 );
	wrapperTable.appendChild( tr1 );
	wrapper.appendChild( wrapperTable );

	customPanel = new CustomPanel( wrapper );
	initWidget( customPanel );

	setStylePrimaryName( CSS.main() );
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:77,代码来源:DataTable.java

示例5: redrawCalendarPicker

import com.google.gwt.dom.client.TableCellElement; //导入方法依赖的package包/类
private void redrawCalendarPicker() {
	this.monthPicker.getStyle().setDisplay(Display.NONE);
	this.calendarTable.getStyle().clearDisplay();

	this.calendatBody.removeAllChildren();

	int firstDayOfWeek = InputDatePicker.DATE_TIME_FORMAT_INFO.firstDayOfTheWeek();
	int lastDayOfWeek = (firstDayOfWeek + InputDatePicker.DAYS_IN_WEEK) % InputDatePicker.DAYS_IN_WEEK;

	/* Display month */
	this.monthPickerButton.setInnerHTML(InputDatePicker.MONTH_YEAR_FORMAT.format(this.cursor)
		+ "<span class=\"caret\"></span>");

	Date lastMonth = new Date(this.cursor.getTime());
	CalendarUtil.addMonthsToDate(lastMonth, -1);
	this.pagePreviusMonthLi.setAttribute(InputDatePicker.ATTRIBUTE_DATA_CURSOR, InputDatePicker.ATTRIBUTE_DATE_FORMAT
		.format(lastMonth));
	this.pageTodayLi.setAttribute(InputDatePicker.ATTRIBUTE_DATA_CURSOR, InputDatePicker.ATTRIBUTE_DATE_FORMAT
		.format(this.today));
	Date nextMonth = new Date(this.cursor.getTime());
	CalendarUtil.addMonthsToDate(nextMonth, 1);
	this.pageNextMonthLi.setAttribute(InputDatePicker.ATTRIBUTE_DATA_CURSOR, InputDatePicker.ATTRIBUTE_DATE_FORMAT
		.format(nextMonth));

	/* Draw daypicker */
	Date dateToDrow = new Date(this.cursor.getTime());
	int selectedMonth = dateToDrow.getMonth();
	int firstMonthToDisplay = (selectedMonth + 11) % 12;
	int lastMonthToDisplay = (selectedMonth + 13) % 12;
	do {
		CalendarUtil.addDaysToDate(dateToDrow, -1);
	} while (firstMonthToDisplay != dateToDrow.getMonth() || dateToDrow.getDay() != firstDayOfWeek);

	// drow calendarTable
	TableRowElement headRow = null;
	while (dateToDrow.getMonth() != lastMonthToDisplay || dateToDrow.getDay() != lastDayOfWeek
		|| dateToDrow.getDate() == 1 && dateToDrow.getDay() == firstDayOfWeek) {
		if (headRow == null || dateToDrow.getDay() == firstDayOfWeek) {
			headRow = Document.get().createTRElement();
			this.calendatBody.appendChild(headRow);
		}
		TableCellElement td = Document.get().createTDElement();
		headRow.appendChild(td);
		DivElement div = Document.get().createDivElement();
		td.appendChild(div);
		div.setInnerText(String.valueOf(dateToDrow.getDate()));
		div.setAttribute(InputDatePicker.ATTRIBUTE_DATA_DATE, InputDatePicker.ATTRIBUTE_DATE_FORMAT.format(dateToDrow));
		if (dateToDrow.getMonth() != selectedMonth) {
			StyleUtils.addStyle(td, InputDatePicker.STYLE_MUTED);
		}
		if (dateToDrow.equals(this.cursor)) {
			StyleUtils.addStyle(td, InputDatePicker.STYLE_SELECTED);
		}
		if (this.today.equals(dateToDrow)) {
			StyleUtils.addStyle(td, InputDatePicker.STYLE_TODAY);
		}
		Event.sinkEvents(div, Event.ONCLICK);

		CalendarUtil.addDaysToDate(dateToDrow, 1);
	}
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:62,代码来源:InputDatePicker.java

示例6: addCell

import com.google.gwt.dom.client.TableCellElement; //导入方法依赖的package包/类
protected void addCell(String text, char align, String style, boolean sorted) {
    final TableCellElement td = DOM.createTD().cast();

    final Element container = DOM.createDiv();
    container.setClassName(tableWidget.getStylePrimaryName() + "-cell-wrapper");

    td.setClassName(tableWidget.getStylePrimaryName() + "-cell-content");

    td.addClassName(tableWidget.getStylePrimaryName() + "-aggregation-cell");

    if (style != null && !style.equals("")) {
        td.addClassName(tableWidget.getStylePrimaryName() + "-cell-content-" + style);
    }

    if (sorted) {
        td.addClassName(tableWidget.getStylePrimaryName() + "-cell-content-sorted");
    }

    container.setInnerText(text);

    setAlign(align, container);

    td.appendChild(container);
    tr.appendChild(td);

    Tools.textSelectionEnable(td, tableWidget.isTextSelectionEnabled());
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:28,代码来源:TableAggregationRow.java


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