org.apache.myfaces.tobago.component
Class UIGridLayout

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.apache.myfaces.tobago.internal.component.AbstractUILayoutBase
              extended by org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout
                  extended by org.apache.myfaces.tobago.component.UIGridLayout
All Implemented Interfaces:
javax.faces.component.StateHolder, SupportsMarkup, Configurable, LayoutManager

public class UIGridLayout
extends AbstractUIGridLayout
implements SupportsMarkup

Renders a GridLayout.

  columns/rows ::= LAYOUT
  LAYOUT       ::= TOKEN [";" TOKEN]+
  TOKEN        ::= AUTO | PIXEL | PROPORTIONAL
  AUTO         ::= "auto" | "fixed"
  PIXEL        ::= NUMBER "px"
  PROPORTIONAL ::= [NUMBER] "*"
  

Parent Child Okay? Remarks
AUTO any combination of AUTO or PIXEL but no PROPORTIONAL okay -
AUTO any combination with at least one PROPORTIONAL wrong LayoutManager cannot compute the auto value.
PIXEL any combination of AUTO or PIXEL but no PROPORTIONAL potentially wrong The values depend on each other, the programmer has to keep consistency manually.
PIXEL any combination with at least one PROPORTIONAL okay -
PROPORTIONAL any combination of AUTO or PIXEL but no PROPORTIONAL potentially wrong No automatic matching:
  • too little space: scroll bar
  • too much space: elements will be spread.
PROPORTIONAL any combination with at least one PROPORTIONAL okay -
UIComponent class, generated from template component1.2.stg with class GridLayoutTagDeclaration.


Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
UIGridLayout()
           
 
Method Summary
 String getBorder()
          Border size of this component.
 Measure getCellspacing()
          Deprecated.  
 String getColumns()
          This value defines the layout constraints for column layout.
 Measure getColumnSpacing()
          Spacing between the columns in the actual layout.
 Markup getCurrentMarkup()
           
 String getFamily()
           
 Measure getMargin()
          Margin between container component and the children.
 Measure getMarginBottom()
          Bottom margin between container component and the children.
 Measure getMarginLeft()
          Left margin between container component and the children.
 Measure getMarginRight()
          Right margin between container component and the children.
 Measure getMarginTop()
          Top margin between container component and the children.
 Markup getMarkup()
           
 String getRows()
          This value defines the layout constraints for column layout.
 Measure getRowSpacing()
          Spacing between the rows in the actual layout.
 boolean isColumnOverflow()
          This attribute is a hint for the layout manager.
 boolean isRigid()
          This attribute advises the layout manager, to not use space that comes from non rendered components.
 boolean isRowOverflow()
          This attribute is a hint for the layout manager.
 void restoreState(javax.faces.context.FacesContext context, Object componentState)
           
 Object saveState(javax.faces.context.FacesContext context)
           
 void setBorder(String border)
           
 void setCellspacing(Measure cellspacing)
          Deprecated. 
 void setColumnOverflow(boolean columnOverflow)
           
 void setColumns(String columns)
           
 void setColumnSpacing(Measure columnSpacing)
           
 void setCurrentMarkup(Markup currentMarkup)
           
 void setMargin(Measure margin)
           
 void setMarginBottom(Measure marginBottom)
           
 void setMarginLeft(Measure marginLeft)
           
 void setMarginRight(Measure marginRight)
           
 void setMarginTop(Measure marginTop)
           
 void setMarkup(Markup markup)
           
 void setRigid(boolean rigid)
           
 void setRowOverflow(boolean rowOverflow)
           
 void setRows(String rows)
           
 void setRowSpacing(Measure rowSpacing)
           
 
Methods inherited from class org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout
fixRelativeInsideAuto, getMarginBegin, getMarginEnd, getRendersChildren, getSpacing, init, mainProcessing, postProcessing, preProcessing, toString, toString
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.tobago.config.Configurable
getRendererType
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

UIGridLayout

public UIGridLayout()
Method Detail

getFamily

public String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

isRowOverflow

public boolean isRowOverflow()
This attribute is a hint for the layout manager. Should not be used in most cases.

Specified by:
isRowOverflow in class AbstractUIGridLayout

setRowOverflow

public void setRowOverflow(boolean rowOverflow)

getMarkup

public Markup getMarkup()
Specified by:
getMarkup in interface SupportsMarkup

setMarkup

public void setMarkup(Markup markup)
Specified by:
setMarkup in interface SupportsMarkup

getMarginLeft

public Measure getMarginLeft()
Left margin between container component and the children.

Specified by:
getMarginLeft in class AbstractUIGridLayout

setMarginLeft

public void setMarginLeft(Measure marginLeft)

getMarginTop

public Measure getMarginTop()
Top margin between container component and the children.

Specified by:
getMarginTop in class AbstractUIGridLayout

setMarginTop

public void setMarginTop(Measure marginTop)

getMarginRight

public Measure getMarginRight()
Right margin between container component and the children.

Specified by:
getMarginRight in class AbstractUIGridLayout

setMarginRight

public void setMarginRight(Measure marginRight)

getColumns

public String getColumns()
This value defines the layout constraints for column layout. It is a semicolon separated list of layout tokens '[<n>]*', '<n>px' or 'auto'. Where <n> is a non negative integer and the square brackets means optional. Example: '2*;*;100px;auto'.
Default: 1*

Specified by:
getColumns in class AbstractUIGridLayout

setColumns

public void setColumns(String columns)
Specified by:
setColumns in class AbstractUIGridLayout

isRigid

public boolean isRigid()
This attribute advises the layout manager, to not use space that comes from non rendered components.

Specified by:
isRigid in class AbstractUIGridLayout

setRigid

public void setRigid(boolean rigid)

getCellspacing

@Deprecated
public Measure getCellspacing()
Deprecated. 

Spacing between component and layout cell's. Can be overwritten by columnSpacing and rowSpacing.

Specified by:
getCellspacing in class AbstractUIGridLayout

setCellspacing

@Deprecated
public void setCellspacing(Measure cellspacing)
Deprecated. 


getRows

public String getRows()
This value defines the layout constraints for column layout. It is a semicolon separated list of layout tokens '[<n>]*', '<n>px' or 'auto'. Where <n> is a non negative integer and the square brackets means optional. Example: '2*;*;100px;auto'.
Default: 1*

Specified by:
getRows in class AbstractUIGridLayout

setRows

public void setRows(String rows)
Specified by:
setRows in class AbstractUIGridLayout

getMarginBottom

public Measure getMarginBottom()
Bottom margin between container component and the children.

Specified by:
getMarginBottom in class AbstractUIGridLayout

setMarginBottom

public void setMarginBottom(Measure marginBottom)

isColumnOverflow

public boolean isColumnOverflow()
This attribute is a hint for the layout manager. Should not be used in most cases.

Specified by:
isColumnOverflow in class AbstractUIGridLayout

setColumnOverflow

public void setColumnOverflow(boolean columnOverflow)

getRowSpacing

public Measure getRowSpacing()
Spacing between the rows in the actual layout.

Specified by:
getRowSpacing in class AbstractUIGridLayout

setRowSpacing

public void setRowSpacing(Measure rowSpacing)

getCurrentMarkup

public Markup getCurrentMarkup()
Specified by:
getCurrentMarkup in interface SupportsMarkup
Specified by:
getCurrentMarkup in interface Configurable

setCurrentMarkup

public void setCurrentMarkup(Markup currentMarkup)
Specified by:
setCurrentMarkup in interface SupportsMarkup

getMargin

public Measure getMargin()
Margin between container component and the children.


setMargin

public void setMargin(Measure margin)

getBorder

public String getBorder()
Border size of this component.


setBorder

public void setBorder(String border)

getColumnSpacing

public Measure getColumnSpacing()
Spacing between the columns in the actual layout.

Specified by:
getColumnSpacing in class AbstractUIGridLayout

setColumnSpacing

public void setColumnSpacing(Measure columnSpacing)

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object componentState)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.