TreeView.java |
1 /** 2 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved. 3 * 4 * This library is free software; you can redistribute it and/or modify it under 5 * the terms of the GNU Lesser General Public License as published by the Free 6 * Software Foundation; either version 2.1 of the License, or (at your option) 7 * any later version. 8 * 9 * This library is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 12 * details. 13 */ 14 15 package com.liferay.portal.util; 16 17 import java.io.Serializable; 18 19 import java.util.ArrayList; 20 import java.util.List; 21 22 /** 23 * <a href="TreeView.java.html"><b><i>View Source</i></b></a> 24 * 25 * @author Jorge Ferrer 26 */ 27 public class TreeView implements Serializable { 28 29 public TreeView() { 30 this(new ArrayList<TreeNodeView>(), 0); 31 } 32 33 public TreeView(List<TreeNodeView> list, int depth) { 34 _list = list; 35 _depth = depth; 36 } 37 38 public List<TreeNodeView> getList() { 39 return _list; 40 } 41 42 public int getDepth() { 43 return _depth; 44 } 45 46 private List<TreeNodeView> _list; 47 private int _depth; 48 49 }