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

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

The 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.*;

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-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 max-height/max-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>
 * 
 * 
 * 

Styling

*

The following custom properties and mixins are available for styling:

* * * * * * * * * * * * * * * *
Custom propertyDescriptionDefault
--iron-collapse-transition-durationAnimation transition duration300ms
*/ 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(); } /** *

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 noAnimation to true to disable animations.

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

Set noAnimation to true to disable animations.

* * JavaScript Info: * @property noAnimation * @type Boolean * */ public void setNoAnimation(boolean value) { getPolymerElement().setNoAnimation(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); } /** *

When true, the element is transitioning its opened state. When false,
the element has finished opening/closing.

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

When true, the element is transitioning its opened state. When false,
the element has finished opening/closing.

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

enableTransition() is deprecated, but left over so it doesn’t break existing code.
Please use noAnimation property instead.

* * JavaScript Info: * @method enableTransition * @param {} enabled * * */ public void enableTransition(Object enabled) { getPolymerElement().enableTransition(enabled); } /** *

Used to assign the closest resizable ancestor to this resizable
if the ancestor detects a request for notifications.

* * JavaScript Info: * @method assignParentResizable * @param {} parentResizable * @behavior VaadinSplitLayout * */ public void assignParentResizable(Object parentResizable) { getPolymerElement().assignParentResizable(parentResizable); } /** *

Used to remove a resizable descendant from the list of descendants
that should be notified of a resize change.

* * JavaScript Info: * @method stopResizeNotificationsFor * @param {} target * @behavior VaadinSplitLayout * */ public void stopResizeNotificationsFor(Object target) { getPolymerElement().stopResizeNotificationsFor(target); } /** *

Toggle the opened state.

* * JavaScript Info: * @method toggle * * */ public void toggle() { getPolymerElement().toggle(); } /** * * * JavaScript Info: * @method hide * * */ public void hide() { getPolymerElement().hide(); } /** * * * JavaScript Info: * @method show * * */ public void show() { getPolymerElement().show(); } /** *

Can be called to manually notify a resizable and its descendant
resizables of a resize change.

* * JavaScript Info: * @method notifyResize * @behavior VaadinSplitLayout * */ public void notifyResize() { getPolymerElement().notifyResize(); } /** *

Updates the size of the element.

* * JavaScript Info: * @method updateSize * @param {string} size * @param {boolean=} animated * * */ public void updateSize(String size, boolean animated) { getPolymerElement().updateSize(size, animated); } /** *

This method can be overridden to filter nested elements that should or
should not be notified by the current element. Return true if an element
should be notified, or false if it should not be notified.

* * JavaScript Info: * @method resizerShouldNotify * @param {HTMLElement} element * @behavior VaadinSplitLayout * @return {boolean} */ public boolean resizerShouldNotify(JavaScriptObject element) { return getPolymerElement().resizerShouldNotify(element); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy