|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kiwi.util.KiwiUtils
This class consists of several convenience routines. These methods are all static.
Field Summary | |
static int |
blockSize
The data transfer block size. |
static EmptyBorder |
defaultBorder
A default Kiwi border (empty, 5 pixels on all sides). |
static EmptyBorder |
emptyBorder
A default Kiwi border (empty, 0 pixels on all sides). |
static Insets |
emptyInsets
Empty insets (zero pixels on all sides). |
static File |
filesystemRoot
The root of the filesystem. |
static Frame |
phantomFrame
A phantom Frame. |
Method Summary | |
static void |
busyOff(Component c)
Turn off the busy cursor. |
static void |
busyOn(Component c)
Turn on a busy cursor. |
static void |
cascadeWindow(Window parent,
Window w)
Cascade a window off of a parent window. |
static void |
cascadeWindow(Window parent,
Window w,
int offset)
Cascade a window off of a parent window. |
static void |
cascadeWindow(Window parent,
Window w,
int offsetx,
int offsety)
Cascade a window off of a parent window. |
static void |
centerWindow(Window w)
Center a window on the screen. |
static void |
centerWindow(Window parent,
Window w)
Center a window within the bounds of another window. |
static int |
deleteTree(File parent)
Recursively delete files in a directory. |
static String |
getClipboardText()
Copy text from the system clipboard. |
static Frame |
getFrameForComponent(Component c)
Get the Frame parent of a component. |
static AboutFrame |
getKiwiAboutFrame()
Get an instance to a prebuilt about window that describes the Kiwi Toolkit itself. |
static ResourceManager |
getResourceManager()
Get a reference to the internal resource manager singleton. |
static void |
paintImmediately(Component c)
Paint a component immediately. |
static byte[] |
readStreamToByteArray(InputStream input)
Read all of the data from a stream, returning the contents as a byte array. |
static OutputStream |
readStreamToStream(InputStream input,
OutputStream output)
Read all of the data from a stream, writing it to another stream. |
static String |
readStreamToString(InputStream input)
Read all of the data from a stream, returning the contents as a String . |
static void |
setClipboardText(String text)
Copy text to the system clipboard. |
static void |
sleep(int sec)
Suspend the calling thread. |
static void |
writeStringToStream(String s,
OutputStream output)
Write a string to a stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int blockSize
public static final Frame phantomFrame
public static final Insets emptyInsets
public static final EmptyBorder defaultBorder
public static final EmptyBorder emptyBorder
public static final File filesystemRoot
Method Detail |
public static final void paintImmediately(Component c)
c
- The component to repaint.public static final void cascadeWindow(Window parent, Window w, int offset)
parent
- The parent window.w
- The window to cascade.offset
- The number of pixels to offset the window by
vertically and horizontally.public static final void cascadeWindow(Window parent, Window w, int offsetx, int offsety)
parent
- The parent window.w
- The window to cascade.offsetx
- The number of pixels to offset the window by horizontally.offsety
- The number of pixels to offset the window by vertically.public static final void cascadeWindow(Window parent, Window w)
parent
- The parent window.w
- The window to cascade.public static final void centerWindow(Window w)
w
- The window to center.public static final void centerWindow(Window parent, Window w)
w
- The window to center.parent
- The window to center within.public static final void busyOn(Component c)
c
- The component whose cursor will be changed.public static final void busyOff(Component c)
c
- The component whose cursor will be changed.public static final Frame getFrameForComponent(Component c)
public static final void setClipboardText(String text)
text
- The text to copy to the clipboard.public static final String getClipboardText()
public static final ResourceManager getResourceManager()
public static final void sleep(int sec)
sec
- The number of seconds to sleep.public static final OutputStream readStreamToStream(InputStream input, OutputStream output) throws IOException
input
- The input stream.output
- The output stream.public static final String readStreamToString(InputStream input) throws IOException
String
. Note that this method is not unicode-aware.input
- The stream to read from.String
.public static final void writeStringToStream(String s, OutputStream output) throws IOException
s
- The string to write.output
- The stream to write it to.public static final byte[] readStreamToByteArray(InputStream input) throws IOException
byte
array.input
- The stream to read from.byte
array.public static final AboutFrame getKiwiAboutFrame()
public static final int deleteTree(File parent)
parent
- The parent (presumed to be a directory) of the files to
be deleted. The parent is not deleted.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |