Revision 37146 branches/v2_0_0_prep/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/commands/FrameManager.java

View differences:

FrameManager.java
29 29
import org.gvsig.app.project.documents.layout.fframes.IFFrameViewDependence;
30 30

  
31 31
public class FrameManager {
32

  
33 32
    private ArrayList<IFFrame> fframes = new ArrayList<IFFrame>();
34 33
    private BitSet invalidates = new BitSet();
35 34

  
......
54 53
    }
55 54

  
56 55
    /**
57
     * Add a FFrame in the mechanism of control creating a command.
58
     * 
59
     * @param f
60
     *            FFrame to add
61
     */
62
    // public void addFFrame(IFFrame f) {
63
    // int virtualIndex = doAddFFrame(f);
64
    // AbstractCommand command=new InsertFrameCommand(this, f, virtualIndex);
65
    // command.setDescription(f.getNameFFrame());
66
    // if (complex) {
67
    // commands.add(command);
68
    // } else {
69
    // cr.add(command);
70
    // PluginServices.getMainFrame().enableControls();
71
    // }
72
    // }
73
    /**
74
     * Remove the FFrame by the index.
75
     * 
76
     * @param index
77
     */
78
    // public void removeFFrame(int index) {
79
    // if (invalidates.get(index)) {
80
    // return;
81
    // }
82
    // IFFrame frame=getFFrame(index);
83
    // doRemoveFFrame(index);
84
    // AbstractCommand command=new DeleteFrameCommand(this, index);
85
    // command.setDescription(frame.getNameFFrame());
86
    // if (complex) {
87
    // commands.add(command);
88
    // } else {
89
    // cr.add(command);
90
    // PluginServices.getMainFrame().enableControls();
91
    // }
92
    // }
93

  
94
    /**
95
     * Modify a fframe to another fframe new.
96
     * 
97
     * @param fant
98
     *            Previous Fframe.
99
     * @param fnew
100
     *            New FFrame.
101
     */
102
    // public boolean modifyFFrame(IFFrame fant, IFFrame fnew) {
103
    // int posAnt = -1;
104
    //
105
    // for (int i = 0; i < fframes.size(); i++) {
106
    // if (fframes.get(i).equals(fant) && !invalidates.get(i)) {
107
    // posAnt = i;
108
    // }
109
    // }
110
    // if (posAnt==-1)
111
    // return false;
112
    // int pos = doModifyFFrame(posAnt, fnew);
113
    // AbstractCommand command=new UpdateFrameCommand(this, fnew, posAnt, pos);
114
    // command.setDescription(fant.getNameFFrame());
115
    // if (complex) {
116
    // commands.add(command);
117
    // } else {
118
    // cr.add(command);
119
    // PluginServices.getMainFrame().enableControls();
120
    // }
121
    //
122
    // refreshDependences(fant, fnew);
123
    // return true;
124
    // }
125
    /**
126 56
     * Undo add FFrame from index.
127 57
     * 
128 58
     * @param index
......
294 224
    }
295 225

  
296 226
    public void clear() {
297
        // TODO Auto-generated method stub
298 227

  
299 228
    }
300 229
}

Also available in: Unified diff