Compiere 3.1

org.compiere.model
Class CTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.compiere.model.CTreeNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public final class CTreeNode
extends DefaultMutableTreeNode

Mutable Tree Node (not a PO).

Version:
$Id: CTreeNode.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
static Icon[] IMAGES
          16* 16 Icons
static int TYPE_DOCACTION
          Action - 8
static int TYPE_PROCESS
          Process - 3
static int TYPE_REPORT
          Report - 2
static int TYPE_SETVARIABLE
          Variable - 6
static int TYPE_USERCHOICE
          Choice - 7
static int TYPE_WINDOW
          Window - 1
static int TYPE_WORKBENCH
          Workbench - 5
static int TYPE_WORKFLOW
          Workflow - 4
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
CTreeNode(int node_ID, int seqNo, String name, String description, int parent_ID, boolean isSummary, String imageIndicator, boolean onBar, Color color)
          Construct Model TreeNode
 
Method Summary
 CTreeNode findNode(int ID)
          Return the Node with ID in list of children
 int getAD_Form_ID()
          Get Form ID
 int getAD_Process_ID()
          Get Process ID
 int getAD_Task_ID()
          Get Task ID
 int getAD_Window_ID()
          Get Window ID
 int getAD_Workbench_ID()
          Get Workbench ID
 int getAD_Workflow_ID()
          Get WorkFlow ID
 Color getColor()
          Get Color
 String getDescription()
          Get Description
 Icon getIcon()
          Get Image Icon
static Icon getIcon(int index)
          Get Image Icon
static int getImageIndex(String imageIndicator)
          Get Image Indicator/Index
 String getImageIndiactor()
          Get Image Indicator
 String getName()
          Get Name
 int getNode_ID()
          Get Node ID
 int getParent_ID()
          Return parent
 String getSeqNo()
          Get SeqNo (Index) as formatted String 0000 for sorting
 boolean isForm()
          Is Form
 boolean isOnBar()
          Get Shortcut Bar info
 boolean isProcess()
          Is Process
 boolean isReport()
          Is Report
 boolean isSummary()
          Allow children to be added to this node
 boolean isTask()
          Is Task
 boolean isWindow()
          Is Window
 boolean isWorkbench()
          Is Workbench
 boolean isWorkFlow()
          Is Workflow
 void setAD_Form_ID(int formID)
          Set Form ID
 void setAD_Process_ID(int processID)
          Set Process ID
 void setAD_Task_ID(int taskID)
          Set Task ID
 void setAD_Window_ID(int windowID)
          Set Window ID
 void setAD_Workbench_ID(int workbenchID)
          Set Workbench ID
 void setAD_Workflow_ID(int workflowID)
          Set Workflow ID
 void setAllowsChildren(boolean isSummary)
          Set Summary (allow children)
 void setImageIndicator(String imageIndicator)
          Set Image Indicator and Index
 void setName(String name)
          Set Name
 void setSummary(boolean isSummary)
          Set Summary (allow children)
 String toString()
          Print Name
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_WINDOW

public static int TYPE_WINDOW
Window - 1


TYPE_REPORT

public static int TYPE_REPORT
Report - 2


TYPE_PROCESS

public static int TYPE_PROCESS
Process - 3


TYPE_WORKFLOW

public static int TYPE_WORKFLOW
Workflow - 4


TYPE_WORKBENCH

public static int TYPE_WORKBENCH
Workbench - 5


TYPE_SETVARIABLE

public static int TYPE_SETVARIABLE
Variable - 6


TYPE_USERCHOICE

public static int TYPE_USERCHOICE
Choice - 7


TYPE_DOCACTION

public static int TYPE_DOCACTION
Action - 8


IMAGES

public static Icon[] IMAGES
16* 16 Icons

Constructor Detail

CTreeNode

public CTreeNode(int node_ID,
                 int seqNo,
                 String name,
                 String description,
                 int parent_ID,
                 boolean isSummary,
                 String imageIndicator,
                 boolean onBar,
                 Color color)
Construct Model TreeNode

Parameters:
node_ID - node
seqNo - sequence
name - name
description - description
parent_ID - parent
isSummary - summary
imageIndicator - image indicator
onBar - on bar
color - color
Method Detail

getNode_ID

public int getNode_ID()
Get Node ID

Returns:
node id (e.g. AD_Menu_ID)

getAD_Window_ID

public int getAD_Window_ID()
Get Window ID


setAD_Window_ID

public void setAD_Window_ID(int windowID)
Set Window ID

Parameters:
int - windowID

getAD_Process_ID

public int getAD_Process_ID()
Get Process ID


setAD_Process_ID

public void setAD_Process_ID(int processID)
Set Process ID

Parameters:
int - processID

getAD_Form_ID

public int getAD_Form_ID()
Get Form ID


setAD_Form_ID

public void setAD_Form_ID(int formID)
Set Form ID

Parameters:
int - formID

getAD_Workflow_ID

public int getAD_Workflow_ID()
Get WorkFlow ID


setAD_Workflow_ID

public void setAD_Workflow_ID(int workflowID)
Set Workflow ID

Parameters:
int - workflowID

getAD_Task_ID

public int getAD_Task_ID()
Get Task ID


setAD_Task_ID

public void setAD_Task_ID(int taskID)
Set Task ID

Parameters:
int - taskID

getAD_Workbench_ID

public int getAD_Workbench_ID()
Get Workbench ID


setAD_Workbench_ID

public void setAD_Workbench_ID(int workbenchID)
Set Workbench ID

Parameters:
int - workbenchID

setName

public void setName(String name)
Set Name

Parameters:
name - name

getName

public String getName()
Get Name

Returns:
name

getSeqNo

public String getSeqNo()
Get SeqNo (Index) as formatted String 0000 for sorting

Returns:
SeqNo as String

getParent_ID

public int getParent_ID()
Return parent

Returns:
Parent_ID (e.g. AD_Menu_ID)

toString

public String toString()
Print Name

Overrides:
toString in class DefaultMutableTreeNode
Returns:
info

getDescription

public String getDescription()
Get Description

Returns:
description

setSummary

public void setSummary(boolean isSummary)
Set Summary (allow children)

Parameters:
isSummary - summary node

setAllowsChildren

public void setAllowsChildren(boolean isSummary)
Set Summary (allow children)

Overrides:
setAllowsChildren in class DefaultMutableTreeNode
Parameters:
isSummary - true if summary

isSummary

public boolean isSummary()
Allow children to be added to this node

Returns:
true if summary node

getImageIndex

public static int getImageIndex(String imageIndicator)
Get Image Indicator/Index

Parameters:
imageIndicator - image indicator (W/X/R/P/F/T/B) X_AD_WF_Node.ACTION_
Returns:
index of image

setImageIndicator

public void setImageIndicator(String imageIndicator)
Set Image Indicator and Index

Parameters:
imageIndicator - image indicator (W/X/R/P/F/T/B) X_AD_WF_Node.ACTION_

getImageIndiactor

public String getImageIndiactor()
Get Image Indicator

Returns:
image indicator

getIcon

public static Icon getIcon(int index)
Get Image Icon

Parameters:
index - image index
Returns:
Icon

getIcon

public Icon getIcon()
Get Image Icon

Returns:
Icon

isOnBar

public boolean isOnBar()
Get Shortcut Bar info

Returns:
true if node on bar

isProcess

public boolean isProcess()
Is Process

Returns:
true if Process

isReport

public boolean isReport()
Is Report

Returns:
true if report

isWindow

public boolean isWindow()
Is Window

Returns:
true if Window

isWorkbench

public boolean isWorkbench()
Is Workbench

Returns:
true if Workbench

isWorkFlow

public boolean isWorkFlow()
Is Workflow

Returns:
true if Workflow

isForm

public boolean isForm()
Is Form

Returns:
true if Form

isTask

public boolean isTask()
Is Task

Returns:
true if Task

getColor

public Color getColor()
Get Color

Returns:
color or black if not set

findNode

public CTreeNode findNode(int ID)
Return the Node with ID in list of children

Parameters:
ID - id
Returns:
VTreeNode with ID or null

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.