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

com.vaadin.polymer.iron.IronIconsetSvgElement Maven / Gradle / Ivy

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

import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

/**
 * 

The iron-iconset-svg element allows users to define their own icon sets
that contain svg icons. The svg icon elements should be children of the
iron-iconset-svg element. Multiple icons should be given distinct id’s.

*

Using svg elements to create icons has a few advantages over traditional
bitmap graphics like jpg or png. Icons that use svg are vector based so
they are resolution independent and should look good on any device. They
are stylable via css. Icons can be themed, colorized, and even animated.

*

Example:

*
<iron-iconset-svg name="my-svg-icons" size="24">
 *   <svg>
 *     <defs>
 *       <g id="shape">
 *         <rect x="12" y="0" width="12" height="24" />
 *         <circle cx="12" cy="12" r="12" />
 *       </g>
 *     </defs>
 *   </svg>
 * </iron-iconset-svg>
 * 
 * 
 * 

This will automatically register the icon set “my-svg-icons” to the iconset
database. To use these icons from within another element, make a
iron-iconset element and call the byId method
to retrieve a given iconset. To apply a particular icon inside an
element use the applyIcon method. For example:

*
iconset.applyIcon(iconNode, 'car');
 * 
 * 
 * 
*/ @JsType(isNative=true) public interface IronIconsetSvgElement extends HTMLElement { @JsOverlay public static final String TAG = "iron-iconset-svg"; @JsOverlay public static final String SRC = "iron-iconset-svg/iron-iconset-svg.html"; /** *

Set to true to enable mirroring of icons where specified when they are
stamped. Icons that should be mirrored should be decorated with a
mirror-in-rtl attribute.

*

NOTE: For performance reasons, direction will be resolved once per
document per iconset, so moving icons in and out of RTL subtrees will
not cause their mirrored state to change.

* * JavaScript Info: * @property rtlMirroring * @type Boolean * */ @JsProperty boolean getRtlMirroring(); /** *

Set to true to enable mirroring of icons where specified when they are
stamped. Icons that should be mirrored should be decorated with a
mirror-in-rtl attribute.

*

NOTE: For performance reasons, direction will be resolved once per
document per iconset, so moving icons in and out of RTL subtrees will
not cause their mirrored state to change.

* * JavaScript Info: * @property rtlMirroring * @type Boolean * */ @JsProperty void setRtlMirroring(boolean value); /** *

The size of an individual icon. Note that icons must be square.

* * JavaScript Info: * @property size * @type Number * */ @JsProperty double getSize(); /** *

The size of an individual icon. Note that icons must be square.

* * JavaScript Info: * @property size * @type Number * */ @JsProperty void setSize(double value); /** *

The name of the iconset.

* * JavaScript Info: * @property name * @type String * */ @JsProperty String getName(); /** *

The name of the iconset.

* * JavaScript Info: * @property name * @type String * */ @JsProperty void setName(String value); /** *

Remove an icon from the given element by undoing the changes effected
by applyIcon.

* * JavaScript Info: * @method removeIcon * @param {Element} element * * */ void removeIcon(Element element); /** *

Construct an array of all icon names in this iconset.

* * JavaScript Info: * @method getIconNames * * @return {JavaScriptObject} */ JavaScriptObject getIconNames(); /** *

Applies an icon to the given element.

*

An svg icon is prepended to the element’s shadowRoot if it exists,
otherwise to the element itself.

*

If RTL mirroring is enabled, and the icon is marked to be mirrored in
RTL, the element will be tested (once and only once ever for each
iconset) to determine the direction of the subtree the element is in.
This direction will apply to all future icon applications, although only
icons marked to be mirrored will be affected.

* * JavaScript Info: * @method applyIcon * @param {Element} element * @param {string} iconName * * @return {JavaScriptObject} */ JavaScriptObject applyIcon(Element element, String iconName); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy