Revision 24346 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/feature/impl/commands/implementation/SelectionCommandReverse.java
SelectionCommandReverse.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Gobernment (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2008 {DiSiD Technologies} {Implement data selection} |
|
26 |
*/ |
|
1 | 27 |
package org.gvsig.fmap.data.feature.impl.commands.implementation; |
2 | 28 |
|
29 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
3 | 30 |
import org.gvsig.fmap.data.feature.FeatureReferenceSelection; |
4 | 31 |
import org.gvsig.fmap.data.feature.impl.commands.AbstractCommand; |
5 |
import org.gvsig.tools.exception.NotYetImplemented; |
|
6 | 32 |
|
33 |
/** |
|
34 |
* Command to allow undo and redo over a reverse operation performed on a |
|
35 |
* selection. |
|
36 |
* |
|
37 |
* @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a> |
|
38 |
*/ |
|
7 | 39 |
public class SelectionCommandReverse extends AbstractCommand { |
8 | 40 |
|
9 |
public SelectionCommandReverse(FeatureReferenceSelection selection) { |
|
10 |
// TODO Auto-generated constructor stub |
|
11 |
throw new NotYetImplemented(); |
|
12 |
} |
|
41 |
private final FeatureReferenceSelection selection; |
|
13 | 42 |
|
14 |
public void execute() { |
|
15 |
// TODO Auto-generated method stub |
|
43 |
/** |
|
44 |
* Creates a new SelectionCommandReverse over a selection. |
|
45 |
* |
|
46 |
* @param selection |
|
47 |
* where the reverse has been performed |
|
48 |
*/ |
|
49 |
public SelectionCommandReverse(FeatureReferenceSelection selection) { |
|
50 |
this.selection = selection; |
|
51 |
} |
|
16 | 52 |
|
17 |
} |
|
53 |
public void execute() { |
|
54 |
// Nothing to do |
|
55 |
} |
|
18 | 56 |
|
19 |
public String getType() { |
|
20 |
// TODO Auto-generated method stub |
|
21 |
return null; |
|
22 |
} |
|
57 |
public String getType() { |
|
58 |
return "selectionReverse"; |
|
59 |
} |
|
60 |
|
|
61 |
public void undo() throws DataException { |
|
62 |
selection.reverse(); |
|
63 |
} |
|
23 | 64 |
|
24 |
public void redo() { |
|
25 |
// TODO Auto-generated method stub |
|
26 |
|
|
27 |
} |
|
28 |
|
|
29 |
public void undo() { |
|
30 |
// TODO Auto-generated method stub |
|
31 |
|
|
32 |
} |
|
33 |
|
|
34 |
} |
|
65 |
public void redo() throws DataException { |
|
66 |
selection.reverse(); |
|
67 |
} |
|
68 |
} |
Also available in: Unified diff