public class InfoBox extends BaseDominoElement<elemental2.dom.HTMLDivElement,InfoBox> implements HasBackground<InfoBox>, org.jboss.elemento.IsElement<elemental2.dom.HTMLDivElement>
This component provides a container which allows showing information with icons and effects
Customize the component can be done by overwriting classes provided by InfoBoxStyles
For example:
InfoBox.create(Icons.ALL.shopping_cart(), "NEW ORDERS", "125");
BaseDominoElement,
HasBackground| Modifier and Type | Class and Description |
|---|---|
static class |
InfoBox.Flip
An enum representing the direction of the flip done on the icon and the title elements
|
static class |
InfoBox.HoverEffect
An enum representing the hover effect
|
BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerelement| Constructor and Description |
|---|
InfoBox(BaseIcon<?> icon,
String title) |
InfoBox(BaseIcon<?> icon,
String title,
String value) |
InfoBox(elemental2.dom.HTMLElement icon,
String title) |
InfoBox(elemental2.dom.HTMLElement icon,
String title,
String value) |
| Modifier and Type | Method and Description |
|---|---|
static InfoBox |
create(BaseIcon<?> icon,
String title)
Creates info box with icon and title
|
static InfoBox |
create(BaseIcon<?> icon,
String title,
String value)
Creates info box with icon, title and value
|
static InfoBox |
create(elemental2.dom.HTMLElement icon,
String title)
Creates info box with icon and title
|
static InfoBox |
create(elemental2.dom.HTMLElement icon,
String title,
String value)
Creates info box with icon element, title and value
|
elemental2.dom.HTMLDivElement |
element() |
InfoBox |
flip()
Changes the position of the icon and title based on the current position; i.e.
|
InfoBox |
flipLeft()
Puts the icon on the left and the title on the right
|
InfoBox |
flipRight()
Puts the icon on the right and the title on the left
|
DominoElement<elemental2.dom.HTMLDivElement> |
getIconElement() |
DominoElement<elemental2.dom.HTMLDivElement> |
getTitleElement() |
DominoElement<elemental2.dom.HTMLDivElement> |
getValueElement() |
InfoBox |
removeHoverEffect()
Removes the hover effects
|
InfoBox |
removeShadow()
Removes the shadow of the box
|
InfoBox |
setBackground(Color background) |
InfoBox |
setHoverEffect(InfoBox.HoverEffect effect)
Sets the hover effect
|
InfoBox |
setIcon(BaseIcon<?> icon)
Sets the icon
|
InfoBox |
setIcon(elemental2.dom.HTMLElement element)
Sets the icon
|
InfoBox |
setIconBackground(Color background)
Sets the background of the icon element
|
InfoBox |
setIconColor(Color color)
Sets the color of the icon
|
InfoBox |
setTitle(String title)
Sets the title
|
InfoBox |
setValue(String value)
Sets the value
|
add, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, disable, elevate, elevate, enable, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isDisabled, isEmptyElement, isEqualNode, isForceHidden, isHidden, isReadOnly, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setReadOnly, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic InfoBox(elemental2.dom.HTMLElement icon,
String title)
public static InfoBox create(BaseIcon<?> icon, String title, String value)
icon - The BaseIcontitle - the titlevalue - the valuepublic static InfoBox create(elemental2.dom.HTMLElement icon, String title, String value)
icon - The HTMLElement icontitle - the titlevalue - the valuepublic static InfoBox create(elemental2.dom.HTMLElement icon, String title)
icon - The HTMLElement icontitle - the titlepublic static InfoBox create(BaseIcon<?> icon, String title)
icon - The BaseIcontitle - the titlepublic InfoBox setBackground(Color background)
setBackground in interface HasBackground<InfoBox>background - Colorpublic InfoBox setIconBackground(Color background)
background - The Color of the iconpublic InfoBox setHoverEffect(InfoBox.HoverEffect effect)
effect - the InfoBox.HoverEffectpublic InfoBox removeHoverEffect()
public InfoBox flipLeft()
public InfoBox flipRight()
public InfoBox flip()
public InfoBox setIconColor(Color color)
color - The Color of the iconpublic InfoBox setIcon(elemental2.dom.HTMLElement element)
element - the HTMLElement iconpublic InfoBox removeShadow()
public InfoBox setValue(String value)
value - the new valuepublic InfoBox setTitle(String title)
title - the new titlepublic InfoBox setIcon(BaseIcon<?> icon)
icon - the BaseIconpublic DominoElement<elemental2.dom.HTMLDivElement> getIconElement()
public DominoElement<elemental2.dom.HTMLDivElement> getTitleElement()
public DominoElement<elemental2.dom.HTMLDivElement> getValueElement()
public elemental2.dom.HTMLDivElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLDivElement>element in class BaseDominoElement<elemental2.dom.HTMLDivElement,InfoBox>Copyright © 2019–2022 Dominokit. All rights reserved.