Ken Webb 2010-01-15T19:48:06Z
Software developers use hierarchical structure in various ways. This page summarizes some actual syntax.
Contents |
IXholon IXholon.getParentNode() IXholon IXholon.getFirstChild() IXholon IXholon.getNextSibling()
The Xholon API is based on the Java binding in the XML DOM specification. This syntax was chosen because it supports the no arbitrary restrictions (NAR) principle, and the related concept of mathematical closure. All three of these operations return the same type that they act on. For example, a node that implements IXholon can call the getParentNode() method to get another node that implements IXholon.
Another reason is that this syntax is self focused. It is local rather than global. To locate its immediate local neighbors (its parent, its first child, and its next sibling), a node does not need to know its own location within an array or list of children of its parent.
Node Node.getParentNode() Node Node.getFirstChild() Node Node.getNextSibling()
Node is the base interface in the w3c Document Object Model (DOM).
Node Node.parentNode Node Node.firstChild Node Node.nextSibling
Node is the base interface in the w3c Document Object Model (DOM).
Container Component.getParent() Component[] Container.getComponents() Component getComponent(int n) int getComponentCount()
Component is the base class for all classes in AWT and Swing. Container is an immediate subclass of Component.
Widget(Widget parent, int style) Composite Control.getParent() Control[] Composite.getChildren()
The class inheritance hierarchy is as follows.
org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Composite
Widget Widget.getParent()
parent:: child:: next-sibling::
Window Window.parent OrderedCollection Window.children
Component Component.GetChild(int) Component Component.getParent()
Class Class.getSuperclass()
parentNode children("*[nodeType=1]")[0] next("*[nodeType=1]")[0]
parent leftChild rightChild sibling