Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java')
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java75
1 files changed, 0 insertions, 75 deletions
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java
deleted file mode 100755
index 9f6717e43c..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.eclipse.swt.examples.launcher;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * This file is made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- */
-
-/**
- * Internal class used to store tree structures of ItemDescriptors
- */
-class ItemTreeNode {
- private ItemTreeNode nextSibling;
- private ItemTreeNode firstChild;
- private ItemDescriptor descriptor;
-
- /**
- * Constructs a leaf ItemTreeNode with a given descriptor.
- *
- * @param descriptor the descriptor
- */
- public ItemTreeNode(ItemDescriptor descriptor) {
- this.descriptor = descriptor;
- }
-
- /**
- * Adds a node to the Tree in sorted order by name.
- *
- * @param node the node to add. Note that node.nextSibling must be null
- */
- public void addSortedNode(ItemTreeNode node) {
- if (firstChild == null) {
- firstChild = node;
- } else if (firstChild.descriptor.getName().compareTo(node.descriptor.getName()) > 0) {
- node.nextSibling = firstChild;
- firstChild = node;
- } else {
- ItemTreeNode cursor;
- for (cursor = firstChild; cursor.nextSibling != null; cursor = cursor.nextSibling) {
- ItemTreeNode sibling = cursor.nextSibling;
- if (sibling.descriptor.getName().compareTo(node.descriptor.getName()) > 0) break;
- }
- node.nextSibling = cursor.nextSibling;
- cursor.nextSibling = node;
- }
- }
-
- /**
- * Returns the descriptor for this node.
- *
- * @return the descriptor
- */
- public ItemDescriptor getDescriptor() {
- return descriptor;
- }
-
- /**
- * Returns the next sibling of this node.
- *
- * @return the next sibling, or null if none
- */
- public ItemTreeNode getNextSibling() {
- return nextSibling;
- }
-
- /**
- * Returns the first child of this node.
- *
- * @return the first child, or null if none
- */
- public ItemTreeNode getFirstChild() {
- return firstChild;
- }
-}

Back to the top