Package org.kuali.rice.krad.uif.layout
Class BoxLayoutManager
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
org.kuali.rice.krad.uif.layout.LayoutManagerBase
org.kuali.rice.krad.uif.layout.BoxLayoutManager
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,LayoutManager,LifecycleElement
Layout manager that organizes components in a single row (horizontal) or
column (vertical)
Although a table based template could be used, setup is done to also support
a CSS based template. The items in the Container instance are
rendered sequentially wrapping each one with a span element. The padding
property can be configured to space the elements as needed. To achieve a
vertical orientation, the span style is set to block. Additional styling can
be set for the items by using the itemSpanStyle property.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUsed by the render to set the style on the span element that wraps the item.List of style classes that should be applied to each span that wraps the item in the layoutBuilds the HTML class attribute string by combining the item styleClasses list with a space delimiterIndicates whether the components should be rendered in a horizontal or vertical columnAmount of separation between each itembooleanvoidperformFinalize(Object model, LifecycleElement container) Sets the item span style The last phase before the view is renderedvoidsetItemStyle(String itemStyle) Setter for the span stylevoidsetItemStyleClasses(List<String> itemStyleClasses) Setter for the list of style classes that should apply to each item spanvoidsetOrientation(UifConstants.Orientation orientation) Setter for the orientation for layoutvoidsetPadding(String padding) Setter for the item paddingvoidsetRenderLayoutWrapper(boolean renderLayoutWrapper) Methods inherited from class org.kuali.rice.krad.uif.layout.LayoutManagerBase
addStyleClass, appendToStyle, checkMutable, clone, getAdditionalCssClasses, getContainerIdSuffix, getContext, getCssClasses, getId, getLibraryCssClasses, getPhasePathMapping, getPropertyReplacers, getStyle, getStyleClassesAsString, getSupportedContainer, getTemplate, getTemplateName, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, performInitialization, pushAllToContext, pushObjectToContext, setAdditionalCssClasses, setContainerIdSuffix, setContext, setCssClasses, setId, setLibraryCssClasses, setPhasePathMapping, setPropertyReplacers, setRender, setStyle, setStyleClasses, setTemplate, setTemplateName, setViewPath, setViewStatus, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Constructor Details
-
BoxLayoutManager
public BoxLayoutManager()
-
-
Method Details
-
performFinalize
Sets the item span style The last phase before the view is renderedHere final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classLayoutManagerBase- Parameters:
model- - top level object containing the datacontainer- - parent component
-
getOrientation
Indicates whether the components should be rendered in a horizontal or vertical column- Returns:
- orientation configured for layout
-
setOrientation
Setter for the orientation for layout- Parameters:
orientation-
-
getPadding
Amount of separation between each itemFor horizontal orientation, this will be the right padding for each item. For vertical, it will be the bottom padding for each item. The value can be a fixed length (like px) or percentage
- Returns:
- String
-
setPadding
Setter for the item padding- Parameters:
padding-
-
getItemStyle
Used by the render to set the style on the span element that wraps the item. By using a wrapping span the items can be aligned based on the orientation and given the correct padding- Returns:
- css style string
-
setItemStyle
Setter for the span style- Parameters:
itemStyle-
-
getItemStyleClasses
List of style classes that should be applied to each span that wraps the item in the layout- Returns:
- List<String>
-
setItemStyleClasses
Setter for the list of style classes that should apply to each item span -
getItemStyleClassesAsString
Builds the HTML class attribute string by combining the item styleClasses list with a space delimiter- Returns:
- class attribute string
-
isRenderLayoutWrapper
public boolean isRenderLayoutWrapper() -
setRenderLayoutWrapper
public void setRenderLayoutWrapper(boolean renderLayoutWrapper)
-