Class Column
Column component
Components placed in a column appear below each other. You can use this component to horizontally divide the screen into several columns.
You can set the width, offset, alignment and order of each column separately. You can change these settings globally, or depending on the current screen size. This allows you to create different views for desktop, tablet and mobile devices.
- 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
-
Method Summary
Modifier and TypeMethodDescriptionsetAlignItems
(StyleAlign... aligns) Sets column alignment.setOffset
(ColumnOffset... offsets) Sets the column offset.setOrder
(ColumnOrder... orders) Sets the order the columns are displayed in.setSize
(ColumnSize... sizes) Sets column type.boolean
writeHTML
(StringWriter writer) Creates the component's HTML equivalentMethods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, 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
-
Column
public Column()Creates an empty column. -
Column
Creates column with the specified parameters.- Parameters:
content
- A list of components to be displayed in the column
-
Column
Creates a column with the specified ID and content- Parameters:
id
- The column’s unique IDcontent
- A list of components to be displayed in the column
-
-
Method Details
-
setSize
Sets column type. If not specified, the column size is automatically determined by making the width of columns in a given row the same for all screen sizes.- Parameters:
sizes
- Column size list * Available sizes are listed in the classColumnSize
.- Returns:
- Column component
-
setAlignItems
Sets column alignment.- Parameters:
aligns
- Column alignment For the applicable content aliaments see theVerticalAlign
and theHorizontalAlign
enums.- Returns:
- Column component
-
setOrder
Sets the order the columns are displayed in. If you do not specify an order, columns are displayed in the same order they were added to the parent component.- Parameters:
orders
- A list of column display orders Available orders are listed in theColumnOrder
class.- Returns:
- Column component
-
setOffset
Sets the column offset. If you do not specify a column offset, the column is displayed aligned to the left.- Parameters:
offsets
- A list of column offsets Available offsets are listed in theColumnOffset
class.- Returns:
- Column component
-
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
.
-