OOP FormGenerator Version 2.1

com.oopreserch.web
Class BreakForHtml

java.lang.Object
  |
  +--com.oopreserch.web.BreakForHtml
All Implemented Interfaces:
FormValueBreaker

public class BreakForHtml
extends java.lang.Object
implements FormValueBreaker

The implementation of FormValueBreaker interface. Replace the line separators with the tags for line break.

If the String with the line separators is inserted into the HTML or HDML tags, the inserted String will be shown without any line breaks on the web browser. To be shown with lines breaks, the line separators in the String must be replaced with the tags for lines break (<br>), before it is inserted into the HTML or HDML tags. And this is the responsibility of this class.

The implementations for XHTML and WML is also included in this package. It is:


All the available implementations of this interface must be defined in: In this property resource file, the value is the fully qualified class name of each implementation. The corresponding key is the arbitrary String, and you can specify it as the value of break.type attribute in d.value element in the source XML. For details about this property resource file, please look into FormValueBreakerFactory.

Author:
Jun Inamori

Constructor Summary
BreakForHtml()
           
 
Method Summary
 java.lang.String getBreaked(java.lang.String str)
          Replace the line separators with the tags for line break, <br>.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreakForHtml

public BreakForHtml()
Method Detail

getBreaked

public java.lang.String getBreaked(java.lang.String str)
Replace the line separators with the tags for line break, <br>.
Specified by:
getBreaked in interface FormValueBreaker
Parameters:
str - The original String.
Returns:
The String in which the line separators were replaced with the tags for line breaks.

OOP FormGenerator Version 2.1

ALL CONTENTS COPYRIGHT 2002, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.