本文整理了Java中com.google.gwt.dom.client.Element.setClassName()
方法的一些代码示例,展示了Element.setClassName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setClassName()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:setClassName
[英]The class attribute of the element. This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages.
[中]元素的class属性。由于与许多语言公开的“class”关键字冲突,此属性已重命名。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Sets the style name to be used on the glass element. By default, this is
* "gwt-PopupPanelGlass".
*
* @param glassStyleName the glass element's style name
*/
public void setGlassStyleName(String glassStyleName) {
this.glassStyleName = glassStyleName;
if (glass != null) {
glass.setClassName(glassStyleName);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Clears all of the element's style names and sets it to the given style.
*
* @param elem the element whose style is to be modified
* @param styleName the new style name
*/
protected static void setStyleName(Element elem, String styleName) {
elem.setClassName(styleName);
}
代码示例来源:origin: kaaproject/kaa
DOM.insertChild(getElement(), textElement, 0);
Element caretSpan = DOM.createElement("span");
caretSpan.setClassName(Utils.kaaAdminStyle.caret());
DOM.appendChild(getElement(), caretSpan);
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public R className(String className) {
assertCanAddAttribute().setClassName(className);
return getReturnBuilder();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Adds a name to this element's class property. If the name is already
* present, this method has no effect.
*
* @param className the class name to be added
* @return <code>true</code> if this element did not already have the specified class name
* @see #setClassName(String)
*/
public final boolean addClassName(String className) {
className = trimClassName(className);
// Get the current style string.
String oldClassName = getClassName();
int idx = indexOfName(oldClassName, className);
// Only add the style if it's not already present.
if (idx == -1) {
if (oldClassName.length() > 0) {
setClassName(oldClassName + " " + className);
} else {
setClassName(className);
}
return true;
}
return false;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
setClassName(newClassName);
return true;
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Create the default element used to wrap the Cell. The default element is a
* div with display set to inline-block.
*
* @return the default wrapper element
*/
private static Element createDefaultWrapperElement() {
Element div = Document.get().createDivElement();
div.setClassName(CommonResources.getInlineBlockStyle());
return div;
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Clears all of the element's style names and sets it to the given style.
*
* @param elem the element whose style is to be modified
* @param styleName the new style name
*/
protected static void setStyleName(Element elem, String styleName) {
elem.setClassName(styleName);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* When enabled, the background will be blocked with a semi-transparent pane
* the next time it is shown. If the PopupPanel is already visible, the glass
* will not be displayed until it is hidden and shown again.
*
* @param enabled true to enable, false to disable
*/
public void setGlassEnabled(boolean enabled) {
this.isGlassEnabled = enabled;
if (enabled && glass == null) {
glass = Document.get().createDivElement();
glass.setClassName(glassStyleName);
glass.getStyle().setPosition(Position.ABSOLUTE);
glass.getStyle().setLeft(0, Unit.PX);
glass.getStyle().setTop(0, Unit.PX);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public Tab(Widget child) {
super(Document.get().createDivElement());
getElement().appendChild(inner = Document.get().createDivElement());
setWidget(child);
setStyleName(TAB_STYLE);
inner.setClassName(TAB_INNER_STYLE);
getElement().addClassName(CommonResources.getInlineBlockStyle());
}
代码示例来源:origin: com.google.gwt/gwt-servlet
element.setClassName(styleName);
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
protected Element getModalityCurtain() {
if (modalityCurtain == null) {
modalityCurtain = DOM.createDiv();
modalityCurtain.setClassName(CLASSNAME + "-modalitycurtain");
}
return modalityCurtain;
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
private Element getResizingCurtain() {
if (resizingCurtain == null) {
resizingCurtain = createCurtain();
resizingCurtain.setClassName(CLASSNAME + "-resizingCurtain");
}
return resizingCurtain;
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
protected void updateStyleNames(String primaryStyleName) {
hTableWrapper.setClassName(primaryStyleName + "-header");
columnSelector.setClassName(primaryStyleName + "-column-selector");
setStyleName(primaryStyleName + "-header-wrap");
for (HeaderCell c : availableCells.values()) {
c.updateStyleNames(primaryStyleName);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
containerElem.setClassName(CommonResources.getInlineBlockStyle());
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/** Mouse Down handler */
public boolean onMouseDown() {
if (enabled && hasVisibleItems) {
element.setClassName(css.menuBarItemSelected());
pressed = true;
actionSelectedHandler.onActionSelected(group);
return true;
}
return false;
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public R className(String className) {
assertCanAddAttribute().setClassName(className);
return getReturnBuilder();
}
代码示例来源:origin: fr.lteconsulting/hexa.core
public Node( Element container )
{
nodeContainer = container;
nodeDiv = DOM.createDiv();
nodeDiv.setClassName( "DivTree-NodeDiv" );
nodeContainer.appendChild( nodeDiv );
nodeDiv.setInnerText( "Node salam aleikum salam aleikum salam aleikum salam aleikum salam aleikum salam" );
childContainer = DOM.createDiv();
// childContainer.getStyle().setDisplay( Display.INLINE_BLOCK );
childContainer.setClassName( "DivTree-ChildrenContainer" );
nodeContainer.appendChild( childContainer );
}
代码示例来源:origin: fr.lteconsulting/hexa.core
public DivTree()
{
Element div = DOM.createDiv();
div.setClassName( "DivTree-Container" );
setElement( div );
rootNode = new Node( div );
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public CubaScrollTableHead() {
Element iconElement = presentationsEditIcon.getElement();
iconElement.setClassName("c-table-prefs-icon");
iconElement.getStyle().setDisplay(Style.Display.NONE);
Element columnSelector = (Element) getElement().getLastChild();
DOM.insertChild(getElement(), iconElement, DOM.getChildIndex(getElement(), columnSelector));
DOM.sinkEvents(iconElement, Event.ONCLICK);
}
内容来源于网络,如有侵权,请联系作者删除!