org.openxava.web.layout
Class DefaultLayoutPainter

java.lang.Object
  extended by org.openxava.web.layout.AbstractBasePainter
      extended by org.openxava.web.layout.AbstractJspPainter
          extended by org.openxava.web.layout.DefaultLayoutPainter
All Implemented Interfaces:
ILayoutPainter

public class DefaultLayoutPainter
extends AbstractJspPainter

Implements a basic Painter.

Author:
Federico Alcantara

Field Summary
 
Fields inherited from class org.openxava.web.layout.AbstractJspPainter
attributes, level
 
Constructor Summary
DefaultLayoutPainter()
           
 
Method Summary
 void endCell(LayoutElement element)
          In this implementation nothing is done at cell end.
 void endCollection(LayoutElement element)
          Actually all code is performed in the startCollection method.
 void endColumn(LayoutElement element)
          In this painter implementation the column does end the last TD.
 void endFrame(LayoutElement element)
           
 void endGroup(LayoutElement element)
          This has the same behavior as the endFrame method.
 void endRow(LayoutElement element)
           
 void endSections(LayoutElement element)
           
 void endView(LayoutElement element)
           
 void startCell(LayoutElement element)
           
 void startCollection(LayoutElement element)
          Besides the frame handling, it lets the collection.jsp to take care of the collection rendering.
 void startColumn(LayoutElement element)
          Each column does not open a table element (TD), this is done by the startCell method.
 void startFrame(LayoutElement element)
          Creates the frame.
 void startGroup(LayoutElement element)
          This has the same behavior as the startFrame method.
 void startRow(LayoutElement element)
          Actually starts a row where all the columns are painted.
 void startSections(LayoutElement element)
          Each section behave as a marker.
 void startView(LayoutElement element)
           
 
Methods inherited from class org.openxava.web.layout.AbstractJspPainter
getErrors, getRequest, getStyle, includeJspPage, write
 
Methods inherited from class org.openxava.web.layout.AbstractBasePainter
finalize, getContainer, getContainersStack, getMaxColumnsOnView, getPageContext, getPainterManager, getRow, getRowsStack, getView, initialize, setContainer, setContainersStack, setPainterManager, setRow, setRowsStack, unsetContainer, unsetRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLayoutPainter

public DefaultLayoutPainter()
Method Detail

startView

public void startView(LayoutElement element)
See Also:
ILayoutPainter.startView(org.openxava.web.layout.LayoutElement)

endView

public void endView(LayoutElement element)
See Also:
ILayoutPainter.endView(org.openxava.web.layout.LayoutElement)

startGroup

public void startGroup(LayoutElement element)
This has the same behavior as the startFrame method.

See Also:
ILayoutPainter.startGroup(org.openxava.web.layout.LayoutElement)

endGroup

public void endGroup(LayoutElement element)
This has the same behavior as the endFrame method.

See Also:
ILayoutPainter.endGroup(org.openxava.web.layout.LayoutElement)

startFrame

public void startFrame(LayoutElement element)
Creates the frame. This implementation uses the same style as the original OX design.

See Also:
ILayoutPainter.startFrame(org.openxava.web.layout.LayoutElement)

endFrame

public void endFrame(LayoutElement element)
See Also:
ILayoutPainter.endFrame(org.openxava.web.layout.LayoutElement)

startRow

public void startRow(LayoutElement element)
Actually starts a row where all the columns are painted.

See Also:
ILayoutPainter.startRow(org.openxava.web.layout.LayoutElement)

endRow

public void endRow(LayoutElement element)
See Also:
ILayoutPainter.endRow(org.openxava.web.layout.LayoutElement)

startColumn

public void startColumn(LayoutElement element)
Each column does not open a table element (TD), this is done by the startCell method. However, each column can contain more than one cell, but only three TD elements are allowed in the column, so the first cell creates one TD for the left spacer, another TD for the label and a final TD for the data and any other remaining cell of the column. By parsing contiguous cells without labels are considered as part of the column.
In this implementation columns are composed of three TD.

See Also:
ILayoutPainter.startColumn(org.openxava.web.layout.LayoutElement)

endColumn

public void endColumn(LayoutElement element)
In this painter implementation the column does end the last TD. So the cell implementation must start the first TD but NOT close the last one

See Also:
ILayoutPainter.endColumn(org.openxava.web.layout.LayoutElement)

startCell

public void startCell(LayoutElement element)
See Also:
ILayoutPainter.startCell(org.openxava.web.layout.LayoutElement)

endCell

public void endCell(LayoutElement element)
In this implementation nothing is done at cell end.

See Also:
ILayoutPainter.endCell(org.openxava.web.layout.LayoutElement)

startCollection

public void startCollection(LayoutElement element)
Besides the frame handling, it lets the collection.jsp to take care of the collection rendering.

See Also:
ILayoutPainter.startCollection(org.openxava.web.layout.LayoutElement)

endCollection

public void endCollection(LayoutElement element)
Actually all code is performed in the startCollection method. However for future implementations this might be useful for adding features to the collection that might be painted at end of the collection renderization.

See Also:
ILayoutPainter.endCollection(org.openxava.web.layout.LayoutElement)

startSections

public void startSections(LayoutElement element)
Each section behave as a marker. This is called upon section change or page reload.

See Also:
ILayoutPainter.startSections(org.openxava.web.layout.LayoutElement)

endSections

public void endSections(LayoutElement element)
See Also:
ILayoutPainter.endSections(org.openxava.web.layout.LayoutElement)