com.google.gwt.dom.client.LabelElement Java Examples

The following examples show how to use com.google.gwt.dom.client.LabelElement. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InputRadio.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 6 votes vote down vote up
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);
}
 
Example #2
Source File: InputCheckBox.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 6 votes vote down vote up
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);
}
 
Example #3
Source File: Label.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
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);
	}
}
 
Example #4
Source File: LabelRenderingMutationHandler.java    From swellrt with Apache License 2.0 4 votes vote down vote up
/**
 * @return impl nodelet as {@link LabelElement}
 */
private LabelElement getImpl(ContentElement element) {
  return LabelElement.as(element.getImplNodelet());
}
 
Example #5
Source File: Label.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
public Label() {
	super(LabelElement.TAG);
	this.labelElement = LabelElement.as(this.getElement());
	StyleUtils.addStyle(this, Label.STYLE_CONTROL_LABEL);
}
 
Example #6
Source File: LabelRenderingMutationHandler.java    From incubator-retired-wave with Apache License 2.0 4 votes vote down vote up
/**
 * @return impl nodelet as {@link LabelElement}
 */
private LabelElement getImpl(ContentElement element) {
  return LabelElement.as(element.getImplNodelet());
}