Java Doc for PropertyMap.java in  » Swing-Library » InfoNode-Tabbed-Panel » net » infonode » properties » propertymap » 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 » InfoNode Tabbed Panel » net.infonode.properties.propertymap 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.infonode.properties.propertymap.PropertyMap

All known Subclasses:   net.infonode.properties.propertymap.PropertyMapImpl,
PropertyMap
public interface PropertyMap extends ReadWritable(Code)
A property map contains values for some or all properties in a PropertyMapGroup . A property map can have any number of super maps from which property values are inherited. Super maps that are searched for values in the reverse order they were added to the property map. Property values are always set in the property map specified.

Properties of type PropertyMapProperty in the PropertyMapGroup will automatically be assigned new PropertyMap's as values. These PropertyMap's are called child maps. These property values cannot be modified.

Listeners can be added to a PropertyMap. The listeners are notified when a property value is modified in the PropertyMap or, if the property value is not overridden, one of it's super maps. A tree listener can also be added that listens for value changes in the property map, it's super maps and it's child mapss.

Property maps are created using the factory methods in PropertyMapFactory .
author:
   $Author: jesper $
version:
   $Revision: 1.20 $





Method Summary
 voidaddListener(PropertyMapListener listener)
     Adds a listener that listens for value changes in this PropertyMap.
 voidaddPropertyChangeListener(Property property, PropertyChangeListener listener)
     Adds a property listener that listens for value changes for a specific property.
 voidaddSuperMap(PropertyMap superMap)
     Adds a super map to this map. If a property value is not found in this property map, the super maps will be searched recursively.
 voidaddTreeListener(PropertyMapTreeListener listener)
     Adds a tree listener that listens for value changes in this PropertyMap or any child maps.
 voidclear(boolean recursive)
     Removes all property values in this property map.
 PropertyMapcopy(boolean copySuperMapRefs, boolean recursive)
     Creates a copy of this map.
 ObjectcreateRelativeRef(Property fromProperty, PropertyMap toMap, Property toProperty)
     Creates a relative reference from one property value to another property value.

When the value of the fromProperty is read, it will return the value of the toProperty in the toMap.

Sub maps of this property map will inherit this reference relative to themselves, ie the reference in the sub map is converted to a reference relative to the sub map if possible, otherwise the reference is the same as for the super map.

 PropertyMapgetSuperMap()
     Returns the most recently added super map.
 booleanisEmpty(boolean recursive)
     Returns true if this property map doesn't contain any property values.
 voidread(ObjectInputStream in)
     Reads property values from a stream and sets them in this map.
 voidremoveListener(PropertyMapListener listener)
     Removes a listener which was previously added with PropertyMap.addListener(PropertyMapListener) .
 voidremovePropertyChangeListener(Property property, PropertyChangeListener listener)
     Removes a previously added property listener.
 PropertyMapremoveSuperMap()
     Removes the most recently added super map.
 booleanremoveSuperMap(PropertyMap superMap)
     Removes a super map that has previously been added using PropertyMap.addSuperMap(PropertyMap) .
 voidremoveTreeListener(PropertyMapTreeListener listener)
     Removes a previously added tree listener.
 ObjectremoveValue(Property property)
     Removes a property value.
 booleanreplaceSuperMap(PropertyMap oldSuperMap, PropertyMap newSuperMap)
     Replaces a super map that has previously been added using PropertyMap.addSuperMap(PropertyMap) .
 booleanvaluesEqualTo(PropertyMap propertyMap, boolean recursive)
     Returns true if all the values in this property map is equal to the values in the given map.
 voidwrite(ObjectOutputStream out, boolean recursive)
     Serializes the serializable values of this property map.
 voidwrite(ObjectOutputStream out)
    

Serializes the serializable values of this property map.




Method Detail
addListener
void addListener(PropertyMapListener listener)(Code)
Adds a listener that listens for value changes in this PropertyMap. This listener will be notified of updates to values in this PropertyMap and super maps unless the property value is overridden.
Parameters:
  listener - the listener



addPropertyChangeListener
void addPropertyChangeListener(Property property, PropertyChangeListener listener)(Code)
Adds a property listener that listens for value changes for a specific property. This listener will be notified of value changes for the property in this PropertyMap and super maps unless the property value is overridden.
Parameters:
  property - the property to listen to changes on
Parameters:
  listener - the listener



addSuperMap
void addSuperMap(PropertyMap superMap)(Code)
Adds a super map to this map. If a property value is not found in this property map, the super maps will be searched recursively. The super map last added will be searched first.
Parameters:
  superMap - the super map



addTreeListener
void addTreeListener(PropertyMapTreeListener listener)(Code)
Adds a tree listener that listens for value changes in this PropertyMap or any child maps. This listener will be notified of updates to values in this PropertyMap, any child map recusively and super maps unless the property value is overridden.
Parameters:
  listener - the listener



clear
void clear(boolean recursive)(Code)
Removes all property values in this property map.
Parameters:
  recursive - true if child maps should be cleared recursively



copy
PropertyMap copy(boolean copySuperMapRefs, boolean recursive)(Code)
Creates a copy of this map. The method copies the values and optionally the references to super maps.
Parameters:
  copySuperMapRefs - if true, copies the references to super maps
Parameters:
  recursive - if true, copies all child maps as well a copy of this map
since:
   IDW 1.3.0



createRelativeRef
Object createRelativeRef(Property fromProperty, PropertyMap toMap, Property toProperty) throws InvalidPropertyTypeException(Code)
Creates a relative reference from one property value to another property value.

When the value of the fromProperty is read, it will return the value of the toProperty in the toMap.

Sub maps of this property map will inherit this reference relative to themselves, ie the reference in the sub map is converted to a reference relative to the sub map if possible, otherwise the reference is the same as for the super map. Here is an example:

  • Property map A contains value 5 for property X.
  • A relative reference is created in map A from property Y to property X. Getting the property value for Y in A will now return 5.
  • A property map B is created and A is added as super map to B. Note that now B.Y will reference B.X and not A.X! Getting B.X now returns 5 and B.Y also returns 5.
  • X is set to 7 in B. Getting B.Y will now return 7 as expected. Map A is unchanged and will still return 5 as value for property Y.
  • A.Y is set to 1 which destroys the reference to A.X, and also the reference B.Y -> B.X. Getting B.Y will now return 1 as it's inherited from A.Y.

Changes to the referenced property value will be propagated to listeners of this property.
Parameters:
  fromProperty - the property value that will hold the reference
Parameters:
  toMap - the property map that holds the property value that is referenced
Parameters:
  toProperty - the property which value is referenced the old value that the fromProperty had in this property map
throws:
  InvalidPropertyTypeException -




getSuperMap
PropertyMap getSuperMap()(Code)
Returns the most recently added super map. the super map



isEmpty
boolean isEmpty(boolean recursive)(Code)
Returns true if this property map doesn't contain any property values.
Parameters:
  recursive - true if child maps should be recursively checked true if this property map doesn't contain any property values



read
void read(ObjectInputStream in) throws IOException(Code)
Reads property values from a stream and sets them in this map. Will overwrite existing values, but not remove values not found in the stream. The properties are identified using their names. If no property is found for a property name read from the stream the value is skipped and no error is reported. If a value for a property in the stream is a reference to a another property value that cannot be resolved, the property is not modified.
Parameters:
  in - the stream from which to read property values
throws:
  IOException - if there is an error in the stream



removeListener
void removeListener(PropertyMapListener listener)(Code)
Removes a listener which was previously added with PropertyMap.addListener(PropertyMapListener) .
Parameters:
  listener - the listener



removePropertyChangeListener
void removePropertyChangeListener(Property property, PropertyChangeListener listener)(Code)
Removes a previously added property listener.
Parameters:
  property - the property which the listener listens to changes on
Parameters:
  listener - the listener



removeSuperMap
PropertyMap removeSuperMap()(Code)
Removes the most recently added super map. the super map removed



removeSuperMap
boolean removeSuperMap(PropertyMap superMap)(Code)
Removes a super map that has previously been added using PropertyMap.addSuperMap(PropertyMap) .
Parameters:
  superMap - the super map to remove true if the super map was found and removed, otherwise false
since:
   IDW 1.3.0



removeTreeListener
void removeTreeListener(PropertyMapTreeListener listener)(Code)
Removes a previously added tree listener.
Parameters:
  listener - the listener



removeValue
Object removeValue(Property property) throws InvalidPropertyException(Code)
Removes a property value.
Parameters:
  property - the property the value removed
throws:
  InvalidPropertyException - if values for this property can't be stored in this property map



replaceSuperMap
boolean replaceSuperMap(PropertyMap oldSuperMap, PropertyMap newSuperMap)(Code)
Replaces a super map that has previously been added using PropertyMap.addSuperMap(PropertyMap) .
Parameters:
  oldSuperMap - the super map to replace
Parameters:
  newSuperMap - the super map to replace it with true if the super map was found and replaced, otherwise false
since:
   IDW 1.3.0



valuesEqualTo
boolean valuesEqualTo(PropertyMap propertyMap, boolean recursive)(Code)
Returns true if all the values in this property map is equal to the values in the given map. The property values are compared using Object.equals .
Parameters:
  propertyMap - the map to compare values with
Parameters:
  recursive - true if child maps should be recursively checked true if all the values in this property map is equal to the values in the given map



write
void write(ObjectOutputStream out, boolean recursive) throws IOException(Code)
Serializes the serializable values of this property map. Values not implementing the java.io.Serializable interface will not be written to the stream. The properties are identified using their names.
Parameters:
  out - the stream on which to serialize this map
Parameters:
  recursive - true if child maps should be recursively serialized
throws:
  IOException - if there is an error in the stream



write
void write(ObjectOutputStream out) throws IOException(Code)

Serializes the serializable values of this property map. Values not implementing the java.io.Serializable interface will not be written to the stream. The properties are identified using their names.

This method recursively writes all child maps.


Parameters:
  out - the stream
throws:
  IOException - if there is a stream error



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