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


Java LabelElement类代码示例

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


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

示例1: onLazyLoadingSuccessful

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
@Override
	public void onLazyLoadingSuccessful(final Collection<ViewObject> children) {
//		GWT.log("====>" + this.getText() + " > " + (children != null ? children.size() : 0) + " child loaded");
		// Remove the loading... label
		LabelElement loadingLabel = _childLoadingSPANElement();
		LIElement parentLI = this.getElement().cast();
		parentLI.removeChild(loadingLabel);
		
		// if the number of children loaded is 0 (there where no child items), hide the expander 
		// otherwise paint the children
		if (CollectionUtils.isNullOrEmpty(children)) {
			_expanderINPUTElement().setDisabled(true);
		} else {
			this.paintChildren(children);
		}
	}
 
开发者ID:opendata-euskadi,项目名称:r01fb,代码行数:17,代码来源:TreeViewItem.java

示例2: QCheckBox

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
public QCheckBox(Element elem, String displaynamePosition) {
    inputElem = (InputElement) this.getElement().getChild(0);
    labelElem =  (LabelElement) this.getElement().getChild(1);
    if (displaynamePosition.equals(DISPLAYNAME_POSITION_LEFT)) {
    	getElement().appendChild(labelElem);
    	getElement().appendChild(inputElem);
    } else {
    	getElement().appendChild(inputElem);
	    getElement().appendChild(labelElem);
    }
    String uid = DOM.createUniqueId();
    inputElem.setPropertyString("id", uid);
    labelElem.setHtmlFor(uid);
    directionalTextHelper = new DirectionalTextHelper(labelElem, true);

    // Accessibility: setting tab index to be 0 by default, ensuring element
    // appears in tab sequence. FocusWidget's setElement method already
    // calls setTabIndex, which is overridden below. However, at the time
    // that this call is made, inputElem has not been created. So, we have
    // to call setTabIndex again, once inputElem has been created.
    setTabIndex(0);
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:23,代码来源:QCheckBox.java

示例3: RadioContainer

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
RadioContainer(T value) {
	this.value = value;
	Container newContainer = null;
	Container label = new Container(LabelElement.TAG);
	if (Type.INLINE.equals(InputRadio.this.type)) {
		newContainer = label;
	} else {
		newContainer = new Container();
		newContainer.append(label);
	}
	this.initWidget(newContainer);
	label.getElement().appendChild(this.radioElement);
	label.getElement().appendChild(
		Document.get().createTextNode(" " + InputRadio.this.getChoiceRenderer().renderItem(value)));
	StyleUtils.addStyle(newContainer, InputRadio.this.type);
	newContainer.addDomHandler(this, ClickEvent.getType());
	InputRadio.this.itemsContainer.put(value, this);
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:19,代码来源:InputRadio.java

示例4: CheckboxContainer

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
CheckboxContainer(T value) {
	this.value = value;
	Container newContainer = null;
	Container label = new Container(LabelElement.TAG);
	if (Type.INLINE.equals(InputCheckBox.this.type)) {
		newContainer = label;
	} else {
		newContainer = new Container();
		InputCheckBox.this.container.append(label);
	}
	this.initWidget(newContainer);
	label.getElement().appendChild(this.checkboxElement);
	label.getElement().appendChild(
		Document.get().createTextNode(" " + InputCheckBox.this.getChoiceRenderer().renderItem(value)));
	StyleUtils.addStyle(newContainer, InputCheckBox.this.type);
	newContainer.addDomHandler(this, ClickEvent.getType());
	InputCheckBox.this.itemsContainer.put(value, this);
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:19,代码来源:InputCheckBox.java

示例5: setItemText

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
/**
 * Sets the text associated with the item at a given index.
 *
 * @param index the index of the item to be set
 * @param text the item's new text
 * @throws IndexOutOfBoundsException if the index is out of range
 */
public void setItemText(int index, String text) {
  checkIndex(index);
  final Element optionElement = (Element) optionsPanel.getElement().getChild(index);
  final LabelElement labelElement =
      (LabelElement) optionElement.getElementsByTagName("label").getItem(0);
  labelElement.setInnerText(text);
  if (selectedIndex == index) {
    currentInputElement.setValue(text);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:CustomComboBox.java

示例6: getItemText

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
/**
 * Gets the text associated with the item at the specified index.
 *
 * @param index the index of the item whose text is to be retrieved
 * @return the text associated with the item
 * @throws IndexOutOfBoundsException if the index is out of range
 */
public String getItemText(int index) {
  checkIndex(index);
  final Element optionElement = (Element) optionsPanel.getElement().getChild(index);
  final LabelElement labelElement =
      (LabelElement) optionElement.getElementsByTagName("label").getItem(0);

  return labelElement.getInnerText();
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:CustomListBox.java

示例7: setItemText

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
/**
 * Sets the text associated with the item at a given index.
 *
 * @param index the index of the item to be set
 * @param text the item's new text
 * @throws IndexOutOfBoundsException if the index is out of range
 */
public void setItemText(int index, String text) {
  checkIndex(index);
  final Element optionElement = (Element) optionsPanel.getElement().getChild(index);
  final LabelElement labelElement =
      (LabelElement) optionElement.getElementsByTagName("label").getItem(0);
  labelElement.setInnerText(text);
  if (selectedIndex == index) {
    currentItemLabel.setInnerText(text);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:CustomListBox.java

示例8: onLazyLoadingInProgress

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
@Override
public void onLazyLoadingInProgress() {
	// [1] - Create a child label element with the "loading..." text
	LabelElement loadingLabelEl = DOM.clone(BASE_LOADING_ELEM,		// a label
							 				true)					// deep cloning
							 		 .cast();
	// [2] - set the label as a child of the item (the LI) 
	LIElement parentLI = this.getElement().cast();
	parentLI.insertAfter(loadingLabelEl,
						 _widget.getElement());			// the loading label is ALLWAYS after the widget
}
 
开发者ID:opendata-euskadi,项目名称:r01fb,代码行数:12,代码来源:TreeViewItem.java

示例9: Label

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
private Label(Label source) {
	super(source);
	this.labelElement = LabelElement.as(this.getElement());
	StyleUtils.addStyle(this, Label.STYLE_CONTROL_LABEL);
	this.path = source.path;
	this.setText(source.text);
	if (source.htmlFor != null) {
		this.setHtmlFor(source.htmlFor);
	}
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:11,代码来源:Label.java

示例10: Radio

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
/**
 * Creates a new radio associated with a particular group name. All radio
 * buttons associated with the same group name belong to a
 * mutually-exclusive set.
 * 
 * Radio buttons are grouped by their name attribute, so changing their name
 * using the setName() method will also change their associated group.
 * 
 * @param name
 *            the group name with which to associate the radio button
 */
@UiConstructor
public Radio(String name) {
    super(DOM.createDiv(), Document.get().createRadioInputElement(name));
    setStyleName(Styles.RADIO);

    LabelElement label = Document.get().createLabelElement();
    label.appendChild(inputElem);
    label.appendChild(labelElem);

    getElement().appendChild(label);
}
 
开发者ID:gwtbootstrap3,项目名称:gwtbootstrap3,代码行数:23,代码来源:Radio.java

示例11: CheckBox

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
public CheckBox() {
    this(DOM.createDiv(), Document.get().createCheckInputElement());
    setStyleName(Styles.CHECKBOX);

    LabelElement label = Document.get().createLabelElement();
    label.appendChild(inputElem);
    label.appendChild(labelElem);

    getElement().appendChild(label);
}
 
开发者ID:gwtbootstrap3,项目名称:gwtbootstrap3,代码行数:11,代码来源:CheckBox.java

示例12: createLabel

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
private LabelElement createLabel(Document document, String className) {
	LabelElement result = document.createLabelElement();
	result.addClassName(className);

	return result;
}
 
开发者ID:WhitesteinTechnologies,项目名称:wt-pdf-viewer,代码行数:7,代码来源:WTPdfViewerWidget.java

示例13: createChildLabel

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
private LabelElement createChildLabel(Document document, Element parent, String nameId) {
	LabelElement result = createLabel(document, nameId);
	parent.appendChild(result);

	return result;
}
 
开发者ID:WhitesteinTechnologies,项目名称:wt-pdf-viewer,代码行数:7,代码来源:WTPdfViewerWidget.java

示例14: getImpl

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
/**
 * @return impl nodelet as {@link LabelElement}
 */
private LabelElement getImpl(ContentElement element) {
  return LabelElement.as(element.getImplNodelet());
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:7,代码来源:LabelRenderingMutationHandler.java

示例15: setHtmlFor

import com.google.gwt.dom.client.LabelElement; //导入依赖的package包/类
public void setHtmlFor(String htmlFor)
{
	((LabelElement) getElement().cast()).setHtmlFor(htmlFor);
}
 
开发者ID:turbomanage,项目名称:listmaker,代码行数:5,代码来源:LabelWidget.java


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