com.im.df/1 5.8

com.im.df.util
Class DFUtils

java.lang.Object
  extended by 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.


Nested Class Summary
static class DFUtils.WeakSchemaPropertyChangeAdapter
           
 
Constructor Summary
DFUtils()
           
 
Method Summary
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
static
<T> List<T>[]
computeDiff(List<? extends T> arr1, List<? extends T> arr2)
           
static Image findIcon(Object bean)
           
static Image findIcon(Object bean, int iconKind)
           
static IJCVersionProvider getIJCVersionProvider()
          Get the current IJC version number
static Properties loadPropertiesFromResource(String resource)
           
static String makeXmlPretty(Document doc)
           
static String makeXmlPretty(String xml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFUtils

public DFUtils()
Method Detail

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 test
ext - The extension to add
okExtensions - 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


com.im.df/1 5.8