org.enhydra.barracuda.core.comp
Class DefaultTableView

java.lang.Object
  |
  +--org.enhydra.barracuda.core.comp.DefaultView
        |
        +--org.enhydra.barracuda.core.comp.DefaultTableView
All Implemented Interfaces:
java.lang.Cloneable, TableView, View

public class DefaultTableView
extends DefaultView
implements TableView

This class provides the default implementation for a TableView. It provides a View for components to render themselves in. Unlike other views, the TableView provides convenience methods to access the header, body, and footer elements of the view.


Field Summary
protected  org.w3c.dom.Element body
           
protected  org.w3c.dom.Element footer
           
protected  org.w3c.dom.Element header
           
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.enhydra.barracuda.core.comp.DefaultView
localFactory, node, templateNodes
 
Constructor Summary
DefaultTableView()
          Public noargs constructor.
DefaultTableView(org.w3c.dom.Node node)
          Create a view and bind it to a node.
 
Method Summary
protected  void customSearchForTemplates(org.w3c.dom.Node curnode)
          Here we are going to look for custom header, footer, and body elements
 org.w3c.dom.Element getBodyElement()
          Get the body element from the particular Node that backs this view.
 org.w3c.dom.Element getFooterElement()
          Get the footer element from the particular Node that backs this view.
 org.w3c.dom.Element getHeaderElement()
          Get the header element from the particular Node that backs this view.
 java.lang.String toString()
          Get a String describing the view
 
Methods inherited from class org.enhydra.barracuda.core.comp.DefaultView
clone, getElementFactory, getName, getNode, searchForTemplates, setName, setNode
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.enhydra.barracuda.core.comp.View
clone, getElementFactory, getName, getNode, setName, setNode
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

header

protected org.w3c.dom.Element header

body

protected org.w3c.dom.Element body

footer

protected org.w3c.dom.Element footer
Constructor Detail

DefaultTableView

public DefaultTableView()
Public noargs constructor. This creates a view which is not bound to any particular node. You must bind the view to a node before you can actually use it for anything


DefaultTableView

public DefaultTableView(org.w3c.dom.Node node)
Create a view and bind it to a node.

Parameters:
node - the node the view should be bound to
Method Detail

getHeaderElement

public org.w3c.dom.Element getHeaderElement()
Get the header element from the particular Node that backs this view.

Specified by:
getHeaderElement in interface TableView
Returns:
the header element (may be null if there is no recognized header)

getBodyElement

public org.w3c.dom.Element getBodyElement()
Get the body element from the particular Node that backs this view. There will always be a body element. It will either correspond to the element or to the entire table (ie. the whole table is body)

Specified by:
getBodyElement in interface TableView
Returns:
the body element

getFooterElement

public org.w3c.dom.Element getFooterElement()
Get the footer element from the particular Node that backs this view.

Specified by:
getFooterElement in interface TableView
Returns:
the footer element (may be null if there is no recognized footer)

customSearchForTemplates

protected void customSearchForTemplates(org.w3c.dom.Node curnode)
Here we are going to look for custom header, footer, and body elements

Overrides:
customSearchForTemplates in class DefaultView

toString

public java.lang.String toString()
Description copied from class: DefaultView
Get a String describing the view

Overrides:
toString in class DefaultView


Copyright © 2001 Enhydra.org