本文整理匯總了Java中com.google.gwt.user.client.ui.UIObject.setStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java UIObject.setStyleName方法的具體用法?Java UIObject.setStyleName怎麽用?Java UIObject.setStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.UIObject
的用法示例。
在下文中一共展示了UIObject.setStyleName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setStyleName
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public void setStyleName(String styleName) {
super.setStyleName(styleName);
for (UIObject c: iContent) {
c.setStyleName(styleName);
c.getElement().getStyle().setBorderWidth(0, Unit.PX);
}
}
示例2: processConditionalStyleClass
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
private static void processConditionalStyleClass(EditableComponentGVO component, UIObject uiObject, ConditionGVO condition, boolean matched) {
if (condition.getStyleClass() != null) {
uiObject.setStyleName(condition.getStyleClass(), matched);
if(uiObject instanceof SpreadsheetCell) {
SpreadsheetCell ui = (SpreadsheetCell) uiObject;
// spreadsheetcell have a focuslabel inside(which is a container of html component). So we have apply the style for that also.
ui.getLabel().setStyleName(condition.getStyleClass(), matched);
}
}
}
示例3: addStyleName
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
* Adds a style to the specified cell.
*
* @param row the cell's row
* @param column the cell's column
* @param styleName the style name to be added
* @see UIObject#addStyleName(String)
*/
public void addStyleName(int row, int column, String styleName) {
prepareCell(row, column);
Element td = getCellElement(bodyElem, row, column);
UIObject.setStyleName(td, styleName, true);
}
示例4: removeStyleName
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
* Removes a style from the specified cell.
*
* @param row the cell's row
* @param column the cell's column
* @param styleName the style name to be removed
* @see UIObject#removeStyleName(String)
* @throws IndexOutOfBoundsException
*/
public void removeStyleName(int row, int column, String styleName) {
checkCellBounds(row, column);
Element td = getCellElement(bodyElem, row, column);
UIObject.setStyleName(td, styleName, false);
}
示例5: setStyleName
import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
* Sets the style name associated with the specified cell.
*
* @param row the row of the cell whose style name is to be set
* @param column the column of the cell whose style name is to be set
* @param styleName the new style name
* @see UIObject#setStyleName(String)
* @throws IndexOutOfBoundsException
*/
public void setStyleName(int row, int column, String styleName) {
prepareCell(row, column);
UIObject.setStyleName(getCellElement(bodyElem, row, column), styleName);
}