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


java.lang.Object
   com.jidesoft.comparator.ObjectComparatorManager

ObjectComparatorManager
public class ObjectComparatorManager (Code)
A global object that can register comparator with a type and a ComparatorContext.




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  intcompare(Object o1, Object o2)
     Compares the two objects.
public static  intcompare(Object o1, Object o2, ComparatorContext context)
     Compares the two objects.
public static  intcompare(Object o1, Object o2, Class clazz)
     Compares the two objects.
public static  intcompare(Object o1, Object o2, Class clazz, ComparatorContext context)
     Compares the two objects.
public static  ComparatorgetComparator(Class clazz)
     Gets the registered comparator associated with class and default context.
Parameters:
  clazz - the data type.
public static  ComparatorgetComparator(Class clazz, ComparatorContext context)
     Gets the comparator.
Parameters:
  clazz - the data type.
Parameters:
  context - the comparator context.
public static  ComparatorContext[]getComparatorContexts(Class clazz)
     Gets the available ComparatorContexts 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  voidinitDefaultComparator()
     Initialize default comparator.
public static  booleanisAutoInit()
     Checks the value of autoInit.
public static  voidregisterComparator(Class clazz, Comparator comparator)
    
public static  voidregisterComparator(Class clazz, Comparator comparator, ComparatorContext context)
     Registers a comparator with the type specified as class and a comparator context specified as context.
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 ObjectComparatorManager.initDefaultComparator() 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  voidunregisterAllComparators()
     Unregisters all the comparators which registered before.
public static  voidunregisterComparator(Class clazz)
     Unregisters comparator associated with clazz and context.
public static  voidunregisterComparator(Class clazz, ComparatorContext context)
     Unregisters comparator associated with clazz and context.



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



compare
public static int compare(Object o1, Object o2)(Code)
Compares the two objects. It will look up in ObjectComparatorManager to find the comparator and compare.
Parameters:
  o1 - the first object to be compared.
Parameters:
  o2 - the second object to be compared. the compare result as defined in Comparator.compare(ObjectObject)



compare
public static int compare(Object o1, Object o2, ComparatorContext context)(Code)
Compares the two objects. It will look up in ObjectComparatorManager to find the comparator and compare.
Parameters:
  o1 - the first object to be compared.
Parameters:
  o2 - the second object to be compared.
Parameters:
  context - the comparator context the compare result as defined in Comparator.compare(ObjectObject)



compare
public static int compare(Object o1, Object o2, Class clazz)(Code)
Compares the two objects. It will look up in ObjectComparatorManager to find the comparator and compare. This method needs a third parameter which is the data type. This is useful when you have two objects that have different data types but both extend the same super class. In this case, you may want the super class as the key to look up in ObjectComparatorManager.
Parameters:
  o1 - the first object to be compared.
Parameters:
  o2 - the second object to be compared.
Parameters:
  clazz - the data type of the two objects. If your two objects have the same type, you may just use ObjectComparatorManager.compare(Object,Object) methods. the compare result as defined in Comparator.compare(ObjectObject)



compare
public static int compare(Object o1, Object o2, Class clazz, ComparatorContext context)(Code)
Compares the two objects. It will look up in ObjectComparatorManager to find the comparator and compare. If it is not found, we will convert the object to string and compare the two strings.
Parameters:
  o1 - the first object to be compared.
Parameters:
  o2 - the second object to be compared.
Parameters:
  clazz - the data type of the two objects. If your two objects have the same type, you may just use ObjectComparatorManager.compare(Object,Object) methods.
Parameters:
  context - the comparator context the compare result as defined in Comparator.compare(ObjectObject)



getComparator
public static Comparator getComparator(Class clazz)(Code)
Gets the registered comparator associated with class and default context.
Parameters:
  clazz - the data type. the registered comparator.



getComparator
public static Comparator getComparator(Class clazz, ComparatorContext context)(Code)
Gets the comparator.
Parameters:
  clazz - the data type.
Parameters:
  context - the comparator context. the comparator.



getComparatorContexts
public static ComparatorContext[] getComparatorContexts(Class clazz)(Code)
Gets the available ComparatorContexts registered with the class.
Parameters:
  clazz - the class. the available ComparatorContext.



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:   ObjectComparatorManager.addRegistrationListener
See Also:   ObjectComparatorManager.removeRegistrationListener



initDefaultComparator
public static void initDefaultComparator()(Code)
Initialize default comparator. Please make sure you call this method before you use any comparator related classes such as SortableTableModel.



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



registerComparator
public static void registerComparator(Class clazz, Comparator comparator)(Code)



registerComparator
public static void registerComparator(Class clazz, Comparator comparator, ComparatorContext context)(Code)
Registers a comparator with the type specified as class and a comparator context specified as context.
Parameters:
  clazz - type.
Parameters:
  comparator - the comparator to be registered.
Parameters:
  context - the comparator context.



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 ObjectComparatorManager.initDefaultComparator() 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 ObjectComparatorManager.initDefaultComparator() in case you unresgister all comparators using ObjectComparatorManager.unregisterAllComparators() .



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, ObjectComparatorManager.initDefaultComparator() will be called if it has never be called. By default, autoInit is true.

This might affect the behavior if users provide their own comparators and want to overwrite default comparators. In this case, instead of depending on autoInit to initialize default comparators, you should call ObjectComparatorManager.initDefaultComparator() first, then call registerComparator to add your own comparators.
Parameters:
  autoInit - false if you want to disable autoInit which means you either don'twant those default comparators registered or you will call ObjectComparatorManager.initDefaultComparator() yourself.




unregisterAllComparators
public static void unregisterAllComparators()(Code)
Unregisters all the comparators which registered before.



unregisterComparator
public static void unregisterComparator(Class clazz)(Code)
Unregisters comparator associated with clazz and context.
Parameters:
  clazz - the data type.



unregisterComparator
public static void unregisterComparator(Class clazz, ComparatorContext context)(Code)
Unregisters comparator associated with clazz and context.
Parameters:
  clazz - the data type.
Parameters:
  context - the comparator context.



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.