All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.extjs.gxt.ui.client.widget.Label Maven / Gradle / Ivy

There is a newer version: 2.3.1-gwt22
Show newest version
/*
 * Sencha GXT 2.3.1a - Sencha for GWT
 * Copyright(c) 2007-2013, Sencha, Inc.
 * [email protected]
 * 
 * http://www.sencha.com/products/gxt/license/
 */
 package com.extjs.gxt.ui.client.widget;

import com.google.gwt.user.client.Element;

/**
 * A component that contains text in a HTML label element.
 * 
 * 
*
Inherited Events:
*
BoxComponent Move
*
BoxComponent Resize
*
Component Enable
*
Component Disable
*
Component BeforeHide
*
Component Hide
*
Component BeforeShow
*
Component Show
*
Component Attach
*
Component Detach
*
Component BeforeRender
*
Component Render
*
Component BrowserEvent
*
Component BeforeStateRestore
*
Component StateRestore
*
Component BeforeStateSave
*
Component SaveState
*
*/ public class Label extends Html { private String labelFor; /** * Creates a new label. */ public Label() { setTagName("label"); } /** * Creates a new label. * * @param html the label's text */ public Label(String html) { this(); setHtml(html); } /** * Sets the label for id. * * @param id the element id */ public void setLabelFor(String id) { this.labelFor = id; } @Override protected void onRender(Element target, int index) { super.onRender(target, index); if (labelFor != null) { getElement().setAttribute("for", labelFor); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy