com.japisoft.framework.app.toolkit
Class Toolkit
java.lang.Object
com.japisoft.framework.app.toolkit.Toolkit
- public class Toolkit
- extends java.lang.Object
Various facilities like :
Managing icons, file encoding, template
- Version:
- 1.0
- Author:
- (c) 2004 JAPISoft / http://www.japisoft.com
|
Nested Class Summary |
static class |
Toolkit.EmptyIcon
Empty icon for alignment on popup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_ENCODING
public static java.lang.String[] FILE_ENCODING
Toolkit
public Toolkit()
getImageIcon
public static javax.swing.Icon getImageIcon(java.lang.String location)
getImageIcon
public static javax.swing.Icon getImageIcon(java.lang.String location,
boolean defaultEmptyImage)
getCurrentFileEncoding
public static java.lang.String getCurrentFileEncoding()
- It uses the preference file/rw-encoding
getReaderForFile
public static java.io.Reader getReaderForFile(java.io.File fileName)
throws java.io.IOException
- Throws:
java.io.IOException
getReaderForFile
public static java.io.Reader getReaderForFile(java.io.File fileName,
java.lang.String encoding)
throws java.io.IOException
- Throws:
java.io.IOException
getReaderForFile
public static java.io.Reader getReaderForFile(java.lang.String fileName)
throws java.io.IOException
- Throws:
java.io.IOException
getWriterForFile
public static java.io.Writer getWriterForFile(java.io.File fileName,
java.lang.String encoding)
throws java.io.IOException
- Throws:
java.io.IOException
getWriterForFile
public static java.io.Writer getWriterForFile(java.io.File fileName)
throws java.io.IOException
- Throws:
java.io.IOException
getEncodedString
public static java.lang.String getEncodedString(byte[] data)
throws java.io.IOException
- Throws:
java.io.IOException
getContentFromFileName
public static java.lang.String getContentFromFileName(java.lang.String fileName)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getContentFromInputStream
public static java.lang.String getContentFromInputStream(java.io.InputStream input)
throws java.lang.Throwable
- It uses the default file encoding from the preference file/rw-encoding
- Throws:
java.lang.Throwable
getContentFromInputStream
public static java.lang.String getContentFromInputStream(java.io.InputStream input,
java.lang.String encoding)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getPathForObject
public static java.lang.String getPathForObject(java.lang.String resource)
- Retreive an initial resource location using this resource name
toURL
public static java.lang.String toURL(java.io.File f)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
removeDirectoryAndContent
public static boolean removeDirectoryAndContent(java.io.File dir)
resolve
public static java.lang.String resolve(java.util.Hashtable ht,
java.lang.String template)
throws java.lang.Exception
- Throws:
java.lang.Exception
getDefaultImage
public static javax.swing.Icon getDefaultImage()