001 /** 002 * Copyright 2010 The Kuali Foundation Licensed under the 003 * Educational Community License, Version 2.0 (the "License"); you may 004 * not use this file except in compliance with the License. You may 005 * obtain a copy of the License at 006 * 007 * http://www.osedu.org/licenses/ECL-2.0 008 * 009 * Unless required by applicable law or agreed to in writing, 010 * software distributed under the License is distributed on an "AS IS" 011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 012 * or implied. See the License for the specific language governing 013 * permissions and limitations under the License. 014 */ 015 016 package org.kuali.student.lum.common.client.lo; 017 018 import org.kuali.student.core.assembly.data.Data; 019 020 public class OutlineNode<T> { 021 int indentLevel = 0; 022 023 T userObject; 024 025 OutlineNodeModel<T> outlineModel; 026 027 // TODO M4 - some way to subclass OutlineNode? 028 private Object opaque; 029 030 private Data metaInfo; 031 032 public void setModel(OutlineNodeModel<T> model) { 033 outlineModel = model; 034 } 035 036 public void setCurrentNode() { 037 outlineModel.setCurrentNode(this); 038 } 039 040 public T getUserObject() { 041 return userObject; 042 } 043 044 public void setUserObject(T u) { 045 userObject = u; 046 } 047 048 public void indent() { 049 indentLevel++; 050 } 051 052 public void outdent() { 053 indentLevel--; 054 } 055 056 public void setIndentLevel(int level) { 057 indentLevel = level; 058 } 059 060 public int getIndentLevel() { 061 return indentLevel; 062 } 063 064 public void setOpaque(Object opaque) { 065 this.opaque = opaque; 066 } 067 068 public Object getOpaque() { 069 return opaque; 070 } 071 072 public void setMetaInfo(Data metaInfo) { 073 this.metaInfo=metaInfo; 074 } 075 public Data getMetaInfo() { 076 return metaInfo; 077 } 078 }