Package com.jbstrap.ui.components.card
Class CardDeck
This component is a special layout for the Card components. You can only add Card components to a CardDeck. Cards added to a CardDeck component are displayed with minimum spacing next to each other,
if the screen size allows. On a small screen, Card components added to a CardDeck are displayed below each other.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
ConstructorDescriptionCardDeck()
Creates an empty CardDeck component.Creates a CardDeck component with the specified cards.Creates an empty CardDeck component with the specified unique ID.Creates a CardDeck component with the specified unique ID and cards. -
Method Summary
Modifier and TypeMethodDescriptionaddComponent
(Component<?> component) Adds a Card component to the CardDeck.setAlignItems
(StyleAlign... aligns) Sets the row content aligament.boolean
writeHTML
(StringWriter writer) Creates the component's HTML equivalentMethods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, afterDraw, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getName, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, init, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, isVisible, onHide, onHotKeyEventHandler, onShow, openTag, redraw, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEnabled, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setMargin, setName, setOverflow, setPadding, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setVisible, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
-
Constructor Details
-
CardDeck
public CardDeck()Creates an empty CardDeck component. -
CardDeck
Creates an empty CardDeck component with the specified unique ID.- Parameters:
id
- Unique component ID
-
CardDeck
Creates a CardDeck component with the specified cards.- Parameters:
cards
- Cards to be added to a CardDeck Ifnull
is specified, no cards are added to the component (but you can add them later).
-
CardDeck
Creates a CardDeck component with the specified unique ID and cards.- Parameters:
id
- Unique component IDcards
- Cards to be added to a CardDeck Ifnull
is specified, no cards are added to the component (but you can add them later).
-
-
Method Details
-
addComponent
Adds a Card component to the CardDeck.- Overrides:
addComponent
in classComponent<CardDeck>
- Parameters:
component
- The component to be added- Returns:
- The component
- Throws:
IllegalArgumentException
- Thrown if the specified component does not extend the Card class
-
writeHTML
Description copied from class:Component
Creates the component's HTML equivalentThis method doesn't need to be used during application development. This method is used when developing a custom component. When creating a custom component, this method needs to be implemented. In the parameter (
StringWriter
class) the component's HTML equivalent must be specified, and the method has to return with a Boolean value. This boolean value determines if the component was drawn. If the user doesn't have access right to the component, or if the component couldn't be drawn, it should return withfalse
. Otherwise, it must return withtrue
. -
setAlignItems
Sets the row content aligament.- Parameters:
aligns
- The aligaments. For the applicable content aliaments see theVerticalAlign
and theHorizontalAlign
enums.- Returns:
- The row component
-