com.im.df.util
Class DFUtils
java.lang.Object
com.im.df.util.DFUtils
public class DFUtils
- extends Object
Class collecting a few generic static utilities methods.
The SQL handling utilities will be moved out of this class so that they can be
Database dependent.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DFUtils
public DFUtils()
findIcon
public static Image findIcon(Object bean)
- Returns:
- An image object representing the ICON_COLOR_16x16 icon. May
return null if no suitable icon is available.
findIcon
public static Image findIcon(Object bean,
int iconKind)
- Parameters:
iconKind - The kind of icon requested. This should be
one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32,
ICON_MONO_16x16, or ICON_MONO_32x32 (see BeanInfo)
- Returns:
- An image object representing the requested icon. May
return null if no suitable icon is available.
makeXmlPretty
public static String makeXmlPretty(String xml)
makeXmlPretty
public static String makeXmlPretty(Document doc)
computeDiff
public static <T> List<T>[] computeDiff(List<? extends T> arr1,
List<? extends T> arr2)
addFileExtensionIfNeeded
public static String addFileExtensionIfNeeded(String fileName,
String ext,
String[] okExtensions)
- Add the file extension to the file name if it does not already have an acceptable extension
- Parameters:
fileName - The file name to testext - The extension to addokExtensions - The e xtensions that are accpetable
- Returns:
- The corrected file name
loadPropertiesFromResource
public static Properties loadPropertiesFromResource(String resource)
throws IOException
- Throws:
IOException
getIJCVersionProvider
public static IJCVersionProvider getIJCVersionProvider()
- Get the current IJC version number