001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2008-2009 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.gui.validate.impl; 011 012import mondrian.gui.SchemaTreeModel; 013import mondrian.gui.validate.TreeModel; 014 015/** 016 * Implementation of <code>TreeModel</code> for Workbench. 017 * 018 * @author mlowery 019 */ 020public class WorkbenchTreeModel implements TreeModel { 021 022 private SchemaTreeModel schemaTreeModel; 023 024 public WorkbenchTreeModel(SchemaTreeModel schemaTreeModel) { 025 super(); 026 this.schemaTreeModel = schemaTreeModel; 027 } 028 029 public Object getChild(Object parent, int index) { 030 return schemaTreeModel.getChild(parent, index); 031 } 032 033 public int getChildCount(Object parent) { 034 return schemaTreeModel.getChildCount(parent); 035 } 036 037 public Object getRoot() { 038 return schemaTreeModel.getRoot(); 039 } 040 041} 042 043// End WorkbenchTreeModel.java