001    package mondrian.gui.validate.impl;
002    
003    import mondrian.gui.SchemaTreeModel;
004    import mondrian.gui.validate.TreeModel;
005    
006    /**
007     * Implementation of <code>TreeModel</code> for Workbench.
008     *
009     * @author mlowery
010     */
011    public class WorkbenchTreeModel implements TreeModel {
012    
013        private SchemaTreeModel schemaTreeModel;
014    
015        public WorkbenchTreeModel(SchemaTreeModel schemaTreeModel) {
016            super();
017            this.schemaTreeModel = schemaTreeModel;
018        }
019    
020        public Object getChild(Object parent, int index) {
021            return schemaTreeModel.getChild(parent, index);
022        }
023    
024        public int getChildCount(Object parent) {
025            return schemaTreeModel.getChildCount(parent);
026        }
027    
028        public Object getRoot() {
029            return schemaTreeModel.getRoot();
030        }
031    
032    }
033    
034    // End WorkbenchTreeModel.java