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

java.lang.Object
  extended by org.dspace.app.xmlui.wing.element.AbstractWingElement
      extended by org.dspace.app.xmlui.wing.element.Container
          extended by org.dspace.app.xmlui.wing.element.TextContainer
All Implemented Interfaces:
WingElement
Direct Known Subclasses:
Error, Figure, Head, Help, Label, Metadata, Option, RichTextContainer, Trail, Xref

public abstract class TextContainer
extends Container

A class representing all the containers that contain unformatted text, such as head, label, help, value, etc... This class may not be instantiated on it's own instead you must use one of the extending classes listed above. This abstract class implements the methods common to each of those elements.

Author:
Scott Phillips

Field Summary
 
Fields inherited from class org.dspace.app.xmlui.wing.element.Container
contents
 
Fields inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
context
 
Constructor Summary
protected TextContainer(WingContext context)
          Construct a new text container.
 
Method Summary
 void addContent(int integer)
          Add integer content to container.
 void addContent(Message message)
          Add translated content to container.
 void addContent(String characters)
          Add character content to container.
 
Methods inherited from class org.dspace.app.xmlui.wing.element.Container
dispose, toSAX
 
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
 

Constructor Detail

TextContainer

protected TextContainer(WingContext context)
                 throws WingException
Construct a new text container. This method doesn't do anything but because the inheriting abstract class mandates a constructor for this class to compile it must ensure that the parent constructor is called. Just as implementors of this class must ensure that this constructor is called, thus is the chain of life. :)

Parameters:
context - (Required) The context this element is contained in.
Throws:
WingException
Method Detail

addContent

public void addContent(String characters)
                throws WingException
Add character content to container.

Parameters:
characters - (Required) Direct content or a dictionary tag to be inserted into the element.
Throws:
WingException

addContent

public void addContent(int integer)
                throws WingException
Add integer content to container.

Parameters:
integer - (Required) Add the integer into the element's container.
Throws:
WingException

addContent

public void addContent(Message message)
                throws WingException
Add translated content to container.

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


Copyright © 2012 DuraSpace. All Rights Reserved.