Modifier and Type | Field and Description |
---|---|
private static Random |
_rand |
private static AboutFrame |
aboutFrame |
static int |
blockSize
The data transfer block size.
|
static Font |
boldFont
A default bold font.
|
private static Clipboard |
clipboard |
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 Insets |
firstBottomInsets
Predefined insets for first component on last line.
|
static Insets |
firstInsets
Predefined insets for first component on first or subsequent lines.
|
static Font |
italicFont
A default italic font.
|
static Insets |
lastBottomInsets
Predefined insets for last component on last line.
|
private static Cursor |
lastCursor |
static Insets |
lastInsets
Predefined insets for last component on first or subsequent lines.
|
static Point |
origin
An origin point: (0,0)
|
private static Frame |
phantomFrame
A phantom Frame.
|
static Font |
plainFont
A default plain font.
|
private static ResourceManager |
resmgr |
Modifier | Constructor and Description |
---|---|
private |
KiwiUtils() |
Modifier and Type | Method and Description |
---|---|
private static void |
_cascadeWindow(Window parent,
Window w,
int offsetx,
int offsety) |
private static void |
_positionWindow(Window w,
int x,
int y) |
static void |
busyOff(Component c)
Turn off the busy cursor.
|
static void |
busyOn(Component c)
Turn on a busy cursor.
|
static void |
cascadeWindow(Component c,
Window w)
Cascade a window off of a component's parent window.
|
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(Component c,
Window w)
Center a window within the bounds of a component's 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 Clipboard |
getClipboard()
Get a reference to the system clipboard.
|
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 Frame |
getPhantomFrame()
Get a reference to a phantom frame.
|
static ResourceManager |
getResourceManager()
Get a reference to the internal resource manager singleton.
|
static Window |
getWindowForComponent(Component c)
Get the Window parent of a component.
|
static void |
paintImmediately(Component c)
Paint a component immediately.
|
static boolean |
printWindow(Window window,
String title)
Print a hardcopy of the contents of a window.
|
static int |
randomInt(int range) |
static void |
setClipboardText(String text)
Copy text to the system clipboard.
|
static void |
setDefaultLookAndFeel()
Set the default cross-platform Look and Feel
|
static void |
setFonts(Container container,
Font font)
Recursively set the font on a container and all of its descendant
components.
|
static void |
setNativeLookAndFeel()
Set the native (system) Look and Feel
|
static void |
sleep(int sec)
Suspend the calling thread.
|
public static final int blockSize
private static Frame phantomFrame
public static final Insets emptyInsets
public static final EmptyBorder defaultBorder
public static final EmptyBorder emptyBorder
public static final Insets firstInsets
public static final Insets lastInsets
public static final Insets firstBottomInsets
public static final Insets lastBottomInsets
public static final File filesystemRoot
public static final Font italicFont
private static Cursor lastCursor
private static ResourceManager resmgr
private static AboutFrame aboutFrame
private KiwiUtils()
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 cascadeWindow(Component c, Window w)
w
- The window to cascade.c
- The component off whose parent window this window should be
cascaded. If a window cannot be found in the component hierarchy above
c
, the window is centered on the screen.private static void _cascadeWindow(Window parent, Window w, int offsetx, int offsety)
public static final void centerWindow(Window w)
w
- The window to center.private static final void _positionWindow(Window w, int x, int y)
public static final void centerWindow(Window parent, Window w)
w
- The window to center.parent
- The window to center within.public static final void centerWindow(Component c, Window w)
w
- The window to center.c
- The component within whose parent window this window should be
centered. If a window cannot be found in the component hierarchy above
c
, the window is centered on the screen.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 Window getWindowForComponent(Component c)
public static final boolean printWindow(Window window, String title)
window
- The window to print.title
- A title for the print job.true
if the print job was started, or
false
if the user cancelled the print dialog.public static final Clipboard getClipboard()
public static final void setClipboardText(String text)
text
- The text to copy to the clipboard.public static final String getClipboardText()
null
if the
clipboard is empty or does not contain plain text.public static final ResourceManager getResourceManager()
public static final void sleep(int sec)
sec
- The number of seconds to sleep.public static final Frame getPhantomFrame()
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.public static void setFonts(Container container, Font font)
container
- The container.font
- The new font.public static void setDefaultLookAndFeel()
public static void setNativeLookAndFeel()
public static int randomInt(int range)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses