org.dspace.app.xmlui.wing.element
Class Table

java.lang.Object
  extended by org.dspace.app.xmlui.wing.element.AbstractWingElement
      extended by org.dspace.app.xmlui.wing.element.Table
All Implemented Interfaces:
StructuralElement, WingElement

public class Table
extends AbstractWingElement
implements StructuralElement


Field Summary
static String A_COLS
          The name of the cols attribute
static String A_ROWS
          The name of the rows attribute
static String E_TABLE
          The name of the table element
 
Fields inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
context
 
Fields inherited from interface org.dspace.app.xmlui.wing.element.StructuralElement
A_ID, A_NAME, A_RENDER
 
Constructor Summary
protected Table(WingContext context, String name, int rows, int cols, String rend)
          Construct a new row.
 
Method Summary
 Row addRow()
          Add a new row to the table.
 Row addRow(String role)
          Add a new row to the table.
 Row addRow(String name, String role, String rend)
          Add a new row to the table.
 void dispose()
          dispose
 Head setHead()
          Set the head element which is the label associated with this table.
 void setHead(Message message)
          Set the head element which is the label associated with this table.
 void setHead(String characters)
          Set the head element which is the label associated with this table.
 void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
          Translate this element and all contained elements into SAX events.
 
Methods inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
endElement, endElement, getWingContext, greater, lesser, require, require, requireFalse, requireTrue, restrict, sendCharacters, setWingContext, startElement, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

E_TABLE

public static final String E_TABLE
The name of the table element

See Also:
Constant Field Values

A_ROWS

public static final String A_ROWS
The name of the rows attribute

See Also:
Constant Field Values

A_COLS

public static final String A_COLS
The name of the cols attribute

See Also:
Constant Field Values
Constructor Detail

Table

protected Table(WingContext context,
                String name,
                int rows,
                int cols,
                String rend)
         throws WingException
Construct a new row.

Parameters:
context - (Required) The context this element is contained in, such as where to route SAX events and what i18n catalogue to use.
name - (Required) a local identifier used to differentiate the element from its siblings.
rows - (Required) the number of rows in the table.
cols - (Required) the number of columns in the table.
rend - (May be null) a rendering hint used to override the default display of the element.
Throws:
WingException
Method Detail

setHead

public Head setHead()
             throws WingException
Set the head element which is the label associated with this table.

Throws:
WingException

setHead

public void setHead(String characters)
             throws WingException
Set the head element which is the label associated with this table.

Parameters:
characters - (May be null) Unprocessed characters to be included
Throws:
WingException

setHead

public void setHead(Message message)
             throws WingException
Set the head element which is the label associated with this table.

Parameters:
message - (Required) A key into the i18n catalogue for translation into the user's preferred language.
Throws:
WingException

addRow

public Row addRow(String name,
                  String role,
                  String rend)
           throws WingException
Add a new row to the table. The row element is contained inside a table and serves as a container of cell elements. A required 'role' attribute determines how the row and its cells are used.

Parameters:
name - (May be null) a local identifier used to differentiate the element from its siblings.
role - (May be null) determine what kind of information the row carries, either header or data. See row.ROLES
rend - (May be null) a rendering hint used to override the default display of the element.
Returns:
a new table row
Throws:
WingException

addRow

public Row addRow(String role)
           throws WingException
Add a new row to the table. The row element is contained inside a table and serves as a container of cell elements. A required 'role' attribute determines how the row and its cells are used.

Parameters:
role - (May be null) determines what kind of information the row carries, either header or data. See row.ROLES
Returns:
a new table row
Throws:
WingException

addRow

public Row addRow()
           throws WingException
Add a new row to the table. The row element is contained inside a table and serves as a container of cell elements.

Returns:
a new table row
Throws:
WingException

toSAX

public void toSAX(ContentHandler contentHandler,
                  LexicalHandler lexicalHandler,
                  NamespaceSupport namespaces)
           throws SAXException
Translate this element and all contained elements into SAX events. The events should be routed to the contentHandler found in the WingContext.

Specified by:
toSAX in interface WingElement
Parameters:
contentHandler - (Required) The registered contentHandler where SAX events should be routed too.
lexicalHandler - (Required) The registered lexicalHandler where lexical events (such as CDATA, DTD, etc) should be routed too.
namespaces - (Required) SAX Helper class to keep track of namespaces able to determine the correct prefix for a given namespace URI.
Throws:
SAXException

dispose

public void dispose()
dispose

Specified by:
dispose in interface WingElement
Overrides:
dispose in class AbstractWingElement


Copyright © 2012 DuraSpace. All Rights Reserved.