com.swfit.core.tree
Class TreeElement

java.lang.Object
  |
  +--com.swfit.core.tree.TreeElement
Direct Known Subclasses:
TreeBranch, TreeLeaf

public abstract class TreeElement
extends java.lang.Object

A class for sorting and a policy for naming within a tree.

Since:
SWFIT1.0
Version:
$Revision: 1.1 $ $Date: 2003/02/02 20:47:25 $
Author:
Olaf Havnes

Field Summary
static java.lang.String CODE
           
static java.lang.String NUM_OWNED
           
static java.lang.String OWNED
           
static java.lang.String SEPARATOR
           
 
Constructor Summary
protected TreeElement(java.lang.String name, boolean can_own)
          Build a TreeElement
 
Method Summary
abstract  java.lang.String code()
          Describe this TreeElement in a way that will make it possible to rebuild the tree
 java.lang.String codeName()
          The name of the element in a form dependent on the position in the tree.
 java.lang.String explainer()
          Some rendering data (for forms etc.)
 boolean horizontal()
          Should the collection of fields be rendered in a "horizontal way"?
 int index()
          The index of the element
 java.lang.String name()
          The name of the element
 TreeBranch owner()
          The owner of this TreeElement
 void setExplainer(java.lang.String explainer)
           
 void setHorizontal(boolean horizontal)
           
 void setIndex(int index)
           
 void setOwner(TreeBranch owner)
           
static TreeBranch toTreeBranch(java.lang.Object object)
           
static TreeElement toTreeElement(java.lang.Object object)
          Mainly used by the subclass TreeBranch
static TreeLeaf toTreeLeaf(java.lang.Object object)
           
protected  java.lang.String treeName()
          The name of the element in a form dependent on the position in the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

public static final java.lang.String SEPARATOR

CODE

public static final java.lang.String CODE

NUM_OWNED

public static final java.lang.String NUM_OWNED

OWNED

public static final java.lang.String OWNED
Constructor Detail

TreeElement

protected TreeElement(java.lang.String name,
                      boolean can_own)
Build a TreeElement
Method Detail

name

public final java.lang.String name()
The name of the element

treeName

protected final java.lang.String treeName()
The name of the element in a form dependent on the position in the tree. The name will be on the form owner_name_0.owner_name_1.element_name, or just element_name, if this an element that can't own others, and it is owned by the root of the tree.

codeName

public final java.lang.String codeName()
The name of the element in a form dependent on the position in the tree. The name will be on the form owner_name_0.owner_name_1.element_name, or just element_name, if this an element that can't own others, and it is owned by the root of the tree.

owner

public TreeBranch owner()
The owner of this TreeElement

setOwner

public void setOwner(TreeBranch owner)

index

public final int index()
The index of the element

setIndex

public final void setIndex(int index)

code

public abstract java.lang.String code()
Describe this TreeElement in a way that will make it possible to rebuild the tree

toTreeElement

public static final TreeElement toTreeElement(java.lang.Object object)
Mainly used by the subclass TreeBranch

toTreeBranch

public static final TreeBranch toTreeBranch(java.lang.Object object)

toTreeLeaf

public static final TreeLeaf toTreeLeaf(java.lang.Object object)

explainer

public final java.lang.String explainer()
Some rendering data (for forms etc.)

Should the element be accompanied by an explaining text ?


setExplainer

public final void setExplainer(java.lang.String explainer)

horizontal

public final boolean horizontal()
Should the collection of fields be rendered in a "horizontal way"?

setHorizontal

public final void setHorizontal(boolean horizontal)


Swfit developer homepage
Copyright © 2003 Orgdot AS. All Rights Reserved.