Java Doc for XmlElement.java in  » Mail-Clients » columba-1.4 » org » columba » core » xml » 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 » Mail Clients » columba 1.4 » org.columba.core.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Observable
      org.columba.core.xml.XmlElement

XmlElement
public class XmlElement extends Observable implements Cloneable(Code)
The XmlElement is a generic containment class for elements within an XML file.

It extends Observable which should be used for gui elements which are interested in configuration changes.

Show interested in:

 xmlElement.addObserver(yourObserver);
 

When making bigger changes on XmlElement and probably its subnodes and/or a greater number of attributes at once, you should just change XmlElement directly and manually notify the Observers by calling:

 xmlElement.setChanged();
 xmlElement.notifyObservers();
 

There a good introduction for the Observable/Observer pattern in Model/View/Controller based applications at www.javaworld.com: - http://www.javaworld.com/javaworld/jw-10-1996/jw-10-howto.html
See Also:   org.columba.mail.gui.config.general.MailOptionsDialog.initObservables
See Also:   org.columba.mail.gui.message.viewer.MarkAsReadTimer
author:
   Tony Parent, fdietz



Field Summary
 Hashtableattributes
    
 Stringdata
    
 Stringname
    
 XmlElementparent
    
 ListsubElements
    

Constructor Summary
public  XmlElement()
    
public  XmlElement(String name)
    
public  XmlElement(String name, Hashtable attributes)
    
public  XmlElement(String name, String data)
    

Method Summary
public  ObjectaddAttribute(String name, String value)
     Add attribute to this xml element.
public  booleanaddElement(XmlElement e)
    
public  XmlElementaddSubElement(String path)
    
public  XmlElementaddSubElement(XmlElement e)
    
public  XmlElementaddSubElement(String name, String data)
    
public  voidappend(XmlElement e)
    
public  Objectclone()
    
public  intcount()
    
public  booleanequals(Object obj)
    
public  StringgetAttribute(String name)
    
public  StringgetAttribute(String name, String defaultValue)
    
public  EnumerationgetAttributeNames()
    
public  HashtablegetAttributes()
    
public  StringgetData()
    
public  XmlElementgetElement(String path)
    
public  XmlElementgetElement(int index)
    
public  ListgetElements()
    
public  StringgetName()
    
public  XmlElementgetParent()
    
public  inthashCode()
    
public  voidinsertElement(XmlElement e, int index)
    
public  voidnotifyObservers()
     Notify all Observers.
public static  voidprintNode(XmlElement node, String indent)
    
public  voidremoveAllElements()
    
public  XmlElementremoveElement(XmlElement e)
    
public  XmlElementremoveElement(int index)
    
public  voidremoveFromParent()
    
public  voidsetAttributes(Hashtable attrs)
    
public  voidsetData(String d)
    
public  voidsetName(String name)
     Sets the name.
public  voidsetParent(XmlElement parent)
    
public  StringtoString()
    

Field Detail
attributes
Hashtable attributes(Code)



data
String data(Code)



name
String name(Code)



parent
XmlElement parent(Code)



subElements
List subElements(Code)




Constructor Detail
XmlElement
public XmlElement()(Code)
FIXME** This function needs documentation Constructor



XmlElement
public XmlElement(String name)(Code)
FIXME** This function needs documentation Constructor
Parameters:
  String - Name



XmlElement
public XmlElement(String name, Hashtable attributes)(Code)
FIXME** This function needs documentation Constructor
Parameters:
  String - Name
Parameters:
  Hashtable - Attributes



XmlElement
public XmlElement(String name, String data)(Code)
FIXME** This function needs documentation Constructor
Parameters:
  Name - String
Parameters:
  Data - String




Method Detail
addAttribute
public Object addAttribute(String name, String value)(Code)
Add attribute to this xml element.
Parameters:
  name - name of key
Parameters:
  value - new attribute value old attribute value



addElement
public boolean addElement(XmlElement e)(Code)
FIXME** This function needs documentation boolean
Parameters:
  XmlElement - E



addSubElement
public XmlElement addSubElement(String path)(Code)
Adds a sub element to this one XmlElement
Parameters:
  Name - The subpath of the sub element to add



addSubElement
public XmlElement addSubElement(XmlElement e)(Code)
Adds a sub element to this one XmlElement
Parameters:
  element - The XmlElement to add



addSubElement
public XmlElement addSubElement(String name, String data)(Code)
Adds a sub element to this one XmlElement
Parameters:
  Name - The name of the sub element to add
Parameters:
  Data - String Data for this element



append
public void append(XmlElement e)(Code)



clone
public Object clone()(Code)



count
public int count()(Code)



equals
public boolean equals(Object obj)(Code)



getAttribute
public String getAttribute(String name)(Code)
FIXME** This function needs documentation String
Parameters:
  String - Name



getAttribute
public String getAttribute(String name, String defaultValue)(Code)



getAttributeNames
public Enumeration getAttributeNames()(Code)
FIXME** This function needs documentation Enumeration



getAttributes
public Hashtable getAttributes()(Code)
FIXME** This function needs documentation String
Parameters:
  String - Name



getData
public String getData()(Code)
Returns the data associated with the current Xml element String



getElement
public XmlElement getElement(String path)(Code)
FIXME** This function needs documentation XmlElement
Parameters:
  String - Path



getElement
public XmlElement getElement(int index)(Code)



getElements
public List getElements()(Code)
FIXME** This function needs documentation Vector



getName
public String getName()(Code)
Returns the name of the current Xml element String



getParent
public XmlElement getParent()(Code)
Gives the XmlElement containing the current element XmlElement



hashCode
public int hashCode()(Code)



insertElement
public void insertElement(XmlElement e, int index)(Code)
convienience method for the TreeView
Parameters:
  e -
Parameters:
  index -



notifyObservers
public void notifyObservers()(Code)
Notify all Observers.
See Also:   java.util.Observable.notifyObservers



printNode
public static void printNode(XmlElement node, String indent)(Code)
Prints out a given number of spaces
Parameters:
  out - PrintWriter to use for printing
Parameters:
  numSpaces - Number of spaces to print



removeAllElements
public void removeAllElements()(Code)



removeElement
public XmlElement removeElement(XmlElement e)(Code)



removeElement
public XmlElement removeElement(int index)(Code)



removeFromParent
public void removeFromParent()(Code)
convienience method for the TreeView this method is modeled after the DefaultMutableTreeNode-class DefaultMutableTreeNode wraps XmlElement for this purpose



setAttributes
public void setAttributes(Hashtable attrs)(Code)
FIXME** This function needs documentation
Parameters:
  Attrs - Hashtable to use as the attributes



setData
public void setData(String d)(Code)
Sets the data for this element
Parameters:
  D - The String representation of the data



setName
public void setName(String name)(Code)
Sets the name.
Parameters:
  name - The name to set



setParent
public void setParent(XmlElement parent)(Code)
Sets the parent element
Parameters:
  Parent - The XmlElement that contains this one



toString
public String toString()(Code)

See Also:   java.lang.Object.toString



Methods inherited from java.util.Observable
public synchronized void addObserver(Observer o)(Code)(Java Doc)
protected synchronized void clearChanged()(Code)(Java Doc)
public synchronized int countObservers()(Code)(Java Doc)
public synchronized void deleteObserver(Observer o)(Code)(Java Doc)
public synchronized void deleteObservers()(Code)(Java Doc)
public synchronized boolean hasChanged()(Code)(Java Doc)
public void notifyObservers()(Code)(Java Doc)
public void notifyObservers(Object arg)(Code)(Java Doc)
protected synchronized void setChanged()(Code)(Java Doc)

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.