|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUtil.GEVAHelper
public class GEVAHelper
Some helpful methods for repeated tasks across several classes
Field Summary | |
---|---|
static java.awt.Component |
mainWindow
When showing error messages in classes that don't have direct access to a parent window, this allows them to set the parent to be the application window. |
Method Summary | |
---|---|
static void |
gridAdd(java.awt.Container container,
java.awt.Container control,
int gridX,
int gridY,
double weightX)
gridAdd(Container, Container, int, int, int, int, double, double) overload. |
static void |
gridAdd(java.awt.Container container,
java.awt.Container control,
int gridX,
int gridY,
int gridW,
int gridH,
double weightX,
double weightY)
Helper for adding a control to a GridBagLayout control |
static double |
parseDouble(java.lang.String value)
Parse a string containing a double with locale specific formatting e.g. 1.000,00 is formatted to 1000.00 and then parsed to double |
static float |
parseFloat(java.lang.String value)
Parse a string containing a float with locale specific formatting e.g. 1.000,00 is formatted to 1000.00 and then parsed to float |
static int |
parseInt(java.lang.String value)
Parse a string containing an integer with locale specific formatting. |
static java.lang.String[] |
prune(java.lang.String[] a)
Trim an array of strings so that all white-space padding is removed and any strings that contained just white-space and removed completely from the array. e.g. {" a ", " ", "b"} -> {"a", "b"} |
static java.lang.String |
quote(java.lang.String string)
Given a string, wrap it in quotes (") if that string contains spaces |
static java.lang.String[] |
trim(java.lang.String[] a)
Trim an array of strings so that all padding white-space is removed, e.g. {" a ", " ", "b"} -> {"a", "", "b"} |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.awt.Component mainWindow
Method Detail |
---|
public static java.lang.String quote(java.lang.String string)
string
- The string to wrap
public static int parseInt(java.lang.String value)
public static float parseFloat(java.lang.String value)
public static double parseDouble(java.lang.String value)
public static java.lang.String[] prune(java.lang.String[] a)
a
- An array of strings to prune
public static java.lang.String[] trim(java.lang.String[] a)
a
- An array of strings to trim
public static void gridAdd(java.awt.Container container, java.awt.Container control, int gridX, int gridY, double weightX)
container
- The control to add control tocontrol
- The control being added to containergridX
- The grid column to add the controlgridY
- The grid row to add the controlweightX
- The amount of horizontal space this column should take
relative to other columnspublic static void gridAdd(java.awt.Container container, java.awt.Container control, int gridX, int gridY, int gridW, int gridH, double weightX, double weightY)
container
- The control to add control tocontrol
- The control being added to containergridX
- The grid column to add the controlgridY
- The grid row to add the controlgridW
- The number of columns to spangridH
- The number of rows to spanweightX
- The amount of horizontal space this column should take
relative to other columnsweightY
- The amount of vertical space this column should take
relative to other rows
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |