|
TsBiff 1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ts.biff.Util
A collection of tutti-frutti utility methods for tildeslash biff.
| Method Summary | |
static void |
beep()
Beep, FIXME: play a real sound clip instead. |
static void |
center(java.awt.Window window)
Center a window on the screen |
static java.lang.String |
colorEncode(java.awt.Color c)
Encode a Color and return a String representation of it. |
static java.lang.Object[] |
convertToArray(java.util.Vector aVector)
Returns an object array with the same values as the submitted vector |
static java.util.Vector |
convertToVector(java.lang.Object[] anArray)
|
static java.lang.String |
fontEncode(java.awt.Font f)
Encode a Font and return a String representation of it. |
static java.lang.String[] |
fontParts(java.awt.Font f)
Return a string array with font parts. |
static javax.swing.plaf.TableHeaderUI |
getNullTableHeaderUI()
Returns a TableHeaderUI object with zero Dimension. |
static java.io.File |
getUserConfigFile()
Returns a users local controlfile or null if it does not exist. |
static void |
setMargin(javax.swing.JComponent comp,
int m)
Set margins for a JComponent |
static void |
setTitleBorder(javax.swing.JComponent c,
java.lang.String t)
Set a Title border for a Component, with default margin. |
static void |
setUniversalFont(java.awt.Font f)
Hack to set application universal font for every widget. |
static void |
showAbout()
Show TsBiff about-dialog with an animated gif. |
static void |
showError(java.awt.Component comp,
java.lang.String msg)
Show an application model dialog with the submitted error message and with a parent. |
static void |
showError(java.lang.String msg)
Show an application model dialog with the submitted error message |
static void |
showInfo(java.awt.Component comp,
java.lang.String msg)
Show an application model dialog with the submitted information message and a parent component |
static void |
showInfo(java.lang.String msg)
Show an application model dialog with the submitted information message |
static boolean |
showYesNo(java.awt.Component comp,
java.lang.String title,
java.lang.String message)
Show a Yes/No dialog with the submitted message if it has already been sent. |
static boolean |
showYesNo(java.lang.String title,
java.lang.String message)
Show a Yes/No dialog with the submitted message if it has already been sent. |
static java.lang.String |
slurp(java.lang.String filename)
Returns the content of a file in a String |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void beep()
public static java.io.File getUserConfigFile()
throws ConfigException
ConfigException - On errorpublic static java.lang.Object[] convertToArray(java.util.Vector aVector)
public static java.util.Vector convertToVector(java.lang.Object[] anArray)
public static void setUniversalFont(java.awt.Font f)
f - a Font that will be application universalpublic static final void center(java.awt.Window window)
window - A Windowpublic static javax.swing.plaf.TableHeaderUI getNullTableHeaderUI()
public static void showError(java.lang.String msg)
msg - Error message to display
public static void showError(java.awt.Component comp,
java.lang.String msg)
comp - A parent to find the frame formsg - Error message to displaypublic static void showAbout()
public static void showInfo(java.awt.Component comp,
java.lang.String msg)
comp - A parent to find the frame formsg - Info message to displaypublic static void showInfo(java.lang.String msg)
msg - Info message to display
public static boolean showYesNo(java.awt.Component comp,
java.lang.String title,
java.lang.String message)
parent - parent component to center the dialog overtitle - for the dialogmessage - to display
public static boolean showYesNo(java.lang.String title,
java.lang.String message)
title - for the dialogmessage - to display
public static void setTitleBorder(javax.swing.JComponent c,
java.lang.String t)
c - componentt - a Title
public static void setMargin(javax.swing.JComponent comp,
int m)
margin - the margin will apply to all sidespublic static java.lang.String colorEncode(java.awt.Color c)
c - the Color to encodeColor.decode(java.lang.String)public static java.lang.String fontEncode(java.awt.Font f)
f - the Font to encodeFont.decode(java.lang.String)public static java.lang.String[] fontParts(java.awt.Font f)
f - the Font to split into partspublic static java.lang.String slurp(java.lang.String filename)
filename - Name of file to read (including path)
|
TsBiff 1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||