01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: package org.netbeans.modules.soa.mapper.basicmapper.tree;
21:
22: import org.netbeans.modules.soa.mapper.common.basicmapper.tree.IMapperTreeView;
23: import org.netbeans.modules.soa.mapper.common.IMapperAutoLayout;
24: import org.netbeans.modules.soa.mapper.common.IMapperView;
25:
26: /**
27: * <p>
28: *
29: * Title: </p> MapperTreeAutoLayout<p>
30: *
31: * Description: </p> MapperTreeAutoLayout calls repaint() on the component of
32: * the tree view to perform the default auto layout function. <p>
33: *
34: * Copyright: Copyright (c) 2002 </p> <p>
35: *
36: * Company: </p>
37: *
38: * @author Un Seng Leong
39: * @created January 2, 2003
40: * @version 1.0
41: */
42:
43: public class MapperTreeAutoLayout implements IMapperAutoLayout {
44:
45: /**
46: * the instance of the tree view that this auto layout to perform
47: */
48: private IMapperTreeView mTreeView;
49:
50: /**
51: * Creates a new BasicMapperAutoLayout object.
52: *
53: * @param treeView Description of the Parameter
54: */
55: public MapperTreeAutoLayout(IMapperTreeView treeView) {
56: mTreeView = treeView;
57: }
58:
59: /**
60: * Return the mapper view that this layout performs to.
61: *
62: * @return the mapper view that this layout performs to.
63: */
64: public IMapperView getView() {
65: return mTreeView;
66: }
67:
68: /**
69: * This method just calls repaint() on the JTree instance.
70: */
71: public void autoLayout() {
72: mTreeView.getTree().repaint();
73: }
74: }
|