Java Doc for ObjectConverterManager.java in  » Swing-Library » jide-common » com » jidesoft » converter » 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 » Swing Library » jide common » com.jidesoft.converter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jidesoft.converter.ObjectConverterManager

ObjectConverterManager
public class ObjectConverterManager (Code)
A global object that can register converter with a type and a ConverterContext.




Method Summary
public static  voidaddRegistrationListener(RegistrationListener l)
     Adds a listener to the list that's notified each time a change to the manager occurs.
public static  ObjectfromString(String string, Class clazz)
     Converts from a string to an object with type class.
public static  ObjectfromString(String string, Class clazz, ConverterContext context)
     Converts from a string to an object with type class using the converter context.
public static  ObjectConvertergetConverter(Class clazz, ConverterContext context)
     Gets the registered converter associated with class and context.
Parameters:
  clazz - the type of which the converter will be registered.
Parameters:
  context - the converter context.
public static  ObjectConvertergetConverter(Class clazz)
     Gets the converter associated with the type.
public static  ConverterContext[]getConverterContexts(Class clazz)
     Gets the available ConverterContexts registered with the class.
Parameters:
  clazz - the class.
public static  RegistrationListener[]getRegistrationListeners()
     Returns an array of all the registration listeners registered on this manager.
public static  voidinitDefaultConverter()
     Initialize default converters.
public static  booleanisAutoInit()
     Checks the value of autoInit.
public static  voidregisterConverter(Class clazz, ObjectConverter converter, ConverterContext context)
     Registers a converter with the type specified as class and a converter context specified as context.
public static  voidregisterConverter(Class clazz, ObjectConverter converter)
     Registers as the default converter with type specified as clazz.
public static  voidremoveRegistrationListener(RegistrationListener l)
     Removes a listener from the list that's notified each time a change to the manager occurs.
public static  voidresetInit()
     If ObjectConverterManager.initDefaultConverter() is called once, calling it again will have no effect because an internal flag is set.
public static  voidsetAutoInit(boolean autoInit)
     Sets autoInit to true or false.
public static  StringtoString(Object object)
     Converts an object to string using default converter context.
Parameters:
  object - object to be converted.
public static  StringtoString(Object object, Class clazz)
     Converts an object to string using default converter context.
public static  StringtoString(Object object, Class clazz, ConverterContext context)
     Converts an object to string using converter context sepcified.
public static  voidunregisterAllConverters()
     Unregisters all the converters which registered before.
public static  voidunregisterConverter(Class clazz, ConverterContext context)
     Unregisters converter associated with clazz and context.
public static  voidunregisterConverter(Class clazz)
     Unregisters converter associated with clazz.



Method Detail
addRegistrationListener
public static void addRegistrationListener(RegistrationListener l)(Code)
Adds a listener to the list that's notified each time a change to the manager occurs.
Parameters:
  l - the RegistrationListener



fromString
public static Object fromString(String string, Class clazz)(Code)
Converts from a string to an object with type class.
Parameters:
  string - the string to be converted
Parameters:
  clazz - the type to be converted to the object of type class which is converted from string



fromString
public static Object fromString(String string, Class clazz, ConverterContext context)(Code)
Converts from a string to an object with type class using the converter context.
Parameters:
  string - the string to be converted
Parameters:
  clazz - the type to be converted to
Parameters:
  context - converter context to be used the object of type class which is converted from string



getConverter
public static ObjectConverter getConverter(Class clazz, ConverterContext context)(Code)
Gets the registered converter associated with class and context.
Parameters:
  clazz - the type of which the converter will be registered.
Parameters:
  context - the converter context. the registered converter.



getConverter
public static ObjectConverter getConverter(Class clazz)(Code)
Gets the converter associated with the type.
Parameters:
  clazz - type the converter



getConverterContexts
public static ConverterContext[] getConverterContexts(Class clazz)(Code)
Gets the available ConverterContexts registered with the class.
Parameters:
  clazz - the class. the available ConverterContexts.



getRegistrationListeners
public static RegistrationListener[] getRegistrationListeners()(Code)
Returns an array of all the registration listeners registered on this manager. all of this registration's RegistrationListenersor an empty array if no registration listeners are currently registered
See Also:   ObjectConverterManager.addRegistrationListener
See Also:   ObjectConverterManager.removeRegistrationListener



initDefaultConverter
public static void initDefaultConverter()(Code)
Initialize default converters. Please make sure you call this method before you use any converter related classes. By default we register following converters.
  • registerConverter(String.class, new DefaultObjectConverter());
  • registerConverter(Integer.class, new IntegerConverter());
  • registerConverter(int.class, new IntegerConverter());
  • registerConverter(Integer.class, new NaturalNumberConverter(), NaturalNumberConverter.CONTEXT);
  • registerConverter(int.class, new NaturalNumberConverter(), NaturalNumberConverter.CONTEXT);
  • registerConverter(Long.class, new LongConverter());
  • registerConverter(long.class, new LongConverter());
  • registerConverter(Double.class, new DoubleConverter());
  • registerConverter(double.class, new DoubleConverter());
  • registerConverter(Float.class, new FloatConverter());
  • registerConverter(float.class, new FloatConverter());
  • registerConverter(Short.class, new ShortConverter());
  • registerConverter(short.class, new ShortConverter());
  • registerConverter(Rectangle.class, new RectangleConverter());
  • registerConverter(Point.class, new PointConverter());
  • registerConverter(Insets.class, new InsetsConverter());
  • registerConverter(Dimension.class, new DimensionConverter());
  • registerConverter(Boolean.class, new BooleanConverter());
  • registerConverter(boolean.class, new BooleanConverter());
  • registerConverter(File.class, new FileConverter());
  • registerConverter(String.class, new FontNameConverter(), FontNameConverter.CONTEXT);
  • registerConverter(Date.class, new DateConverter());
  • registerConverter(Calendar.class, new CalendarConverter());
  • registerConverter(Calendar.class, new MonthConverter(), MonthConverter.CONTEXT_MONTH);
  • registerConverter(Color.class, new RgbColorConverter());
  • registerConverter(Color.class, new HexColorConverter(), ColorConverter.CONTEXT_HEX);
  • registerConverter(String[].class, new StringArrayConverter());



isAutoInit
public static boolean isAutoInit()(Code)
Checks the value of autoInit. true or false.
See Also:   ObjectConverterManager.setAutoInit(boolean)



registerConverter
public static void registerConverter(Class clazz, ObjectConverter converter, ConverterContext context)(Code)
Registers a converter with the type specified as class and a converter context specified as context.
Parameters:
  clazz - the type of which the converter will registered.
Parameters:
  converter - the converter to be registered
Parameters:
  context - the converter context.



registerConverter
public static void registerConverter(Class clazz, ObjectConverter converter)(Code)
Registers as the default converter with type specified as clazz.
Parameters:
  clazz - the type of which the converter will be registered.
Parameters:
  converter - the converter to be registered



removeRegistrationListener
public static void removeRegistrationListener(RegistrationListener l)(Code)
Removes a listener from the list that's notified each time a change to the manager occurs.
Parameters:
  l - the RegistrationListener



resetInit
public static void resetInit()(Code)
If ObjectConverterManager.initDefaultConverter() is called once, calling it again will have no effect because an internal flag is set. This method will reset the internal flag so that you can call ObjectConverterManager.initDefaultConverter() in case you unresgister all converters using ObjectConverterManager.unregisterAllConverters() .



setAutoInit
public static void setAutoInit(boolean autoInit)(Code)
Sets autoInit to true or false. If autoInit is true, whenever someone tries to call methods like as toString or fromString, ObjectConverterManager.initDefaultConverter() will be called if it has never be called. By default, autoInit is true.

This might affect the behavior if users provide their own converters and want to overwrite default converters. In this case, instead of depending on autoInit to initialize default converters, you should call ObjectConverterManager.initDefaultConverter() first, then call registerConverter to add your own converters.
Parameters:
  autoInit - true or false.




toString
public static String toString(Object object)(Code)
Converts an object to string using default converter context.
Parameters:
  object - object to be converted. the string



toString
public static String toString(Object object, Class clazz)(Code)
Converts an object to string using default converter context.
Parameters:
  object - object to be converted.
Parameters:
  clazz - type of the object the string



toString
public static String toString(Object object, Class clazz, ConverterContext context)(Code)
Converts an object to string using converter context sepcified.
Parameters:
  object - object to be converted.
Parameters:
  clazz - type of the object
Parameters:
  context - converter context the string converted from object



unregisterAllConverters
public static void unregisterAllConverters()(Code)
Unregisters all the converters which registered before.



unregisterConverter
public static void unregisterConverter(Class clazz, ConverterContext context)(Code)
Unregisters converter associated with clazz and context.
Parameters:
  clazz - the type of which the converter will be unregistered.
Parameters:
  context - the converter context.



unregisterConverter
public static void unregisterConverter(Class clazz)(Code)
Unregisters converter associated with clazz.
Parameters:
  clazz - the type of which the converter will be unregistered.



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.