com.vaadin.polymer.iron.IronCollapseElement Maven / Gradle / Ivy
/*
* 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;
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;
/**
* 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 property
* Description
* Default
*
*
*
*
* --iron-collapse-transition-duration
* Animation transition duration
* 300ms
*
*
*
*/
@JsType(isNative=true)
public interface IronCollapseElement extends HTMLElement {
@JsOverlay public static final String TAG = "iron-collapse";
@JsOverlay public static final String SRC = "iron-collapse/iron-collapse.html";
/**
* If true, the orientation is horizontal; otherwise is vertical.
*
* JavaScript Info:
* @property horizontal
* @type Boolean
*
*/
@JsProperty boolean getHorizontal();
/**
* If true, the orientation is horizontal; otherwise is vertical.
*
* JavaScript Info:
* @property horizontal
* @type Boolean
*
*/
@JsProperty void setHorizontal(boolean value);
/**
* Set noAnimation to true to disable animations.
*
* JavaScript Info:
* @property noAnimation
* @type Boolean
*
*/
@JsProperty boolean getNoAnimation();
/**
* Set noAnimation to true to disable animations.
*
* JavaScript Info:
* @property noAnimation
* @type Boolean
*
*/
@JsProperty void setNoAnimation(boolean value);
/**
* Set opened to true to show the collapse element and to false to hide it.
*
* JavaScript Info:
* @property opened
* @type Boolean
*
*/
@JsProperty boolean getOpened();
/**
* Set opened to true to show the collapse element and to false to hide it.
*
* JavaScript Info:
* @property opened
* @type Boolean
*
*/
@JsProperty void setOpened(boolean value);
/**
* When true, the element is transitioning its opened state. When false,
the element has finished opening/closing.
*
* JavaScript Info:
* @property transitioning
* @type Boolean
*
*/
@JsProperty boolean getTransitioning();
/**
* When true, the element is transitioning its opened state. When false,
the element has finished opening/closing.
*
* JavaScript Info:
* @property transitioning
* @type Boolean
*
*/
@JsProperty void setTransitioning(boolean 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
*
*
*/
void enableTransition(Object 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
*
*/
void assignParentResizable(Object 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
*
*/
void stopResizeNotificationsFor(Object target);
/**
* Toggle the opened state.
*
* JavaScript Info:
* @method toggle
*
*
*/
void toggle();
/**
*
*
* JavaScript Info:
* @method hide
*
*
*/
void hide();
/**
*
*
* JavaScript Info:
* @method show
*
*
*/
void show();
/**
* Can be called to manually notify a resizable and its descendant
resizables of a resize change.
*
* JavaScript Info:
* @method notifyResize
* @behavior VaadinSplitLayout
*
*/
void notifyResize();
/**
* Updates the size of the element.
*
* JavaScript Info:
* @method updateSize
* @param {string} size
* @param {boolean=} animated
*
*
*/
void updateSize(String size, boolean 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}
*/
boolean resizerShouldNotify(JavaScriptObject element);
}