com.vaadin.polymer.iron.widget.DemoSnippet Maven / Gradle / Ivy
The newest version!
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from iron-demo-helpers 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;
/**
* demo-snippet
is a helper element that displays the source of a code snippet and
its rendered demo. It can be used for both native elements and
Polymer elements.
* Example of a native element demo
*
* <demo-snippet>
* <template>
* <input type="date">
* </template>
* </demo-snippet>
*
* Example of a Polymer <paper-checkbox> demo
*
* <demo-snippet>
* <template>
* <paper-checkbox>Checkbox</paper-checkbox>
* <paper-checkbox checked>Checkbox</paper-checkbox>
* </template>
* </demo-snippet>
*
*
*
Styling
* The following custom properties and mixins are available for styling:
*
*
*
* Custom property
* Description
* Default
*
*
*
*
* --demo-snippet
* Mixin applied to the entire element
* {}
*
*
* --demo-snippet-demo
* Mixin applied to just the demo section
* {}
*
*
* --demo-snippet-code
* Mixin applied to just the code section
* {}
*
*
*
*/
public class DemoSnippet extends PolymerWidget {
/**
* Default Constructor.
*/
public DemoSnippet() {
this("");
}
/**
* Constructor used by UIBinder to create widgets with content.
*/
public DemoSnippet(String html) {
super(DemoSnippetElement.TAG, DemoSnippetElement.SRC, html);
}
/**
* Gets a handle to the Polymer object's underlying DOM element.
*/
public DemoSnippetElement getPolymerElement() {
return (DemoSnippetElement) getElement();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy