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

com.vaadin.polymer.iron.widget.IronDocViewer 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-doc-viewer 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.element.*;

import com.vaadin.polymer.iron.widget.event.IronDocViewerComponentSelectedEvent;
import com.vaadin.polymer.iron.widget.event.IronDocViewerComponentSelectedEventHandler;

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

/**
 * 

Renders documentation describing an element’s API.

*

iron-doc-viewer renders element and behavior descriptions as extracted by
Hydrolysis. You can provide them
either via binding…

*
<iron-doc-viewer descriptor="{{elementDescriptor}}"></iron-doc-viewer>
 * 
 * 
 * 

…or by placing the element descriptor in JSON as the text content of an
iron-doc-viewer:

*
<iron-doc-viewer>
 *   {
 *     "is": "awesome-sauce",
 *     "properties": [
 *       {"name": "isAwesome", "type": "boolean", "desc": "Is it awesome?"},
 *     ]
 *   }
 * </iron-doc-viewer>
 * 
 * 
 * 

However, be aware that due to current limitations in Polymer 0.8, changes to
the text content will not be respected, only the initial value will be loaded.
If you wish to update the documented element, please set it via the descriptor
property.

*/ public class IronDocViewer extends PolymerWidget { /** * Default Constructor. */ public IronDocViewer() { this(""); } /** * Constructor used by UIBinder to create widgets with content. */ public IronDocViewer(String html) { super(IronDocViewerElement.TAG, IronDocViewerElement.SRC, html); getPolymerElement().addEventListener( com.vaadin.polymer.iron.element.event.IronDocViewerComponentSelectedEvent.NAME, new com.vaadin.polymer.iron.element.event.IronDocViewerComponentSelectedEvent.Listener() { @Override protected void handleEvent(com.vaadin.polymer.iron.element.event.IronDocViewerComponentSelectedEvent event) { fireEvent(new IronDocViewerComponentSelectedEvent(event)); } }); } /** * Gets a handle to the Polymer object's underlying DOM element. */ public IronDocViewerElement getPolymerElement() { return (IronDocViewerElement) getElement(); } /** *

The Hydrolysis-generated
element descriptor to display details for.

*

Alternatively, the element descriptor can be provided as JSON via the text content
of this element.

* * JavaScript Info: * @property descriptor * @type hydrolysis.ElementDescriptor * */ public JavaScriptObject getDescriptor(){ return getPolymerElement().getDescriptor(); } /** *

The Hydrolysis-generated
element descriptor to display details for.

*

Alternatively, the element descriptor can be provided as JSON via the text content
of this element.

* * JavaScript Info: * @property descriptor * @type hydrolysis.ElementDescriptor * */ public void setDescriptor(JavaScriptObject value) { getPolymerElement().setDescriptor(value); } /** *

The Hydrolysis-generated
element descriptor to display details for.

*

Alternatively, the element descriptor can be provided as JSON via the text content
of this element.

* * JavaScript Info: * @attribute descriptor * */ public void setDescriptor(String value) { getPolymerElement().setAttribute("descriptor", value); } /** *

Broadcast when another component is clicked on

* * JavaScript Info: * @event iron-doc-viewer-component-selected */ public HandlerRegistration addIronDocViewerComponentSelectedHandler(IronDocViewerComponentSelectedEventHandler handler) { return addHandler(handler, IronDocViewerComponentSelectedEvent.TYPE); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy