|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ehsbe.commons.gui.util.SwingUtilities2
public class SwingUtilities2
Wrapper around sun.swing.SwingUtilities2
| Constructor Summary | |
|---|---|
SwingUtilities2()
|
|
| Method Summary | |
|---|---|
static String |
clipString(FontMetrics fm,
String string,
int availTextWidth)
Clips the passed in String to the space provided. |
static String |
clipStringIfNecessary(FontMetrics fm,
String string,
int availTextWidth)
Clips the passed in String to the space provided. |
static FontRenderContext |
getFontRenderContext(Component c)
Get the FontRenderContext associated with the given JComponent |
static void |
invokeLater(Runnable r)
Runs the given runnable immediately, if invoked from the event dispatch thread (EDT), otherwise the runnable gets pushed into the EDT queue. |
static int |
stringWidth(FontMetrics fm,
String string)
Get the width of the passed in String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwingUtilities2()
| Method Detail |
|---|
public static FontRenderContext getFontRenderContext(Component c)
c - for which component the FRC should be fetched
null valueJComponent.getFontMetrics(java.awt.Font)
public static int stringWidth(FontMetrics fm,
String string)
fm - FontMetrics used to measure the String widthstring - String to get the width of
public static String clipString(FontMetrics fm,
String string,
int availTextWidth)
fm - FontMetrics used to measure the String widthstring - String to displayavailTextWidth - Amount of space that the string can be drawn in
public static String clipStringIfNecessary(FontMetrics fm,
String string,
int availTextWidth)
fm - FontMetrics used to measure the String widthstring - String to displayavailTextWidth - Amount of space that the string can be drawn in
public static void invokeLater(Runnable r)
r - runnable to run/dispatch
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||