001 // Copyright 2004, 2005 The Apache Software Foundation
002 //
003 // Licensed under the Apache License, Version 2.0 (the "License");
004 // you may not use this file except in compliance with the License.
005 // You may obtain a copy of the License at
006 //
007 // http://www.apache.org/licenses/LICENSE-2.0
008 //
009 // Unless required by applicable law or agreed to in writing, software
010 // distributed under the License is distributed on an "AS IS" BASIS,
011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012 // See the License for the specific language governing permissions and
013 // limitations under the License.
014
015 package org.apache.tapestry.contrib.tree.model;
016
017 /**
018 * @author ceco
019 */
020 public class TreeRowObject
021 {
022
023 public static final int FIRST_ROW = 1;
024 public static final int MIDDLE_ROW = 2;
025 public static final int LAST_ROW = 3;
026 public static final int FIRST_LAST_ROW = 4;
027
028 public static final int EMPTY_CONN_IMG = 1;
029 public static final int LINE_CONN_IMG = 2;
030
031 private Object m_objTreeNode = null;
032 private Object m_objTreeNodeUID = null;
033 private int m_nTreeRowDepth;
034 private boolean m_bLeaf = false;
035 private int m_nTreeRowPossiotionType = MIDDLE_ROW;
036 private int[] m_nLineConnImages;
037
038 public TreeRowObject(Object objTreeNode, Object objTreeNodeUID,
039 int nTreeRowDepth, boolean bLeaf, int nTreeRowPossiotionType,
040 int[] nLineConnImages)
041 {
042 super();
043 m_objTreeNode = objTreeNode;
044 m_objTreeNodeUID = objTreeNodeUID;
045 m_nTreeRowDepth = nTreeRowDepth;
046 m_bLeaf = bLeaf;
047 m_nTreeRowPossiotionType = nTreeRowPossiotionType;
048 m_nLineConnImages = nLineConnImages;
049 }
050
051 public Object getTreeNode()
052 {
053 return m_objTreeNode;
054 }
055
056 public Object getTreeNodeUID()
057 {
058 return m_objTreeNodeUID;
059 }
060
061 public int getTreeRowDepth()
062 {
063 return m_nTreeRowDepth;
064 }
065
066 /**
067 * @return Returns the leaf.
068 */
069 public boolean getLeaf()
070 {
071 return m_bLeaf;
072 }
073
074 /**
075 * @return Returns the treeRowPossiotionType.
076 */
077 public int getTreeRowPossiotionType()
078 {
079 return m_nTreeRowPossiotionType;
080 }
081
082 /**
083 * @return Returns the lineConnImages.
084 */
085 public int[] getLineConnImages()
086 {
087 return m_nLineConnImages;
088 }
089 }