com.vaadin.polymer.paper.widget.PaperCard Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from paper-card project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.paper.widget;
import com.vaadin.polymer.paper.*;
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;
/**
* Material design: Cards
* paper-card
is a container with a drop shadow.
* Example:
* <paper-card heading="Card Title">
* <div class="card-content">Some content</div>
* <div class="card-actions">
* <paper-button>Some action</paper-button>
* </div>
* </paper-card>
*
*
*
Example - top card image:
* <paper-card heading="Card Title" image="/path/to/image.png" alt="image">
* ...
* </paper-card>
*
*
*
Accessibility
* By default, the aria-label
will be set to the value of the heading
attribute.
* Styling
* The following custom properties and mixins are available for styling:
*
*
*
* Custom property
* Description
* Default
*
*
*
*
* --paper-card-background-color
* The background color of the card
* --primary-background-color
*
*
* --paper-card-header-color
* The color of the header text
* #000
*
*
* --paper-card-header
* Mixin applied to the card header section
* {}
*
*
* --paper-card-header-text
* Mixin applied to the title in the card header section
* {}
*
*
* --paper-card-header-image
* Mixin applied to the image in the card header section
* {}
*
*
* --paper-card-header-image-text
* Mixin applied to the text overlapping the image in the card header section
* {}
*
*
* --paper-card-content
* Mixin applied to the card content section
* {}
*
*
* --paper-card-actions
* Mixin applied to the card action section
* {}
*
*
* --paper-card
* Mixin applied to the card
* {}
*
*
*
*/
public class PaperCard extends PolymerWidget {
/**
* Default Constructor.
*/
public PaperCard() {
this("");
}
/**
* Constructor used by UIBinder to create widgets with content.
*/
public PaperCard(String html) {
super(PaperCardElement.TAG, PaperCardElement.SRC, html);
}
/**
* Gets a handle to the Polymer object's underlying DOM element.
*/
public PaperCardElement getPolymerElement() {
return (PaperCardElement) getElement();
}
/**
* Read-only property used to pass down the animatedShadow
value to
the underlying paper-material style (since they have different names).
*
* JavaScript Info:
* @property animated
* @type Boolean
*
*/
public boolean getAnimated() {
return getPolymerElement().getAnimated();
}
/**
* Read-only property used to pass down the animatedShadow
value to
the underlying paper-material style (since they have different names).
*
* JavaScript Info:
* @property animated
* @type Boolean
*
*/
public void setAnimated(boolean value) {
getPolymerElement().setAnimated(value);
}
/**
* Set this to true to animate the card shadow when setting a new
z
value.
*
* JavaScript Info:
* @property animatedShadow
* @type Boolean
*
*/
public boolean getAnimatedShadow() {
return getPolymerElement().getAnimatedShadow();
}
/**
* Set this to true to animate the card shadow when setting a new
z
value.
*
* JavaScript Info:
* @property animatedShadow
* @type Boolean
*
*/
public void setAnimatedShadow(boolean value) {
getPolymerElement().setAnimatedShadow(value);
}
/**
* The z-depth of the card, from 0-5.
*
* JavaScript Info:
* @property elevation
* @type Number
*
*/
public double getElevation() {
return getPolymerElement().getElevation();
}
/**
* The z-depth of the card, from 0-5.
*
* JavaScript Info:
* @property elevation
* @type Number
*
*/
public void setElevation(double value) {
getPolymerElement().setElevation(value);
}
/**
* When preloadImage
is true, setting fadeImage
to true will cause the
image to fade into place.
*
* JavaScript Info:
* @property fadeImage
* @type Boolean
*
*/
public boolean getFadeImage() {
return getPolymerElement().getFadeImage();
}
/**
* When preloadImage
is true, setting fadeImage
to true will cause the
image to fade into place.
*
* JavaScript Info:
* @property fadeImage
* @type Boolean
*
*/
public void setFadeImage(boolean value) {
getPolymerElement().setFadeImage(value);
}
/**
* When true
, any change to the image url property will cause the
placeholder
image to be shown until the image is fully rendered.
*
* JavaScript Info:
* @property preloadImage
* @type Boolean
*
*/
public boolean getPreloadImage() {
return getPolymerElement().getPreloadImage();
}
/**
* When true
, any change to the image url property will cause the
placeholder
image to be shown until the image is fully rendered.
*
* JavaScript Info:
* @property preloadImage
* @type Boolean
*
*/
public void setPreloadImage(boolean value) {
getPolymerElement().setPreloadImage(value);
}
/**
* The text alternative of the card’s title image.
*
* JavaScript Info:
* @property alt
* @type String
*
*/
public String getAlt() {
return getPolymerElement().getAlt();
}
/**
* The text alternative of the card’s title image.
*
* JavaScript Info:
* @property alt
* @type String
*
*/
public void setAlt(String value) {
getPolymerElement().setAlt(value);
}
/**
* The title of the card.
*
* JavaScript Info:
* @property heading
* @type String
*
*/
public String getHeading() {
return getPolymerElement().getHeading();
}
/**
* The title of the card.
*
* JavaScript Info:
* @property heading
* @type String
*
*/
public void setHeading(String value) {
getPolymerElement().setHeading(value);
}
/**
* The url of the title image of the card.
*
* JavaScript Info:
* @property image
* @type String
*
*/
public String getImage() {
return getPolymerElement().getImage();
}
/**
* The url of the title image of the card.
*
* JavaScript Info:
* @property image
* @type String
*
*/
public void setImage(String value) {
getPolymerElement().setImage(value);
}
/**
* This image will be used as a background/placeholder until the src image has
loaded. Use of a data-URI for placeholder is encouraged for instant rendering.
*
* JavaScript Info:
* @property placeholderImage
* @type String
*
*/
public String getPlaceholderImage() {
return getPolymerElement().getPlaceholderImage();
}
/**
* This image will be used as a background/placeholder until the src image has
loaded. Use of a data-URI for placeholder is encouraged for instant rendering.
*
* JavaScript Info:
* @property placeholderImage
* @type String
*
*/
public void setPlaceholderImage(String value) {
getPolymerElement().setPlaceholderImage(value);
}
// Needed in UIBinder
/**
* The z-depth of the card, from 0-5.
*
* JavaScript Info:
* @attribute elevation
*
*/
public void setElevation(String value) {
Polymer.property(this.getPolymerElement(), "elevation", value);
}
}