|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.swing.JCWordWrap
JCWordWrap
provides a static method wrapText
, which
performs basic word-wrap logic on a String given a line width and
new line delimiter.
Constructor Summary | |
JCWordWrap()
|
Method Summary | |
static String |
replace(String text,
String oldDelimiter,
String newDelimiter)
Returns a String with each occurence of an old delimiter replaced by a new delimiter. |
static String |
wrapText(String text,
FontMetrics fm,
int width,
String delimiter,
boolean isLeftAligned)
Returns a word-wrapped String given a line width and delimiter, such as a newline. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JCWordWrap()
Method Detail |
public static String wrapText(String text, FontMetrics fm, int width, String delimiter, boolean isLeftAligned)
text
- The original text to wrapfm
- The font metrics used to decide whether text fits on a linewidth
- The width of the linedelimiter
- The delimiter to use for line wrapping.isLeftAligned
- No longer used
public static String replace(String text, String oldDelimiter, String newDelimiter)
text
- The text in which the replacement happensoldDelimiter
- The delimiter text to be replacednewDelimiter
- The new text to replace the old
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |