org.kuali.rice.krad.uif.layout
Class CssGridLayoutManager

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.layout.LayoutManagerBase
              extended by org.kuali.rice.krad.uif.layout.CssGridLayoutManager
All Implemented Interfaces:
Serializable, DictionaryBean, UifDictionaryBean, LayoutManager

public class CssGridLayoutManager
extends LayoutManagerBase

Css Grid Layout manager is a layout manager which creates div "rows" and "cells" to replicate a table look by using div elements for its items. Items are added into rows based on their colSpan setting, while each row has a max size of 9 columns. By default, if colSpan is not set on an item, that item will take a full row.

See Also:
Serialized Form

Field Summary
protected  List<String> cellCssClassAttributes
           
protected  List<String> rowCssClassAttributes
           
protected  List<List<Component>> rows
           
 
Constructor Summary
CssGridLayoutManager()
           
 
Method Summary
protected
<T> void
copyProperties(T component)
          Copies properties for copy()
 List<String> getCellCssClassAttributes()
          List of css class HTML attribute values ordered by the order in which the cell appears
 Map<String,String> getConditionalRowCssClasses()
          The row css classes for the rows of this layout
 int getDefaultItemColSpan()
          The default cell colSpan to use for this layout (max setting, and the bean default, is 9)
 List<String> getRowCssClassAttributes()
          List of css class HTML attribute values ordered by index of row
 String getRowLayoutCssClass()
          The layout css class used by the framework to represent the row as a row visually (currently using a bootstrap class), which should not be manually reset in most situations
 List<List<Component>> getRows()
          Get the rows (which are a list of components each)
 void performFinalize(View view, Object model, Container container)
          CssGridLayoutManager's performFinalize method calculates and separates the items into rows based on their colSpan settings and the defaultItemColSpan setting
 void setConditionalRowCssClasses(Map<String,String> conditionalRowCssClasses)
          Set conditionalRowCssClasses
 void setDefaultItemColSpan(int defaultItemColSpan)
          Set the default colSpan for this layout's items
 void setRowLayoutCssClass(String rowLayoutCssClass)
          Set the rowLayoutCssClass
 
Methods inherited from class org.kuali.rice.krad.uif.layout.LayoutManagerBase
addStyleClass, appendToStyle, copy, getAdditionalCssClasses, getComponentPrototypes, getComponentsForLifecycle, getContext, getCssClasses, getId, getLibraryCssClasses, getPropertyReplacers, getStyle, getStyleClassesAsString, getSupportedContainer, getTemplate, getTemplateName, performApplyModel, performInitialization, pushAllToContext, pushObjectToContext, setAdditionalCssClasses, setContext, setCssClasses, setId, setLibraryCssClasses, setPropertyReplacers, setStyle, setStyleClasses, setTemplate, setTemplateName
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 

Field Detail

rows

protected List<List<Component>> rows

rowCssClassAttributes

protected List<String> rowCssClassAttributes

cellCssClassAttributes

protected List<String> cellCssClassAttributes
Constructor Detail

CssGridLayoutManager

public CssGridLayoutManager()
Method Detail

performFinalize

public void performFinalize(View view,
                            Object model,
                            Container container)
CssGridLayoutManager's performFinalize method calculates and separates the items into rows based on their colSpan settings and the defaultItemColSpan setting

Specified by:
performFinalize in interface LayoutManager
Overrides:
performFinalize in class LayoutManagerBase
Parameters:
view - - view instance that should be finalized for rendering
model - - top level object containing the data
container - - Container the layout manager applies to
See Also:
Component.performFinalize(org.kuali.rice.krad.uif.view.View, Object, org.kuali.rice.krad.uif.component.Component)

getRows

public List<List<Component>> getRows()
Get the rows (which are a list of components each)

Returns:
the List of Lists of Components which represents rows for this layout

getRowCssClassAttributes

public List<String> getRowCssClassAttributes()
List of css class HTML attribute values ordered by index of row

Returns:
the list of css class HTML attributes for rows

getCellCssClassAttributes

public List<String> getCellCssClassAttributes()
List of css class HTML attribute values ordered by the order in which the cell appears

Returns:
the list of css class HTML attributes for cells

getDefaultItemColSpan

public int getDefaultItemColSpan()
The default cell colSpan to use for this layout (max setting, and the bean default, is 9)

Returns:
int representing the default colSpan for cells in this layout

setDefaultItemColSpan

public void setDefaultItemColSpan(int defaultItemColSpan)
Set the default colSpan for this layout's items

Parameters:
defaultItemColSpan -

getConditionalRowCssClasses

public Map<String,String> getConditionalRowCssClasses()
The row css classes for the rows of this layout

To set a css class on all rows, use "all" as a key. To set a class for even rows, use "even" as a key, for odd rows, use "odd". Use a one-based index to target a specific row by index.

Returns:
a map which represents the css classes of the rows of this layout

setConditionalRowCssClasses

public void setConditionalRowCssClasses(Map<String,String> conditionalRowCssClasses)
Set conditionalRowCssClasses

Parameters:
conditionalRowCssClasses -

getRowLayoutCssClass

public String getRowLayoutCssClass()
The layout css class used by the framework to represent the row as a row visually (currently using a bootstrap class), which should not be manually reset in most situations

Returns:
the css structure class for the rows of this layout

setRowLayoutCssClass

public void setRowLayoutCssClass(String rowLayoutCssClass)
Set the rowLayoutCssClass

Parameters:
rowLayoutCssClass -

copyProperties

protected <T> void copyProperties(T component)
Description copied from class: DictionaryBeanBase
Copies properties for copy()

Overrides:
copyProperties in class LayoutManagerBase
Parameters:
component - base bean
See Also:
ComponentBase.copy()


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.