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

com.vaadin.polymer.iron.widget.IronLabel Maven / Gradle / Ivy

The newest version!
/*
 * This code was generated with Vaadin Web Component GWT API Generator, 
 * from iron-label project by The Polymer Authors
 * that is licensed with http://polymer.github.io/LICENSE.txt license.
 */
package com.vaadin.polymer.iron.widget;

import com.vaadin.polymer.iron.*;

import com.vaadin.polymer.*;
import com.vaadin.polymer.elemental.*;
import com.vaadin.polymer.PolymerWidget;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.core.client.JavaScriptObject;

/**
 * 

<iron-label> provides a version of the <label> element that works with Custom Elements as well as native elements.

*

All text in the iron-label will be applied to the target element as a screen-reader accessible description.

*

There are three ways to use iron-label to target an element:

*
    *
  1. place an element inside iron-label and some text:

    *
    <iron-label>
     *   Label for the Button
     *   <paper-button>button</paper-button>
     * </iron-label>
     * 
     * 
  2. *
  3. place some elements inside iron-label and target one with the iron-label-target attribute.
    The other elements will provide the label for that element
    Note: This is not necessary if the element you want to label is the first
    element child of iron-label:

    *
    <iron-label>
     *   <span>Label for the Button</span>
     *   <paper-button iron-label-target>button</paper-button>
     * </iron-label>
     * 
     * <iron-label>
     *   <paper-button>button</paper-button>
     *   <span>Label for the Button</span>
     * </iron-label>
     * 
     * 
  4. *
  5. Set the for attribute on the iron-label element with the id of the target
    element in the same document or ShadowRoot:

    *
    <iron-label for="foo">
     *   Context for the button with the "foo" class"
     * </iron-label>
     * <paper-button id="foo">Far away button</paper-button>
     * 
     * 
     * 
  6. *
*

All taps on the iron-label will be forwarded to the “target” element.

*/ public class IronLabel extends PolymerWidget { /** * Default Constructor. */ public IronLabel() { this(""); } /** * Constructor used by UIBinder to create widgets with content. */ public IronLabel(String html) { super(IronLabelElement.TAG, IronLabelElement.SRC, html); } /** * Gets a handle to the Polymer object's underlying DOM element. */ public IronLabelElement getPolymerElement() { return (IronLabelElement) getElement(); } /** *

An ID reference to another element that needs to be
labelled by this iron-label element.

* * JavaScript Info: * @property for * @type String * */ public String getFor() { return getPolymerElement().getFor(); } /** *

An ID reference to another element that needs to be
labelled by this iron-label element.

* * JavaScript Info: * @property for * @type String * */ public void setFor(String value) { getPolymerElement().setFor(value); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy