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

com.vaadin.polymer.iron.widget.IronCollapse 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-collapse 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.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;

/**
 * 

iron-collapse creates a collapsible block of content. By default, the content
will be collapsed. Use opened or toggle() to show/hide the content.

*
<button on-click="{{toggle}}">toggle collapse</button>
 * 
 * <iron-collapse id="collapse">
 *   <div>Content goes here...</div>
 * </iron-collapse>
 * 
 * ...
 * 
 * toggle: function() {
 *   this.$.collapse.toggle();
 * }
 * 
 * 
 * 

iron-collapse adjusts the height/width of the collapsible element to show/hide
the content. So avoid putting padding/margin/border on the collapsible directly,
and instead put a div inside and style that.

*
<style>
 *   .collapse-content {
 *     padding: 15px;
 *     border: 1px solid #dedede;
 *   }
 * </style>
 * 
 * <iron-collapse>
 *   <div class="collapse-content">
 *     <div>Content goes here...</div>
 *   </div>
 * </iron-collapse>
 * 
 * 
 * 
*/ public class IronCollapse extends PolymerWidget { /** * Default Constructor. */ public IronCollapse() { this(""); } /** * Constructor used by UIBinder to create widgets with content. */ public IronCollapse(String html) { super(IronCollapseElement.TAG, IronCollapseElement.SRC, html); } /** * Gets a handle to the Polymer object's underlying DOM element. */ public IronCollapseElement getPolymerElement() { return (IronCollapseElement) getElement(); } /** * * * JavaScript Info: * @method enableTransition * @param {} enabled * */ public void enableTransition(JavaScriptObject enabled) { getPolymerElement().enableTransition(enabled); } /** * * * JavaScript Info: * @method hide * */ public void hide() { getPolymerElement().hide(); } /** *

If true, the orientation is horizontal; otherwise is vertical.

* * JavaScript Info: * @property horizontal * @type Boolean * */ public boolean getHorizontal(){ return getPolymerElement().getHorizontal(); } /** *

If true, the orientation is horizontal; otherwise is vertical.

* * JavaScript Info: * @property horizontal * @type Boolean * */ public void setHorizontal(boolean value) { getPolymerElement().setHorizontal(value); } /** *

Set opened to true to show the collapse element and to false to hide it.

* * JavaScript Info: * @property opened * @type Boolean * */ public boolean getOpened(){ return getPolymerElement().getOpened(); } /** *

Set opened to true to show the collapse element and to false to hide it.

* * JavaScript Info: * @property opened * @type Boolean * */ public void setOpened(boolean value) { getPolymerElement().setOpened(value); } /** * * * JavaScript Info: * @method show * */ public void show() { getPolymerElement().show(); } /** *

Toggle the opened state.

* * JavaScript Info: * @method toggle * */ public void toggle() { getPolymerElement().toggle(); } /** * * * JavaScript Info: * @method updateSize * @param {} size * @param {} animated * */ public void updateSize(JavaScriptObject size, JavaScriptObject animated) { getPolymerElement().updateSize(size, animated); } /** * * * JavaScript Info: * @property hostAttributes * @type Object * */ public JavaScriptObject getHostAttributes(){ return getPolymerElement().getHostAttributes(); } /** * * * JavaScript Info: * @property hostAttributes * @type Object * */ public void setHostAttributes(JavaScriptObject value) { getPolymerElement().setHostAttributes(value); } /** * * * JavaScript Info: * @property listeners * @type Object * */ public JavaScriptObject getListeners(){ return getPolymerElement().getListeners(); } /** * * * JavaScript Info: * @property listeners * @type Object * */ public void setListeners(JavaScriptObject value) { getPolymerElement().setListeners(value); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy