|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.spaz.util.ToolBox
public class ToolBox
A class with misc. static utility methods.
Constructor Summary | |
---|---|
ToolBox()
|
Method Summary | |
---|---|
static void |
centerFrame(java.awt.Window frame)
Centers a given frame on the screen. |
static boolean |
deleteDir(java.io.File dir)
Recursively delete a directory |
static void |
downloadBinary(java.net.URL fromURL,
java.io.File toFile)
Download a URL to a file |
static javax.swing.JDialog |
getDialog(javax.swing.JFrame parent,
java.lang.String title,
javax.swing.JComponent content)
Handy dandy method to pop up a quick and easy Dialog. |
static java.io.File |
getUserAppDirectory(java.lang.String appname)
|
static java.io.File |
getUserDirectory()
Get the system specific user data directory. |
static boolean |
isMacOSX()
Returns true if we are currently running on Mac OS X |
static void |
sleep(int tix)
Sleep for some amount of time. |
static byte[] |
uncompress(byte[] data)
Decompress a byte array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToolBox()
Method Detail |
---|
public static java.io.File getUserDirectory()
public static java.io.File getUserAppDirectory(java.lang.String appname)
public static boolean isMacOSX()
public static byte[] uncompress(byte[] data)
data
- the compressed bytes
public static void downloadBinary(java.net.URL fromURL, java.io.File toFile) throws java.io.IOException
fromURL
- toFile
-
java.io.IOException
public static boolean deleteDir(java.io.File dir)
dir
- The directory to delete.
true
if the delete succeeded, false
if it failed at some point.public static javax.swing.JDialog getDialog(javax.swing.JFrame parent, java.lang.String title, javax.swing.JComponent content)
parent
- the parent frametitle
- the dialog titlecontent
- the dialog content panel
public static void sleep(int tix)
tix
- milliseconds to sleep.public static void centerFrame(java.awt.Window frame)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |