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 015package org.apache.tapestry.contrib.tree.model; 016 017/** 018 * @author ceco 019 */ 020public class TreeRowObject { 021 public static final int FIRST_ROW = 1; 022 public static final int MIDDLE_ROW = 2; 023 public static final int LAST_ROW = 3; 024 public static final int FIRST_LAST_ROW = 4; 025 026 public static final int EMPTY_CONN_IMG = 1; 027 public static final int LINE_CONN_IMG = 2; 028 029 private Object m_objTreeNode = null; 030 private Object m_objTreeNodeUID = null; 031 private int m_nTreeRowDepth; 032 private boolean m_bLeaf = false; 033 private int m_nTreeRowPossiotionType = MIDDLE_ROW; 034 private int[] m_nLineConnImages; 035 036 public TreeRowObject(Object objTreeNode, Object objTreeNodeUID, int nTreeRowDepth, boolean bLeaf, int nTreeRowPossiotionType, int[] nLineConnImages) { 037 super(); 038 m_objTreeNode = objTreeNode; 039 m_objTreeNodeUID = objTreeNodeUID; 040 m_nTreeRowDepth = nTreeRowDepth; 041 m_bLeaf = bLeaf; 042 m_nTreeRowPossiotionType = nTreeRowPossiotionType; 043 m_nLineConnImages = nLineConnImages; 044 } 045 046 public Object getTreeNode() { 047 return m_objTreeNode; 048 } 049 050 public Object getTreeNodeUID() { 051 return m_objTreeNodeUID; 052 } 053 054 public int getTreeRowDepth() { 055 return m_nTreeRowDepth; 056 } 057 058 /** 059 * @return Returns the leaf. 060 */ 061 public boolean getLeaf() { 062 return m_bLeaf; 063 } 064 /** 065 * @return Returns the treeRowPossiotionType. 066 */ 067 public int getTreeRowPossiotionType() { 068 return m_nTreeRowPossiotionType; 069 } 070 /** 071 * @return Returns the lineConnImages. 072 */ 073 public int[] getLineConnImages() { 074 return m_nLineConnImages; 075 } 076}