|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.ui.utils.GuiUtils
public final class GuiUtils
Collection of GUI utility methods.
| Constructor Summary | |
|---|---|
GuiUtils()
|
|
| Method Summary | |
|---|---|
static JPanel |
createBoxPanel(int orientation)
Create a chartPanel with a box layout with the specified orientation. |
static JComponent |
createFiller(int width,
int height)
Create a filler component with the specified fixed size. |
static String |
formatToolTipText(String tooltip)
Format a possibly multi-line text into a a string that can be properly displayed as a tooltip.. |
static Frame |
getTopFrame(Component comp)
Retrieve the top frame ro which a component belongs. |
static ImageIcon |
loadIcon(String path)
Load and cache an icon from the file system or classpath. |
static ImageIcon |
loadIcon(String path,
boolean useCache)
Load and cache an icon from the file system or classpath. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GuiUtils()
| Method Detail |
|---|
public static JPanel createBoxPanel(int orientation)
orientation - the box orientation, one of BoxLayout.Y_AXIS or
BoxLayout.X_AXIS.
JPanel instance.public static ImageIcon loadIcon(String path)
path - the path to the icon.
ImageIcon instance, or null if the icon
could not be loaded.
public static ImageIcon loadIcon(String path,
boolean useCache)
path - - the path to the icon.useCache - - specifiies whether the icon should be retrieved from and/or put in the icon cache.
ImageIcon instance, or null if the icon
could not be loaded.
public static JComponent createFiller(int width,
int height)
width - the component's width.height - the component's height.
JComponent instance.public static String formatToolTipText(String tooltip)
tooltip - the non-formatted text of the tooltip.
public static Frame getTopFrame(Component comp)
comp - the component whose frame to retrieve.
Frame instance if it can be found, null otherwise.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||