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:
StateHolder, SupportsMarkup, Configurable, LayoutManager

public class UIGridLayout
extends org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout
implements SupportsMarkup

Renders a GridLayout.

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

Parent Child Okay? Remarks
FIXED any combination of FIXED or PIXEL but no PROPORTIONAL okay -
FIXED any combination with at least one PROPORTIONAL wrong LayoutManager cannot compute the fixed value.
PIXEL any combination of FIXED 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 FIXED 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 org.apache.myfaces.tobago.internal.taglib.component.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 isRowOverflow()
          This attribute is a hint for the layout manager.
 void restoreState(FacesContext context, Object componentState)
           
 Object saveState(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 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 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 org.apache.myfaces.tobago.internal.component.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 org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

setMarginLeft

public void setMarginLeft(Measure marginLeft)

getMarginTop

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

Specified by:
getMarginTop in class org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

setMarginTop

public void setMarginTop(Measure marginTop)

getMarginRight

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

Specified by:
getMarginRight in class org.apache.myfaces.tobago.internal.component.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 org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

setColumns

public void setColumns(String columns)
Specified by:
setColumns in class org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

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 org.apache.myfaces.tobago.internal.component.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 org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

setRows

public void setRows(String rows)
Specified by:
setRows in class org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

getMarginBottom

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

Specified by:
getMarginBottom in class org.apache.myfaces.tobago.internal.component.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 org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

setColumnOverflow

public void setColumnOverflow(boolean columnOverflow)

getRowSpacing

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

Specified by:
getRowSpacing in class org.apache.myfaces.tobago.internal.component.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 org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout

setColumnSpacing

public void setColumnSpacing(Measure columnSpacing)

restoreState

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

saveState

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


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.