Java Doc for ElementListBase.java in  » Ajax » ItsNat » org » itsnat » core » domutil » 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 » Ajax » ItsNat » org.itsnat.core.domutil 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.itsnat.core.domutil.ElementListBase

All known Subclasses:   org.itsnat.impl.core.domutil.ElementListBaseImpl,
ElementListBase
public interface ElementListBase extends ElementGroup,NodeList(Code)
This utility interface represents and manages an integer indexed DOM Element list, a list of consecutive elements with a single parent element.

Objects implementing this interface are attached to a real DOM element list with a single parent element, this "initial" list may be not empty, in fact it is automatically synchronized with the "real" DOM element list to show the current state when the utility object is created.

This interface only manages DOM Element objects as list elements, other node types like text nodes are ignored (filtered).

Indexes are zero-based.

When a DOM element is added or removed using this interface, this element is added/removed to/from the DOM list too.

The interface inherits from org.w3c.dom.NodeList, the method NodeList.item(int) is equivalent to ElementListBase.getElementAt(int) and NodeList.getLength() return the number of child DOM Elements in the list.


author:
   Jose Maria Arranz Santamaria




Method Summary
public  ElementgetElementAt(int index)
     Returns the element at the specified index.
Parameters:
  index - index of the element to search.
public  ElementgetElementFromNode(Node node)
     Returns the child element of the list containing the specified node.
public  Element[]getElements()
     Returns the element list as an array.
public  ElementgetFirstElement()
     Returns the first child element (element at position 0).
public  ElementgetLastElement()
     Returns the last child element (element at position getLength() - 1).
public  ListElementInfogetListElementInfoAt(int index)
     Returns an object info of the child element at the specified position.
Parameters:
  index - index of the element to search for.
public  ListElementInfogetListElementInfoFromNode(Node node)
     Returns an object info of the child element containing the specified node (or the node is itself an element of the list).
Parameters:
  node - the node to search for.
public  intindexOfElement(Element elem)
     Returns the position of the specified element.
Parameters:
  elem - the element to search.
public  booleanisEmpty()
     Informs whether the list is empty (no elements).
public  intlastIndexOfElement(Element elem)
     Returns the position of the specified element searching backwards.

The result must be the same as ElementListBase.indexOfElement(Element) because there is no "duplicated" elements.

public  voidmoveElement(int start, int end, int to)
     Moves one or more elements from the inclusive range start to end to the to position in the list.
public  voidremoveAllElements()
     Removes all elements.
public  ElementremoveElementAt(int index)
     Removes the specified element.
Parameters:
  index - index of the element to remove.
public  voidremoveElementRange(int fromIndex, int toIndex)
     Removes the elements between the specified indexes.



Method Detail
getElementAt
public Element getElementAt(int index)(Code)
Returns the element at the specified index.
Parameters:
  index - index of the element to search. the element in this position or null if index is out of range.



getElementFromNode
public Element getElementFromNode(Node node)(Code)
Returns the child element of the list containing the specified node. If the node is itself an element of the list, self is returned.
Parameters:
  node - the node to search for. the element containing or equal the specified node. Null if this node is not contained by the list.
See Also:   ElementListBase.indexOfElement(Element)
See Also:   ElementListBase.getListElementInfoFromNode(Node)



getElements
public Element[] getElements()(Code)
Returns the element list as an array. the element array.



getFirstElement
public Element getFirstElement()(Code)
Returns the first child element (element at position 0). the first child element or null is the list is empty.



getLastElement
public Element getLastElement()(Code)
Returns the last child element (element at position getLength() - 1). the last child element or null is the list is empty.



getListElementInfoAt
public ListElementInfo getListElementInfoAt(int index)(Code)
Returns an object info of the child element at the specified position.
Parameters:
  index - index of the element to search for. the object info of the matched child element. Null if index is out of range.
See Also:   ElementListBase.getElementFromNode(Node)



getListElementInfoFromNode
public ListElementInfo getListElementInfoFromNode(Node node)(Code)
Returns an object info of the child element containing the specified node (or the node is itself an element of the list).
Parameters:
  node - the node to search for. the object info of the matched child element. Null if this node is not contained by the list.
See Also:   ElementListBase.getListElementInfoAt(int)



indexOfElement
public int indexOfElement(Element elem)(Code)
Returns the position of the specified element.
Parameters:
  elem - the element to search. the position or -1 if the specified element is not in the list.



isEmpty
public boolean isEmpty()(Code)
Informs whether the list is empty (no elements). true if the list is empty.



lastIndexOfElement
public int lastIndexOfElement(Element elem)(Code)
Returns the position of the specified element searching backwards.

The result must be the same as ElementListBase.indexOfElement(Element) because there is no "duplicated" elements. Use this method if the specified element is near to the end of the list.


Parameters:
  elem - the element to search. the element position or -1 if the specified element is not in the list.



moveElement
public void moveElement(int start, int end, int to)(Code)
Moves one or more elements from the inclusive range start to end to the to position in the list. After the move, the element that was at index start will be at index to.
 Examples of moves:
 

1. moveRow(1,3,5); a|B|C|D|e|f|g|h|i|j|k - before a|e|f|g|h|B|C|D|i|j|k - after

2. moveRow(6,7,1); a|b|c|d|e|f|G|H|i|j|k - before a|G|H|b|c|d|e|f|i|j|k - after

Behavior and documentation is based on DefaultTableModel.moveRow(int,int,int)


Parameters:
  start - the starting element index to be moved
Parameters:
  end - the ending element index to be moved
Parameters:
  to - the destination of the elements to be moved



removeAllElements
public void removeAllElements()(Code)
Removes all elements. The list is now empty.



removeElementAt
public Element removeElementAt(int index)(Code)
Removes the specified element.
Parameters:
  index - index of the element to remove. the removed element or null if index is out of bounds.



removeElementRange
public void removeElementRange(int fromIndex, int toIndex)(Code)
Removes the elements between the specified indexes.
Parameters:
  fromIndex - low index (inclusive).
Parameters:
  toIndex - high index (inclusive).



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