org.apache.taglibs.string
Class WordWrapTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--org.apache.taglibs.string.StringTagSupport
|
+--org.apache.taglibs.string.WordWrapTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class WordWrapTag
- extends StringTagSupport
Word-wrap a String. This involves formatting a long
String to fit within a certain character width of page.
A delimiter may be passed in to put at the end of each
line and a splitting character can be specified for when
a word has to be cut in half.
- delimiter
-
Character to put between each line.
Default is a newline character.
- width
-
Width to word wrap to.
Default is 80.
- split
-
Character to use when a word has to be split.
Default is a - character.
- Author:
- bayard@generationjava.com
- See Also:
- Serialized Form
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_TAG |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
|
Method Summary |
java.lang.String |
changeString(java.lang.String text)
Perform an operation on the passed in String. |
java.lang.String |
getDelimiter()
Get the delimiter property |
java.lang.String |
getSplit()
Get the split property |
java.lang.String |
getWidth()
Get the width property |
void |
initAttributes()
Initialise any properties to default values. |
void |
setDelimiter(java.lang.String delimiter)
Set the delimiter property |
void |
setSplit(java.lang.String split)
Set the split property |
void |
setWidth(java.lang.String width)
Set the width property |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
WordWrapTag
public WordWrapTag()
getWidth
public java.lang.String getWidth()
- Get the width property
- Returns:
- String property
setWidth
public void setWidth(java.lang.String width)
- Set the width property
- Parameters:
width - String property
getDelimiter
public java.lang.String getDelimiter()
- Get the delimiter property
- Returns:
- String property
setDelimiter
public void setDelimiter(java.lang.String delimiter)
- Set the delimiter property
- Parameters:
delimiter - String property
getSplit
public java.lang.String getSplit()
- Get the split property
- Returns:
- String property
setSplit
public void setSplit(java.lang.String split)
- Set the split property
- Parameters:
split - String property
changeString
public java.lang.String changeString(java.lang.String text)
- Description copied from class:
StringTagSupport
- Perform an operation on the passed in String.
- Overrides:
changeString in class StringTagSupport
- Following copied from class:
org.apache.taglibs.string.StringTagSupport
- Parameters:
str - String to be manipulated- Returns:
- String result of operation upon passed in String
initAttributes
public void initAttributes()
- Description copied from class:
StringTagSupport
- Initialise any properties to default values.
This method is called upon construction, and
after changeString(String) is called.
This is a default empty implementation.
- Overrides:
initAttributes in class StringTagSupport
Copyright ? 2000 Apache Software Foundation. All Rights Reserved.