com.ivata.mask.web.format
Class MaximumLengthFormat

java.lang.Object
  extended bycom.ivata.mask.web.format.MaximumLengthFormat
All Implemented Interfaces:
HTMLFormat

public class MaximumLengthFormat
extends java.lang.Object
implements HTMLFormat

If the text supplied is longer than the maximum line length, the text is truncated and the dots character is appended to it.

Since:
ivata masks 0.4 (2002-06-19)
Version:
$Revision: 1.3 $
Author:
Colin MacLeod colin.macleod@ivata.com

Constructor Summary
MaximumLengthFormat()
           
 
Method Summary
 java.lang.String format(java.lang.String hTMLTextParam)
           Format the string given in hTMLText to the maximum length provided by calling setMaxLength.
 java.lang.Integer getMaximumLength()
           Get the maximum string length to output when format is called.
 void setMaximumLength(java.lang.Integer maximumLengthParam)
           Set the maximum string length to output when format is called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaximumLengthFormat

public MaximumLengthFormat()
Method Detail

format

public final java.lang.String format(java.lang.String hTMLTextParam)

Format the string given in hTMLText to the maximum length provided by calling setMaxLength.

Specified by:
format in interface HTMLFormat
Parameters:
hTMLTextParam - the text to truncate
Returns:
Refer to HTMLFormat.format(java.lang.String).

getMaximumLength

public final java.lang.Integer getMaximumLength()

Get the maximum string length to output when format is called.

Returns:
the current maximum length of the string which is output, or null if no maximum has been set yet.

setMaximumLength

public final void setMaximumLength(java.lang.Integer maximumLengthParam)

Set the maximum string length to output when format is called.

Parameters:
maximumLengthParam - the new value of the maximum length to output.


Copyright © 2001-2005 ivata limited. All Rights Reserved.