Java Doc for ConfigurableComponent.java in  » Science » Cougaar12_4 » org » cougaar » tools » csmart » core » property » 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 » Science » Cougaar12_4 » org.cougaar.tools.csmart.core.property 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.tools.csmart.core.property.ConfigurableComponent

All known Subclasses:   org.cougaar.tools.csmart.core.property.ModifiableConfigurableComponent,
ConfigurableComponent
abstract public class ConfigurableComponent implements BaseComponent,ConfigurableComponentListener(Code)
This is the default configurable component implementation. It implements all methods that define, name, label, etc. Properties. This class should be overridden by specific components.

Inner Class :static class PropertyEntry implements Map.Entry,Serializable

Field Summary
protected transient  Loggerlog
    

Constructor Summary
protected  ConfigurableComponent(String name)
     Construct a ConfigurableComponent with a given name.

Method Summary
public  intaddChild(ComposableComponent c)
     Add a child to this component.
public  voidaddChildConfigurationListener(ChildConfigurationListener l)
     Add a ChildConfigurationListener.
public  ComponentDataaddComponentData(ComponentData data)
    
public  PropertyaddInvisibleProperty(String name, Object value)
     Add an invisible property to the component.
public  PropertyaddInvisibleProperty(String name, Object value, Class cls)
     Adds an invisible property to the component with a given name, value and class.
public  PropertyaddInvisibleProperty(Property p)
     Adds a new Invisible Property to the component.
Parameters:
  p - Property to add.
public  voidaddPropertiesListener(PropertiesListener l)
     Add a PropertiesListener.
public  PropertyaddProperty(String name, Object value)
     Add a property with a given value.
public  PropertyaddProperty(String name, Object value, Class cls)
     Adds a property to the component with a given name, value and class.
public  PropertyaddProperty(Property p)
     Adds a new Property to the Component.
Parameters:
  p - Property to add.
public  PropertyaddProperty(String name, Object value, PropertyListener l)
    
public  booleancomponentWasRemoved()
    
public  BaseComponentcopy(BaseComponent result)
    
public  voidfinishNameChange()
     Called after a change in our name is completed.
protected  voidfireChildConfigurationChanged()
     Fires an event when a child configuration has changed.
protected  voidfirePropertyAdded(PropertyEvent ev)
     Fires an PropertyEvent when a new property is added to the component.
public  IteratorgetAllProperties()
    
protected  ComposableComponentgetAncestorOfClass(Class cls)
     Gets the Ancestor of this component.
public  ComposableComponentgetChild(int n)
     Gets a child component from a specific index.
Parameters:
  n - index of child component to retreive.
public  ComposableComponentgetChild(CompositeName childName)
     Gets a child component based on the childs Full Name.
Parameters:
  childName - CompositeName of the child.
public  intgetChildCount()
     Gets a count of all children within this component.
public  CollectiongetDescendentsOfClass(Class cls, Collection c)
     Gets a Collection of all Descendents of this component that are a specific class type. Note: The collection (parameter) must be initialized!
Parameters:
  cls - The Class of the Descendents
Parameters:
  c - An Empty Collection for the result.
public  CollectiongetDescendentsOfClass(Class cls)
     Gets a Collection of all Descendents of this component that are a specific class type.
public  URLgetDescription()
     Get a URL for a description of the component.
protected  EventListenerListgetEventListenerList()
     Gets an EventListenerList.
public  CompositeNamegetFullName()
     Gets the full name of this component.
public  PropertygetInvisibleProperty(CompositeName name)
     Get an invisible property which is not returned by getVisibleProperty.
public  PropertygetInvisibleProperty(String localName)
     Get an invisible property which is not returned by getVisibleProperty.
public  IteratorgetLocalProperties()
    
public  IteratorgetLocalPropertyNames()
     Gets an Iterator of all visible properties Local to this component.
protected  MapgetMyProperties()
     The actual Map of our properties is private so we can do a late bind of it.
public  ComposableComponentgetParent()
     Gets the parent of this component.
public  IteratorgetProperties()
     Return the properties in this component tree.
public  PropertygetProperty(CompositeName name)
     Get a property by name.
public  PropertygetProperty(String localName)
     Gets a local property based on a String name.
public  IteratorgetPropertyNames()
     Gets an Iterator of all visible Property Names in (or under) this component.
public  ListgetPropertyNamesList()
     Gets a List of all visible Properties in this component.
protected  PropertygetPropertyWorker(CompositeName name, boolean all, boolean visible)
    
public  StringgetShortName()
     Gets the short name of this component.
public  IteratorgetSortedLocalPropertyNames()
     Gets an Iterator of all visible properties Local to this component, sorted.
public  PropertygetVisibleProperty(CompositeName name)
     Get a visible property which is not returned by getInvisibleProperty.
public  PropertygetVisibleProperty(String localName)
     Get a visible property which is not returned by getVisibleProperty.
public  booleanhasUnboundProperties()
    
abstract public  voidinitProperties()
    
public  booleanisPropertyVisible(Property prop)
     Determines if the specified property is visible as a local property.
public  ComponentDatamodifyComponentData(ComponentData data)
    
public  ComponentDatamodifyComponentData(ComponentData data, PopulateDb pdb)
    
public  voidprintAllProperties(PrintStream out)
     Prints all visible Properties for this component.
public  voidprintAllProperties(PrintStream out, String indent)
     Prints all visible Properties for this component.
public  voidprintLocalProperties(PrintStream out)
    
public  voidprintLocalProperties(PrintStream out, String indent)
     Prints a list of local properties.
public  voidremoveAllChildren()
     Removes all children of this component.
public  voidremoveChild(int childIndex)
     Removes a child component at a specific index.
public  voidremoveChild(ComposableComponent c)
     Removes a specific child component.
public  voidremoveChildConfigurationListener(ChildConfigurationListener l)
     Removes a ChildConfigurationListener from this component.
public  voidremovePropertiesListener(PropertiesListener l)
     Removes a PropertiesListener.
public  voidremoveProperty(Property prop)
     Removes a Property from this component.
public  voidsetName(String newName)
     Set the name of this component.
public  voidsetParent(ComposableComponent newParent)
     Changing our parent changes all our property names so we have to rehash them and flush their caches.
public  voidsetProperties(Map props)
     Set a bunch of Properties at once.
public  voidsetPropertyVisible(Property prop, boolean newVisible)
     Block the propagation of a child property.
public  voidstartNameChange()
     Move the contents of the myProperties Map into the myPropertyEntries Collection since the keys in the Map are about to become invalid.
public  StringtoString()
    

Field Detail
log
protected transient Logger log(Code)
Handle to the Logger *




Constructor Detail
ConfigurableComponent
protected ConfigurableComponent(String name)(Code)
Construct a ConfigurableComponent with a given name. Nota bene: the constructors of ConfigurableComponents must _not_ perform any initialization of properties because the final name of the component is not known until it has been incorporated in a component hierarchy. The abstract initProperties() method should be used to initialize properties. The initialization of any child components should be deferred until the initialization of the parent.




Method Detail
addChild
public int addChild(ComposableComponent c)(Code)
Add a child to this component. Childs are always of type ComposableComponent.
Parameters:
  c - the child to add Count of all Children in this component.



addChildConfigurationListener
public void addChildConfigurationListener(ChildConfigurationListener l)(Code)
Add a ChildConfigurationListener. ChildConfigurationListener are invoked whenever children are added or removed.
Parameters:
  l - ChildConfigurationListener to add to this component.



addComponentData
public ComponentData addComponentData(ComponentData data)(Code)



addInvisibleProperty
public Property addInvisibleProperty(String name, Object value)(Code)
Add an invisible property to the component. Invisible properties are property that act and behave just like a normal property but are not visible to the GUI.
Parameters:
  name - of the property
Parameters:
  value - of the propery a Property object for the new Property



addInvisibleProperty
public Property addInvisibleProperty(String name, Object value, Class cls)(Code)
Adds an invisible property to the component with a given name, value and class.
Parameters:
  name - Name of the property
Parameters:
  value - Value of the property
Parameters:
  cls - Class of the property a Property object for the new Property.



addInvisibleProperty
public Property addInvisibleProperty(Property p)(Code)
Adds a new Invisible Property to the component.
Parameters:
  p - Property to add. a Property value



addPropertiesListener
public void addPropertiesListener(PropertiesListener l)(Code)
Add a PropertiesListener. PropertiesListeners are invoked whenever properties are added or removed.
Parameters:
  l - PropertiesListener to add



addProperty
public Property addProperty(String name, Object value)(Code)
Add a property with a given value. A new Property is created having the given name and value. In addition the other fields of the property set to default values consistent with the class of the value.
Parameters:
  name - the name of the property
Parameters:
  value - must be one of the supported value types the index of the new property



addProperty
public Property addProperty(String name, Object value, Class cls)(Code)
Adds a property to the component with a given name, value and class.
Parameters:
  name - Name of the property
Parameters:
  value - Value of the property
Parameters:
  cls - Class of the property a Property object for the new Property.



addProperty
public Property addProperty(Property p)(Code)
Adds a new Property to the Component.
Parameters:
  p - Property to add. a Property value



addProperty
public Property addProperty(String name, Object value, PropertyListener l)(Code)
Adds a new Property with an attached PropertyListener
Parameters:
  name - Name of the new Property
Parameters:
  value - Value of the new Property
Parameters:
  l - PropertyListener for this Property a Property value



componentWasRemoved
public boolean componentWasRemoved()(Code)



copy
public BaseComponent copy(BaseComponent result)(Code)
Copies a BaseComponent Object
Parameters:
  result - Object to copy a BaseComponent value



finishNameChange
public void finishNameChange()(Code)
Called after a change in our name is completed. We do nothing with the myProperties Map because it is recreated on demand. If there was a former parent, we inform the old parent that one of its children has been abducted.



fireChildConfigurationChanged
protected void fireChildConfigurationChanged()(Code)
Fires an event when a child configuration has changed.



firePropertyAdded
protected void firePropertyAdded(PropertyEvent ev)(Code)
Fires an PropertyEvent when a new property is added to the component.
Parameters:
  ev - PropertyEvent



getAllProperties
public Iterator getAllProperties()(Code)
Return all properties in this tree, regardless of visibility



getAncestorOfClass
protected ComposableComponent getAncestorOfClass(Class cls)(Code)
Gets the Ancestor of this component. The ancestor is a specific class type.
Parameters:
  cls - Class of Ancestor ComposableComponent for the ancestor.



getChild
public ComposableComponent getChild(int n)(Code)
Gets a child component from a specific index.
Parameters:
  n - index of child component to retreive. a ComposableComponent object for that child.



getChild
public ComposableComponent getChild(CompositeName childName)(Code)
Gets a child component based on the childs Full Name.
Parameters:
  childName - CompositeName of the child. a ComposableComponent object of the child.



getChildCount
public int getChildCount()(Code)
Gets a count of all children within this component. Child Count.



getDescendentsOfClass
public Collection getDescendentsOfClass(Class cls, Collection c)(Code)
Gets a Collection of all Descendents of this component that are a specific class type. Note: The collection (parameter) must be initialized!
Parameters:
  cls - The Class of the Descendents
Parameters:
  c - An Empty Collection for the result. a Collection of a descendents requested.



getDescendentsOfClass
public Collection getDescendentsOfClass(Class cls)(Code)
Gets a Collection of all Descendents of this component that are a specific class type.
Parameters:
  cls - The Class of the Descendents a Collection of a descendents requested.



getDescription
public URL getDescription()(Code)
Get a URL for a description of the component. May return null.
This default implementation returns null. an URL describing this component.



getEventListenerList
protected EventListenerList getEventListenerList()(Code)
Gets an EventListenerList. an EventListenerList object



getFullName
public CompositeName getFullName()(Code)
Gets the full name of this component. All component names are made up of a chain based on the component hierarchy. This chain is: grandparent.parent.child Full name is the complete chain. a CompositeName value of the full component name.



getInvisibleProperty
public Property getInvisibleProperty(CompositeName name)(Code)
Get an invisible property which is not returned by getVisibleProperty. Use this method only when absolutely necessary. Returns null if no invisible property exists with the specified name.
Parameters:
  name - full name of property to look for a Property value, null if the named property is Visible



getInvisibleProperty
public Property getInvisibleProperty(String localName)(Code)
Get an invisible property which is not returned by getVisibleProperty. Use this method only when absolutely necessary. Returns null if no invisible property exists with the specified name.
Parameters:
  localName - short name of property to look for a Property value



getLocalProperties
public Iterator getLocalProperties()(Code)
Get iterator of all local properties (regardless of visibility)



getLocalPropertyNames
public Iterator getLocalPropertyNames()(Code)
Gets an Iterator of all visible properties Local to this component. an Iterator of all local properties



getMyProperties
protected Map getMyProperties()(Code)
The actual Map of our properties is private so we can do a late bind of it. The properties are sometimes in the myProperties Map and sometimes in myPropertyEntries collection. This is done because the names can change as the component is reparented and therefore become invalid as keys in the map. After reparenting, this procedure recreates the Map the first time it is needed. the Map of this component's properties.



getParent
public ComposableComponent getParent()(Code)
Gets the parent of this component. If there are no parents, NULL is returned. a ComposableComponent object for the parent, or null if no parent.



getProperties
public Iterator getProperties()(Code)
Return the properties in this component tree. Ignore invisible properties



getProperty
public Property getProperty(CompositeName name)(Code)
Get a property by name. Current functionality returns it regardless of whether it is in fact invisible.
Parameters:
  name - the name of the property. the property or null if there is no property with thespecified name



getProperty
public Property getProperty(String localName)(Code)
Gets a local property based on a String name.
Parameters:
  localName - of the property a Property object.



getPropertyNames
public Iterator getPropertyNames()(Code)
Gets an Iterator of all visible Property Names in (or under) this component. an Iterator value



getPropertyNamesList
public List getPropertyNamesList()(Code)
Gets a List of all visible Properties in this component. a List value



getPropertyWorker
protected Property getPropertyWorker(CompositeName name, boolean all, boolean visible)(Code)



getShortName
public String getShortName()(Code)
Gets the short name of this component. All component names are made up of a chain based on the component hierarchy. This chain is: grandparent.parent.child Short name is just 'child'. a String value of the short name.



getSortedLocalPropertyNames
public Iterator getSortedLocalPropertyNames()(Code)
Gets an Iterator of all visible properties Local to this component, sorted. an Iterator of all sorted local properties



getVisibleProperty
public Property getVisibleProperty(CompositeName name)(Code)
Get a visible property which is not returned by getInvisibleProperty. Use this method only when absolutely necessary. Returns null if no visible property exists with the specified name.
Parameters:
  name - full Name of property to look for a Property value, null if the named property is Invisible



getVisibleProperty
public Property getVisibleProperty(String localName)(Code)
Get a visible property which is not returned by getVisibleProperty. Use this method only when absolutely necessary. Returns null if no visible property exists with the specified name.
Parameters:
  localName - short name of Property to find a Property value



hasUnboundProperties
public boolean hasUnboundProperties()(Code)



initProperties
abstract public void initProperties()(Code)



isPropertyVisible
public boolean isPropertyVisible(Property prop)(Code)
Determines if the specified property is visible as a local property. If a property is not visible, it cannot be seen in the GUI.
Parameters:
  prop - Property to check visiblity a boolean value



modifyComponentData
public ComponentData modifyComponentData(ComponentData data)(Code)



modifyComponentData
public ComponentData modifyComponentData(ComponentData data, PopulateDb pdb)(Code)
Default implementation of new form of modifyComponentData invokes the old form without the pdb argument



printAllProperties
public void printAllProperties(PrintStream out)(Code)
Prints all visible Properties for this component.
Parameters:
  out - Stream to print to.



printAllProperties
public void printAllProperties(PrintStream out, String indent)(Code)
Prints all visible Properties for this component.
Parameters:
  out - Stream to print to.
Parameters:
  indent - Indentation amount before each output line.



printLocalProperties
public void printLocalProperties(PrintStream out)(Code)
Dumps a list of the Local Properties
Parameters:
  out - Stream to dump properties to.



printLocalProperties
public void printLocalProperties(PrintStream out, String indent)(Code)
Prints a list of local properties.
Parameters:
  out - Stream to print properties to.
Parameters:
  indent - Indentation before each output string.



removeAllChildren
public void removeAllChildren()(Code)
Removes all children of this component.



removeChild
public void removeChild(int childIndex)(Code)
Removes a child component at a specific index.
Parameters:
  childIndex - Index of child to remove.



removeChild
public void removeChild(ComposableComponent c)(Code)
Removes a specific child component.
Parameters:
  c - ComposableComponent of child to remove.



removeChildConfigurationListener
public void removeChildConfigurationListener(ChildConfigurationListener l)(Code)
Removes a ChildConfigurationListener from this component.
Parameters:
  l - ChildCondigurationListener to remove.



removePropertiesListener
public void removePropertiesListener(PropertiesListener l)(Code)
Removes a PropertiesListener.
Parameters:
  l - PropertiesListener to remove



removeProperty
public void removeProperty(Property prop)(Code)
Removes a Property from this component. The property must be local to the component.
Parameters:
  prop - Property to remove.



setName
public void setName(String newName)(Code)
Set the name of this component. The name is relative to the parent and must be distinct in that context.
Parameters:
  newName - the new name for this component.



setParent
public void setParent(ComposableComponent newParent)(Code)
Changing our parent changes all our property names so we have to rehash them and flush their caches.
Parameters:
  newParent - New Parent Component



setProperties
public void setProperties(Map props)(Code)
Set a bunch of Properties at once. Used when creating a component from the database. Default implementation just iterates through the map. Note that the properties must have been previously created in initProperties()
Parameters:
  props - a Map of String property names and Object values



setPropertyVisible
public void setPropertyVisible(Property prop, boolean newVisible)(Code)
Block the propagation of a child property. Such properties are typically set by the parent component and should not be visible from above.



startNameChange
public void startNameChange()(Code)
Move the contents of the myProperties Map into the myPropertyEntries Collection since the keys in the Map are about to become invalid. The myProperties Map will be recreated later.



toString
public String toString()(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.