edu.uci.ics.jung.visualization.util
Class LabelWrapper

java.lang.Object
  extended by edu.uci.ics.jung.visualization.util.LabelWrapper
All Implemented Interfaces:
org.apache.commons.collections15.Transformer<String,String>

public class LabelWrapper
extends Object
implements org.apache.commons.collections15.Transformer<String,String>

A utility to wrap long lines, creating html strings with line breaks at a settable max line length

Author:
Tom Nelson - tomnelson@dev.java.net

Field Summary
static String breaker
           
 
Constructor Summary
LabelWrapper()
          Create an instance with default line break length = 10
LabelWrapper(int lineLength)
          Create an instance with passed line break length
 
Method Summary
static void main(String[] args)
           
 String transform(String str)
          call 'wrap' to transform the passed String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

breaker

public static final String breaker
See Also:
Constant Field Values
Constructor Detail

LabelWrapper

public LabelWrapper()
Create an instance with default line break length = 10


LabelWrapper

public LabelWrapper(int lineLength)
Create an instance with passed line break length

Parameters:
lineLength - the max length for lines
Method Detail

transform

public String transform(String str)
call 'wrap' to transform the passed String

Specified by:
transform in interface org.apache.commons.collections15.Transformer<String,String>

main

public static void main(String[] args)


Copyright © 2009. All Rights Reserved.