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

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

public class Row
extends AbstractWingElement
implements StructuralElement


Field Summary
static String A_ROLE
          The name of the role attribute
static String E_ROW
          The name of the row element
static String ROLE_DATA
          The row (and cell) role types:
static String ROLE_HEADER
           
static String[] ROLES
          All the roles collected into one array
 
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 Row(WingContext context, String name, String role, String rend)
          Construct a new table row.
 
Method Summary
 Cell addCell()
          Add a new cell to the table.
 Cell addCell(int rows, int cols)
          Add a new cell to the table.
 Cell addCell(String role)
          Add a new cell to the table.
 Cell addCell(String name, String role, int rows, int cols, String rend)
          Add a new cell to the table.
 Cell addCell(String name, String role, String rend)
          Add a new cell to the table.
 void addCellContent(Message message)
          Add a new cell to the table.
 void addCellContent(String characters)
          Add a new cell to the table.
 void dispose()
          dispose
 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_ROW

public static final String E_ROW
The name of the row element

See Also:
Constant Field Values

A_ROLE

public static final String A_ROLE
The name of the role attribute

See Also:
Constant Field Values

ROLE_DATA

public static final String ROLE_DATA
The row (and cell) role types:

See Also:
Constant Field Values

ROLE_HEADER

public static final String ROLE_HEADER
See Also:
Constant Field Values

ROLES

public static final String[] ROLES
All the roles collected into one array

Constructor Detail

Row

protected Row(WingContext context,
              String name,
              String role,
              String rend)
       throws WingException
Construct a new table 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 - (May be null) a local identifier used to differentiate the element from its siblings.
role - (May be null) determines 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.
Throws:
WingException
Method Detail

addCell

public Cell addCell(String name,
                    String role,
                    int rows,
                    int cols,
                    String rend)
             throws WingException
Add a new cell to the table. The cell element contained in a row of a table carries content for that table. It is a character container, just like p, item, and hi, and its primary purpose is to display textual data, possibly enhanced with hyperlinks, emphasized blocks of text, images and form fields.

Parameters:
name - (May be null) a local identifier used to differentiate the element from its siblings.
role - (May be null) determines what kind of information the cell carries, either header or data. See cell.ROLES
rows - (May be zero for no defined value) determines how many rows does this cell span.
cols - (May be zero for no defined value) determines how many columns does this cell span.
rend - (May be null) a rendering hint used to override the default display of the element.
Returns:
a new table cell.
Throws:
WingException

addCell

public Cell addCell(int rows,
                    int cols)
             throws WingException
Add a new cell to the table. The cell element contained in a row of a table carries content for that table. It is a character container, just like p, item, and hi, and its primary purpose is to display textual data, possibly enhanced with hyperlinks, emphasized blocks of text, images and form fields.

Parameters:
rows - (May be zero for no defined value) determines how many rows does this cell span.
cols - (May be zero for no defined value) determines how many columns does this cell span.
Returns:
a new table cell.
Throws:
WingException

addCell

public Cell addCell(String name,
                    String role,
                    String rend)
             throws WingException
Add a new cell to the table. The cell element contained in a row of a table carries content for that table. It is a character container, just like p, item, and hi, and its primary purpose is to display textual data, possibly enhanced with hyperlinks, emphasized blocks of text, images and form fields.

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

addCell

public Cell addCell(String role)
             throws WingException
Add a new cell to the table. The cell element contained in a row of a table carries content for that table. It is a character container, just like p, item, and hi, and its primary purpose is to display textual data, possibly enhanced with hyperlinks, emphasized blocks of text, images and form fields.

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

addCell

public Cell addCell()
             throws WingException
Add a new cell to the table. The cell element contained in a row of a table carries content for that table. It is a character container, just like p, item, and hi, and its primary purpose is to display textual data, possibly enhanced with hyperlinks, emphasized blocks of text, images and form fields.

Returns:
a new table cell.
Throws:
WingException

addCellContent

public void addCellContent(String characters)
                    throws WingException
Add a new cell to the table. The cell element contained in a row of a table carries content for that table. It is a character container, just like p, item, and hi, and its primary purpose is to display textual data, possibly enhanced with hyperlinks, emphasized blocks of text, images and form fields. Once the cell has been created set the cell's contents to the provided content.

Parameters:
characters - (Required) Untranslated character data to be included.
Throws:
WingException

addCellContent

public void addCellContent(Message message)
                    throws WingException
Add a new cell to the table. The cell element contained in a row of a table carries content for that table. It is a character container, just like p, item, and hi, and its primary purpose is to display textual data, possibly enhanced with hyperlinks, emphasized blocks of text, images and form fields. Once the cell has been created set the cell's contents to the provided content.

Parameters:
message - (Required) Key to the i18n catalogue to translate the content into the language preferred by the user.
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.