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: * Portions Copyrighted 2007 Sun Microsystems, Inc.
16: */
17: package org.netbeans.modules.bpel.mapper.tree;
18:
19: import org.netbeans.modules.soa.mappercore.Mapper;
20:
21: /**
22: *
23: * @author Alexey
24: * @author Vitaly Bychkov
25: */
26: public interface TreeExpandedState {
27:
28: /**
29: * Mapper should be updated in case if it was rebuilted
30: * @param mapper - new mapper value
31: */
32: void setMapper(Mapper mapper);
33:
34: /**
35: * Store Expanded state
36: */
37: void save();
38:
39: /**
40: * Restore expanded state
41: */
42: void restore();
43:
44: /**
45: * Step is a one part of treePath, allows to store and restore tree path for
46: * different tree instances but with the same values
47: *
48: */
49: public static class Step {
50:
51: protected String name;
52: protected int index;
53:
54: public Step(String name, int index) {
55: this .name = name;
56: this .index = index;
57: }
58:
59: public int getIndex() {
60: return this .index;
61: }
62:
63: public String getName() {
64: return this .name;
65: }
66:
67: @Override
68: public String toString() {
69: return "Name: " + name + " Index: " + index;
70: }
71: }
72: }
|