org.openxava.web.layout
Class AbstractBasePainter

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

public abstract class AbstractBasePainter
extends java.lang.Object
implements ILayoutPainter

Base class for painters.

Author:
Juan Mendoza and Federico Alcantara

Constructor Summary
AbstractBasePainter()
           
 
Method Summary
 void finalize(View view, PageContext pageContext)
           
protected  LayoutElement getContainer()
           
protected  java.util.Stack<LayoutElement> getContainersStack()
          It is a stack of processed containers, the last element represents the current container.
protected  int getMaxColumnsOnView()
           
protected  PageContext getPageContext()
           
 LayoutPainterManager getPainterManager()
           
protected  LayoutElement getRow()
           
protected  java.util.Stack<LayoutElement> getRowsStack()
          It is a stack of processed rows, where the last element (at the top of the stack) represents the current row.
protected  View getView()
           
 void initialize(View view, PageContext pageContext)
          Starts to paint form.
protected  void setContainer(LayoutElement layoutElement)
          Sets element as the current container.
protected  void setContainersStack(java.util.Stack<LayoutElement> containersStack)
          Sets (or resets) the containers stack.
 void setPainterManager(LayoutPainterManager painterManager)
           
protected  void setRow(LayoutElement layoutElement)
          Sets the element as the current row and resets its column count to 0.
protected  void setRowsStack(java.util.Stack<LayoutElement> rowsStack)
          Sets or (resets) the row stack.
protected  void unsetContainer()
          Release current container and sets the previous one.
protected  void unsetRow()
          Release current row and sets the previous one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openxava.web.layout.ILayoutPainter
endCell, endCollection, endColumn, endFrame, endGroup, endRow, endSections, endView, startCell, startCollection, startColumn, startFrame, startGroup, startRow, startSections, startView
 

Constructor Detail

AbstractBasePainter

public AbstractBasePainter()
Method Detail

initialize

public void initialize(View view,
                       PageContext pageContext)
Description copied from interface: ILayoutPainter
Starts to paint form.

Specified by:
initialize in interface ILayoutPainter
Parameters:
view - Originating view.
pageContext - Page within the form is going to be painted.
See Also:
org.openxava.web.layout.ILayoutPainter#initialize(org.openxava.view.View, javax.servlet.jsp.PageContext)

finalize

public void finalize(View view,
                     PageContext pageContext)
Specified by:
finalize in interface ILayoutPainter

setPainterManager

public void setPainterManager(LayoutPainterManager painterManager)
Specified by:
setPainterManager in interface ILayoutPainter
See Also:
ILayoutPainter.setPainterManager(org.openxava.web.layout.LayoutPainterManager)

getPainterManager

public LayoutPainterManager getPainterManager()

getContainer

protected LayoutElement getContainer()
Returns:
Current container.

getRow

protected LayoutElement getRow()
Returns:
Current row.

setContainer

protected void setContainer(LayoutElement layoutElement)
Sets element as the current container.

Parameters:
layoutContainer. -

unsetContainer

protected void unsetContainer()
Release current container and sets the previous one.


setRow

protected void setRow(LayoutElement layoutElement)
Sets the element as the current row and resets its column count to 0.

Parameters:
layoutElement -

unsetRow

protected void unsetRow()
Release current row and sets the previous one.


getContainersStack

protected java.util.Stack<LayoutElement> getContainersStack()
It is a stack of processed containers, the last element represents the current container.

Returns:
The current container stack;

setContainersStack

protected void setContainersStack(java.util.Stack<LayoutElement> containersStack)
Sets (or resets) the containers stack.

Parameters:
containersStack - New container stack to use.

getRowsStack

protected java.util.Stack<LayoutElement> getRowsStack()
It is a stack of processed rows, where the last element (at the top of the stack) represents the current row.

Returns:
instance of row stack.

setRowsStack

protected void setRowsStack(java.util.Stack<LayoutElement> rowsStack)
Sets or (resets) the row stack.

Parameters:
rowsStack - New row stack to use.

getMaxColumnsOnView

protected int getMaxColumnsOnView()
Returns:
The maximun number of columns in the view.

getView

protected View getView()
Returns:
The current view.

getPageContext

protected PageContext getPageContext()
Returns:
The current page context.