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


Java FlexTable.setStyleName方法代码示例

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


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

示例1: createTableWithStyles

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable createTableWithStyles(Element element) {
    table = new FlexTable();
    table.setStyleName(styleNames.QP_REPORT_TABLE());
    String cls = element.getAttribute(CLASS);
    if (cls != null) {
        table.addStyleName(cls);
    }
    return table;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:10,代码来源:ReportTableGenerator.java

示例2: addDataTableColumnTitles

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
/**
 * This method is called when it is time to fill in the column titles of the data table 
 * @param dataTable the data table to add columns to
 */
protected void addDataTableColumnTitles(FlexTable dataTable) {
	//Fill the table headings
	int column = 0;
	dataTable.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_STYLE_NAME );
	
	//Add the entry index column title
	Label roomNumberLabel = new Label(titlesI18N.indexColumnTitle());
	roomNumberLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
	dataTable.setWidget(0, column++, roomNumberLabel );
	
	//Add the select data entries column to the data table
	if( doNeedSelectColumn ) {
		addSelectorColumnTitleToDataTable(0, column++);
	}
	
	//Add the gender column title
	Label genderLabel = new Label(titlesI18N.genderColumnTitle());
	genderLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
	dataTable.setWidget(0, column++, genderLabel );
	
	//Add the online/offline status column title
	Label statusLabel = new Label( titlesI18N.statusColumnTitle() );
	statusLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
	dataTable.setWidget(0, column++, statusLabel );
	
	//Add the last online date column title
	Label lastOnlineLabel = new Label( titlesI18N.lastOnlineFieldTitle() );
	lastOnlineLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
	dataTable.setWidget(0, column++, lastOnlineLabel );
	
	//Add the user login name column title
	Label userLoginLabel = new Label(titlesI18N.userLoginColumnTitle());
	userLoginLabel.setStyleName( CommonResourcesContainer.PAGED_DIALOG_TABLE_LABEL_STYLE );
	dataTable.setWidget(0, column++, userLoginLabel );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:40,代码来源:UserSearchDialog.java

示例3: newPreferencesTable

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable newPreferencesTable() {
	FlexTable table = new FlexTable();
	table.setStyleName("mf-growsTable");

	table.removeAllRows();
			
	return table;		
}
 
开发者ID:dvorka,项目名称:shifts-solver,代码行数:9,代码来源:PreferencesPanel.java

示例4: initModule

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
@Override
public void initModule(Element element) {
    FlexTable table = new FlexTable();
    table.setStyleName(styleNames.QP_TABLE_TABLE());

    Map<String, String> styles = styleSocket.getStyles(element);

    if (styles.containsKey(EMPIRIA_TABLE_CELLPADDING)) {
        int padding = NumberUtils.tryParseInt(styles.get(EMPIRIA_TABLE_CELLPADDING), -1);
        if (padding != -1) {
            table.setCellPadding(padding);
        }
    }

    if (styles.containsKey(EMPIRIA_TABLE_CELLSPACING)) {
        int spacing = NumberUtils.tryParseInt(styles.get(EMPIRIA_TABLE_CELLSPACING), -1);
        if (spacing != -1) {
            table.setCellSpacing(spacing);
        }
    }

    NodeList trNodes = element.getElementsByTagName("tr");
    for (int r = 0; r < trNodes.getLength(); r++) {
        NodeList tdNodes = ((Element) trNodes.item(r)).getElementsByTagName("td");
        for (int d = 0; d < tdNodes.getLength(); d++) {
            Panel dPanel = new FlowPanel();
            dPanel.setStyleName(styleNames.QP_TABLE_CELL());
            getBodyGenerator().generateBody(tdNodes.item(d), dPanel);
            table.setWidget(r, d, dPanel);

            int colspan = 1;
            if (tdNodes.item(d).getNodeType() == Node.ELEMENT_NODE && ((Element) tdNodes.item(d)).hasAttribute("colspan")) {
                colspan = NumberUtils.tryParseInt(((Element) tdNodes.item(d)).getAttribute("colspan"), 1);
            }
            if (colspan > 1) {
                table.getFlexCellFormatter().setColSpan(r, d, colspan);
            }

            int rowspan = 1;
            if (tdNodes.item(d).getNodeType() == Node.ELEMENT_NODE && ((Element) tdNodes.item(d)).hasAttribute("rowspan")) {
                rowspan = NumberUtils.tryParseInt(((Element) tdNodes.item(d)).getAttribute("rowspan"), 1);
            }
            if (rowspan > 1) {
                table.getFlexCellFormatter().setRowSpan(r, d, rowspan);
            }
        }
    }
    tablePanel.add(table);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:50,代码来源:TableModule.java

示例5: InfoPanelImpl

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public InfoPanelImpl() {
	super("cell");
	iText = new P("text");
	add(iText);
	
	iHint = new ClickableHint(""); iHint.setStyleName("hint");
	add(iHint);
	
	iUpdateInfo = new Callback() {
		@Override
		public void execute(Callback callback) {
			if (callback != null) callback.execute(null);
		}
	};
	
	iInfo = new FlexTable();
	iInfo.setStyleName("unitime-InfoTable");
	// iUpdateInfo = updateInfo;
	iInfoPanel = new PopupPanel();
	iInfoPanel.setWidget(iInfo);
	iInfoPanel.setStyleName("unitime-PopupHint");
	sinkEvents(Event.ONMOUSEOVER);
	sinkEvents(Event.ONMOUSEOUT);
	sinkEvents(Event.ONMOUSEMOVE);
	iShowInfo = new Timer() {
		@Override
		public void run() {
			if (iInfo.getRowCount() == 0) return;
			iUpdateInfo.execute(new Callback() {
				public void execute(Callback callback) {
					iInfoPanel.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
						@Override
						public void setPosition(int offsetWidth, int offsetHeight) {
							int maxX = Window.getScrollLeft() + Window.getClientWidth() - offsetWidth - 10;
							iInfoPanel.setPopupPosition(Math.min(iX, maxX), iY);
						}
					});
					if (callback != null) callback.execute(null);
				}
			});
		}
	};
	iHideInfo = new Timer() {
		@Override
		public void run() {
			iInfoPanel.hide();
		}
	};
	
	iDefaultClickHandler = new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			if (iUrl != null && !iUrl.isEmpty())
				ToolBox.open(GWT.getHostPageBaseURL() + iUrl);
		}
	};
	iTextClick = iHint.addClickHandler(iDefaultClickHandler);
	iHintClick = iText.addClickHandler(iDefaultClickHandler);
	iHint.setTabIndex(-1);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:61,代码来源:InfoPanelImpl.java

示例6: newScheduleTable

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable newScheduleTable() {
	FlexTable table = new FlexTable();
	table.setStyleName("s2-scheduleTable");
	table.removeAllRows();				
	return table;		
}
 
开发者ID:dvorka,项目名称:shifts-solver,代码行数:7,代码来源:SolutionPanel.java

示例7: newShiftsTable

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private FlexTable newShiftsTable() {
	FlexTable table = new FlexTable();
	table.setStyleName("s2-solutionTable");
	table.removeAllRows();
	return table;		
}
 
开发者ID:dvorka,项目名称:shifts-solver,代码行数:7,代码来源:SolutionPanel.java


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