| java.lang.Object com.jeta.swingbuilder.gui.utils.FormDesignerUtils
FormDesignerUtils | public class FormDesignerUtils (Code) | | Some common utilities used by the form designer.
author: Jeff Tassin |
Method Summary | |
public static int | calculateValidColumnSpan(GridComponent gc, int colspan) Checks if the column span can be set on the given grid component. | public static int | calculateValidRowSpan(GridComponent gc, int rowspan) Checks if the row span can be set on the given grid component. | public static boolean | checkSpan(GridComponent gc, int colspan, int rowspan) Checks if the span can be set to the given values for the given
component. | public static void | copyFile(String dest_path, String src_path) | public static String | fastTrim(String str) Performs a fast trim on a string. | public static Object[] | getEnvVars(boolean refresh) | public static Dimension | getWindowDimension(Component window, int dluX, int dluY) Converts dialog units in the x and y to pixels. | public static boolean | isDebug() | public static boolean | isTest() | public static ImageIcon | loadImage(String imageName) Loads an image from disk. | public static void | saveForm(FormPackage fpackage, File file) Saves the specified form to the specified file. | public static void | setSpan(GridComponent gc, int colspan, int rowspan) |
calculateValidColumnSpan | public static int calculateValidColumnSpan(GridComponent gc, int colspan)(Code) | | Checks if the column span can be set on the given grid component. If the
component would extend off the form, then the resulting span that is
returned is trimed to fit.
|
calculateValidRowSpan | public static int calculateValidRowSpan(GridComponent gc, int rowspan)(Code) | | Checks if the row span can be set on the given grid component. If the
component would extend off the form, then the resulting span that is
returned is trimed to fit.
|
checkSpan | public static boolean checkSpan(GridComponent gc, int colspan, int rowspan)(Code) | | Checks if the span can be set to the given values for the given
component.
|
fastTrim | public static String fastTrim(String str)(Code) | | Performs a fast trim on a string. Note: if the string does not need
triming, then a copy is NOT created and the original string is returned.
Null is never returned from this method. If null is passed, an empty
string is returned.
|
getEnvVars | public static Object[] getEnvVars(boolean refresh)(Code) | | |
getWindowDimension | public static Dimension getWindowDimension(Component window, int dluX, int dluY)(Code) | | Converts dialog units in the x and y to pixels. This is used for
providing a consistent initial window size for growable panels.
|
isDebug | public static boolean isDebug()(Code) | | Debugging flag
|
isTest | public static boolean isTest()(Code) | | Testing flag
|
loadImage | public static ImageIcon loadImage(String imageName)(Code) | | Loads an image from disk. The image is loaded relative to the application
directory.
|
saveForm | public static void saveForm(FormPackage fpackage, File file) throws IOException, JMLException(Code) | | Saves the specified form to the specified file. If the file name ends in
.xml, the form is stored in xml format. Otherwise, it is stored in binary
form.
Parameters: fpackage - Parameters: file - throws: IOException - throws: JMLException - |
setSpan | public static void setSpan(GridComponent gc, int colspan, int rowspan)(Code) | | Sets the span on the given component
|
|
|