abbot.editor.widgets
Class TextFormat

java.lang.Object
  extended by abbot.editor.widgets.TextFormat

public class TextFormat
extends Object

Provides text formatting utilities.


Field Summary
static int DIALOG_WRAP
           
static int TOOLTIP_WRAP
           
 
Constructor Summary
TextFormat()
           
 
Method Summary
static String dialog(String msg)
          Emit html, suitably line-wrapped and formatted for a dialog.
static String tooltip(String tip)
          Emit html, suitably line-wrapped and formatted for a tool tip.
static String wordBreak(String phrase)
          Turns "SomeRunTogetherWords" into "Some Run Together Words".
static String wordWrap(String msg, int wrapAt, String lineSep)
          Wrap the given text at the given number of characters per line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOOLTIP_WRAP

public static final int TOOLTIP_WRAP
See Also:
Constant Field Values

DIALOG_WRAP

public static final int DIALOG_WRAP
See Also:
Constant Field Values
Constructor Detail

TextFormat

public TextFormat()
Method Detail

wordBreak

public static String wordBreak(String phrase)
Turns "SomeRunTogetherWords" into "Some Run Together Words".


wordWrap

public static String wordWrap(String msg,
                              int wrapAt,
                              String lineSep)
Wrap the given text at the given number of characters per line. Whitespace may be compressed.


tooltip

public static String tooltip(String tip)
Emit html, suitably line-wrapped and formatted for a tool tip.


dialog

public static String dialog(String msg)
Emit html, suitably line-wrapped and formatted for a dialog.



Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge