Java Doc for XResourceManager.java in  » XML-UI » XUI » net » xoetrope » xui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML UI » XUI » net.xoetrope.xui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.xoetrope.xui.XResourceManager

All known Subclasses:   net.xoetrope.builder.editor.XEditorResourceManager,
XResourceManager
public class XResourceManager (Code)
A class used to manage access to resources. This class wraps access to resources such as the files, images, readers and application objects such as Window and Frame references.
File access is provided so that the resource manager can determine the source of the file by searching the classpath.

Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt $Revision: 1.30 $



Field Summary
protected static  Appletapp
    
protected static  FrameappFrame
    
protected static  WindowappWindow
    
protected static  StringbasePackageName
    
protected static  Hashtablebundles
    
protected static  VectorcustomClassLoaders
    
protected static  StringdefaultEncoding
    
protected static  StringdefaultFile
    
protected  URLdocumentBase
    
protected static  HashtableimageCache
    
protected static  ResourceBundleLoaderresourceBundleLoader
    

Constructor Summary
protected  XResourceManager()
    

Method Summary
public static  voidaddCustomClassLoader(ClassLoader c)
     Add a custom class loader.
protected static  ImagecreateImage(InputStream imgStream)
     Returns an Image, or null if the path was invalid.
public static  FramegetAppFrame()
    
public static  WindowgetAppWindow()
    
public static  AppletgetApplet()
    
public  BufferedInputStreamgetBufferedInputStream(String s)
    
public  BufferedInputStreamgetBufferedInputStream(File file)
    
public static  BufferedOutputStreamgetBufferedOutputStream(String file)
    
public static  BufferedOutputStreamgetBufferedOutputStream(String file, boolean useProjectParent)
    
public static  BufferedReadergetBufferedReader(String file)
    
public static  BufferedReadergetBufferedReader(String file, String encoding)
     Gets a BufferedReader for a resource
Parameters:
  file - the resource file name
Parameters:
  encoding - the input encoding e.g.
public static  BufferedReadergetBufferedReader(File file, String encoding)
     Gets a BufferedReader for a resource
Parameters:
  file - the resource file
Parameters:
  encoding - the input encoding e.g.
public static  StringgetDefaultEncoding()
    
public  URLgetDocumentBase()
     Get the applet document base.
public static  ImagegetImage(String name)
    
public static synchronized  voidgetImage(XImageHolder holder, String name)
    
public  InputStreamgetInputStream(String fileName)
    
public  InputStreamgetInputStream(File file)
    
public static  XResourceManagergetInstance()
    
public static  OutputStreamgetOutputStream(String file)
    
public static  OutputStreamgetOutputStream(String file, boolean useProjectParent)
    
public static  StringgetPackageName()
    
public static  ResourceBundlegetResourceBundle(String name)
    
public static  ResourceBundleLoadergetResourceBundleLoader()
    
public static  StringgetStartupParam(String name)
    
public static  intgetStartupParamAsInt(String name)
    
public  URLgetUrl(String fileName)
    
public static  voidreset()
    
public static  voidsetAppFrame(Frame frame)
    
public static  voidsetAppWindow(Window window)
    
public static  voidsetApplet(Applet applet)
    
public static  voidsetDefaultEncoding(String encoding)
     Set the default file encoding (UTF8 unless modified)
See Also:    http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
Parameters:
  the - encoding e.g.
public  voidsetDefaultFile(String file)
    
public  voidsetDocumentBase(URL u)
    
public static  voidsetPackageName(String pn)
     Set the default package name.
public static  voidsetResourceBundleLoader(ResourceBundleLoader loader)
    
public static  voidsetStartupFile(String fileName)
     Sets the startup file and loads the associated resource.
protected static  Stringslashify(String path, boolean isDirectory)
    

Field Detail
app
protected static Applet app(Code)



appFrame
protected static Frame appFrame(Code)



appWindow
protected static Window appWindow(Code)



basePackageName
protected static String basePackageName(Code)



bundles
protected static Hashtable bundles(Code)



customClassLoaders
protected static Vector customClassLoaders(Code)



defaultEncoding
protected static String defaultEncoding(Code)



defaultFile
protected static String defaultFile(Code)



documentBase
protected URL documentBase(Code)



imageCache
protected static Hashtable imageCache(Code)



resourceBundleLoader
protected static ResourceBundleLoader resourceBundleLoader(Code)




Constructor Detail
XResourceManager
protected XResourceManager()(Code)
Constructs a new resource manager




Method Detail
addCustomClassLoader
public static void addCustomClassLoader(ClassLoader c)(Code)
Add a custom class loader. Customer class loaders are sometimes added to help locate resources in file structures, jars, remote locations etc...
Parameters:
  c - the classloader



createImage
protected static Image createImage(InputStream imgStream)(Code)
Returns an Image, or null if the path was invalid.



getAppFrame
public static Frame getAppFrame()(Code)
Get a areference to the applet's Frame a reference to the frame



getAppWindow
public static Window getAppWindow()(Code)
Get a reference to the application's main Window a reference to the Window



getApplet
public static Applet getApplet()(Code)
Get a reference to the applet object a reference to the applet



getBufferedInputStream
public BufferedInputStream getBufferedInputStream(String s)(Code)
Gets a buffered stream for a resource
Parameters:
  s - the resource name the input stream



getBufferedInputStream
public BufferedInputStream getBufferedInputStream(File file)(Code)
Gets a buffered stream for a file
Parameters:
  file - the file the input stream



getBufferedOutputStream
public static BufferedOutputStream getBufferedOutputStream(String file)(Code)
Gets a buffered stream for a file
Parameters:
  file - the file the output stream



getBufferedOutputStream
public static BufferedOutputStream getBufferedOutputStream(String file, boolean useProjectParent)(Code)
Gets a buffered stream for a file
Parameters:
  file - the file
Parameters:
  useProjectParent - use the projects default file specification to locate the file the output stream



getBufferedReader
public static BufferedReader getBufferedReader(String file) throws Exception(Code)
Gets a BufferedReader for a resource
Parameters:
  file - the resource file name the BufferedReader



getBufferedReader
public static BufferedReader getBufferedReader(String file, String encoding) throws Exception(Code)
Gets a BufferedReader for a resource
Parameters:
  file - the resource file name
Parameters:
  encoding - the input encoding e.g. "UTF8" or null for the defaultencoding (UTF8 unless it has been changed) the BufferedReader



getBufferedReader
public static BufferedReader getBufferedReader(File file, String encoding) throws Exception(Code)
Gets a BufferedReader for a resource
Parameters:
  file - the resource file
Parameters:
  encoding - the input encoding e.g. "UTF8" or null for the defaultencoding (UTF8 unless it has been changed) the BufferedReader



getDefaultEncoding
public static String getDefaultEncoding()(Code)
Get the default file encoding (UTF8 unless modified) the encoding



getDocumentBase
public URL getDocumentBase()(Code)
Get the applet document base. the url



getImage
public static Image getImage(String name)(Code)
Loads an image resource
Parameters:
  name - the image resource name the image



getImage
public static synchronized void getImage(XImageHolder holder, String name)(Code)
Loads an image resource in a background thread
Parameters:
  holder - the component containing to display the image
Parameters:
  name - the image resource name the image



getInputStream
public InputStream getInputStream(String fileName)(Code)
Gets a stream for a resource
Parameters:
  fileName - the resource file name the InputStream



getInputStream
public InputStream getInputStream(File file)(Code)
Gets a stream for a file
Parameters:
  file - the file the input stream



getInstance
public static XResourceManager getInstance()(Code)
Gets an instance of the resource manager the XResourceManager instance'deprecated since 1.0.3



getOutputStream
public static OutputStream getOutputStream(String file)(Code)
Gets a stream for a file
Parameters:
  file - the file the output stream



getOutputStream
public static OutputStream getOutputStream(String file, boolean useProjectParent)(Code)
Gets a stream for a file
Parameters:
  file - the file
Parameters:
  useProjectParent - use the projects default file specification to locate the file the output stream



getPackageName
public static String getPackageName()(Code)
Get the default package name the default package name



getResourceBundle
public static ResourceBundle getResourceBundle(String name)(Code)
Get a resource bundle
Parameters:
  name - the unqualified name of the resource bundle



getResourceBundleLoader
public static ResourceBundleLoader getResourceBundleLoader()(Code)
Get the resource bundle loader the loader



getStartupParam
public static String getStartupParam(String name)(Code)
Gets a startup parameter
Parameters:
  name - the paramenter name the value



getStartupParamAsInt
public static int getStartupParamAsInt(String name)(Code)
Gets a startup parameter
Parameters:
  name - the paramenter name the value



getUrl
public URL getUrl(String fileName)(Code)
Gets a URL for a resource
Parameters:
  fileName - the resource file name the InputStream



reset
public static void reset()(Code)
Reset the reference to the resourceManager singleton



setAppFrame
public static void setAppFrame(Frame frame)(Code)
Set the main Frame reference
Parameters:
  frame -



setAppWindow
public static void setAppWindow(Window window)(Code)
Set the main Window reference
Parameters:
  window -



setApplet
public static void setApplet(Applet applet)(Code)
Set tbe applet reference
Parameters:
  applet -



setDefaultEncoding
public static void setDefaultEncoding(String encoding)(Code)
Set the default file encoding (UTF8 unless modified)
See Also:    http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
Parameters:
  the - encoding e.g. "UTF8" or "ISO-8859-1"



setDefaultFile
public void setDefaultFile(String file)(Code)
Set the default file/directory specification used to locate files by the getOutputStream( String file, boolean useProjectParent ) method
Parameters:
  file - the file or directory specification



setDocumentBase
public void setDocumentBase(URL u)(Code)
Set/Record the URL from which the applet was loaded
Parameters:
  u -



setPackageName
public static void setPackageName(String pn)(Code)
Set the default package name. The default package name is used when constructing widgets.
Parameters:
  pn -



setResourceBundleLoader
public static void setResourceBundleLoader(ResourceBundleLoader loader)(Code)
Set the object to load language resource bundles
Parameters:
  loader - the new loader



setStartupFile
public static void setStartupFile(String fileName)(Code)
Sets the startup file and loads the associated resource.
Parameters:
  file - the name of the startup resource file.



slashify
protected static String slashify(String path, boolean isDirectory)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.