Cytoscape 2.8.0 API

cytoscape.task.util
Class StringWrap

java.lang.Object
  extended by cytoscape.task.util.StringWrap

public class StringWrap
extends Object


Constructor Summary
StringWrap()
           
 
Method Summary
static String wrap(String str, int wrapLength, String newLineStr, boolean wrapLongWords)
          Wraps a single line of text, identifying words by ' '.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringWrap

public StringWrap()
Method Detail

wrap

public static String wrap(String str,
                          int wrapLength,
                          String newLineStr,
                          boolean wrapLongWords)

Wraps a single line of text, identifying words by ' '.

Leading spaces on a new line are stripped. Trailing spaces are not stripped.

 WordUtils.wrap(null, *, *, *) = null
 WordUtils.wrap("", *, *, *) = ""
 

Parameters:
str - the String to be word wrapped, may be null
wrapLength - the column to wrap the words at, less than 1 is treated as 1
newLineStr - the string to insert for a new line, null uses the system property line separator
wrapLongWords - true if long words (such as URLs) should be wrapped
Returns:
a line with newlines inserted, null if null input

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.