Revision 402

View differences:

trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/LayoutExtension.java
30 30

  
31 31
import org.slf4j.Logger;
32 32
import org.slf4j.LoggerFactory;
33

  
33 34
import org.gvsig.andami.IconThemeHelper;
34 35
import org.gvsig.andami.PluginServices;
35 36
import org.gvsig.andami.messages.NotificationManager;
......
41 42
import org.gvsig.app.project.documents.layout.FLayoutZooms;
42 43
import org.gvsig.app.project.documents.layout.LayoutManager;
43 44
import org.gvsig.app.project.documents.layout.gui.LayoutPanel;
45
import org.gvsig.i18n.Messages;
44 46
import org.gvsig.tools.ToolsLocator;
45 47
import org.gvsig.tools.persistence.PersistenceManager;
46 48
import org.gvsig.tools.persistence.PersistentState;
......
55 57
public class LayoutExtension extends Extension implements IPreferenceExtension {
56 58

  
57 59
    private static final Logger logger = LoggerFactory
58
        .getLogger(LayoutExtension.class);
60
            .getLogger(LayoutExtension.class);
59 61

  
60 62
    private LayoutPanel layout = null;
61 63

  
......
70 72

  
71 73
        if (s.equals("layout-navigation-pan")) {
72 74
            layout.getLayoutControl().setTool("layoutpan");
73
        } else
74
            if (s.equals("layout-navigation-zoom-in-topoint")) {
75
                layout.getLayoutControl().setTool("layoutzoomin");
76
            } else
77
                if (s.equals("layout-navigation-zoom-out-topoint")) {
78
                    layout.getLayoutControl().setTool("layoutzoomout");
79
                } else
80
                    if (s.equals("layout-navigation-zoom-all")) {
81
                        layout.getLayoutControl().fullRect();
82
                    } else
83
                        if (s.equals("layout-navigation-zoom-real")) {
84
                            zooms.realZoom();
85
                        } else
86
                            if (s.equals("layout-navigation-zoom-out-center")) {
87
                                zooms.zoomOut();
88
                            } else
89
                                if (s.equals("layout-navigation-zoom-in-center")) {
90
                                    zooms.zoomIn();
91
                                } else
92
                                    if (s.equals("layout-navigation-zoom-selected")) {
93
                                        zooms.zoomSelect();
94
                                    } else
95
                                        if (s.equals("application-layout-template-save")) {
96
                                            saveLayout();
97
                                        }
75
        }
76
        else if (s.equals("layout-navigation-zoom-in-topoint")) {
77
            layout.getLayoutControl().setTool("layoutzoomin");
78
        }
79
        else if (s.equals("layout-navigation-zoom-out-topoint")) {
80
            layout.getLayoutControl().setTool("layoutzoomout");
81
        }
82
        else if (s.equals("layout-navigation-zoom-all")) {
83
            layout.getLayoutControl().fullRect();
84
        }
85
        else if (s.equals("layout-navigation-zoom-real")) {
86
            zooms.realZoom();
87
        }
88
        else if (s.equals("layout-navigation-zoom-out-center")) {
89
            zooms.zoomOut();
90
        }
91
        else if (s.equals("layout-navigation-zoom-in-center")) {
92
            zooms.zoomIn();
93
        }
94
        else if (s.equals("layout-navigation-zoom-selected")) {
95
            zooms.zoomSelect();
96
        }
97
        else if (s.equals("application-layout-template-save")) {
98
            saveLayout();
99
        }
98 100
    }
99 101

  
100 102
    private void saveLayout() {
101 103
        layout = (LayoutPanel) PluginServices.getMDIManager().getActiveWindow();
102 104
        JFileChooser jfc = new JFileChooser();
103
        jfc.addChoosableFileFilter(new GenericFileFilter(
104
            LayoutManager.TEMPLATE_FILE_POINTEXT,
105
            PluginServices.getText(this, "plantilla")));
105
        GenericFileFilter layoutMainFilter = new GenericFileFilter(
106
                LayoutManager.TEMPLATE_FILE_POINTEXT,
107
                Messages.getText("_Layout_template") + " (*"
108
                        + LayoutManager.TEMPLATE_FILE_POINTEXT + ")");
109
        jfc.addChoosableFileFilter(layoutMainFilter);
110
        jfc.setFileFilter(layoutMainFilter);
106 111

  
107 112
        if (jfc.showSaveDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION) {
108 113
            File file = jfc.getSelectedFile();
109 114
            if (!(file.getPath().endsWith(
110
                LayoutManager.TEMPLATE_FILE_POINTEXT.toLowerCase())
111
                || file.getPath().endsWith(
112
                    LayoutManager.TEMPLATE_FILE_POINTEXT))) {
113
                file = new File(file.getPath() +
114
                    LayoutManager.TEMPLATE_FILE_POINTEXT);
115
                    LayoutManager.TEMPLATE_FILE_POINTEXT.toLowerCase()) || file
116
                    .getPath().endsWith(LayoutManager.TEMPLATE_FILE_POINTEXT))) {
117
                file = new File(file.getPath()
118
                        + LayoutManager.TEMPLATE_FILE_POINTEXT);
115 119
            }
116 120
            if (file.exists()) {
117
                int resp =
118
                    JOptionPane.showConfirmDialog((Component) PluginServices
119
                        .getMainFrame(), PluginServices.getText(this,
120
                        "fichero_ya_existe_seguro_desea_guardarlo"),
121
                int resp = JOptionPane.showConfirmDialog(
122
                        (Component) PluginServices.getMainFrame(),
123
                        PluginServices.getText(this,
124
                                "fichero_ya_existe_seguro_desea_guardarlo"),
121 125
                        PluginServices.getText(this, "guardar"),
122 126
                        JOptionPane.YES_NO_OPTION);
123 127
                if (resp != JOptionPane.YES_OPTION) {
......
126 130
            }
127 131

  
128 132
            try {
129
                FileOutputStream fos =
130
                    new FileOutputStream(file.getAbsolutePath());
131
                PersistenceManager persistenceManager =
132
                    ToolsLocator.getPersistenceManager();
133
                PersistentState persistentState =
134
                    persistenceManager.getState(layout);
133
                FileOutputStream fos = new FileOutputStream(
134
                        file.getAbsolutePath());
135
                PersistenceManager persistenceManager = ToolsLocator
136
                        .getPersistenceManager();
137
                PersistentState persistentState = persistenceManager
138
                        .getState(layout);
135 139
                persistenceManager.saveState(persistentState, fos);
136
            } catch (Exception e) {
140
            }
141
            catch (Exception e) {
137 142
                NotificationManager.addError(PluginServices.getText(this,
138
                    "Error_guardando_la_plantilla"), e);
143
                        "Error_guardando_la_plantilla"), e);
139 144
            }
140 145
        }
141 146
    }
......
160 165
     * @see org.gvsig.andami.plugins.IExtension#initialize()
161 166
     */
162 167
    public void initialize() {
163
    	registerPersistence();
168
        registerPersistence();
164 169
        registerIcons();
165 170
    }
166 171

  
......
169 174
        JavaTextFactory factory = new JavaTextFactory();
170 175
        manager.registerFactory(factory);
171 176
    }
172
    
177

  
173 178
    private void registerIcons() {
174
        
175
        IconThemeHelper.registerIcon("action", "application-layout-template-save", this);
176
        
177
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-in-center", this);
178
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-out-center", this);
179
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-in-topoint", this);
180
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-out-topoint", this);
181
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-all", this);
182
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-real", this);
183
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-selected", this);
179

  
180
        IconThemeHelper.registerIcon("action",
181
                "application-layout-template-save", this);
182

  
183
        IconThemeHelper.registerIcon("action",
184
                "layout-navigation-zoom-in-center", this);
185
        IconThemeHelper.registerIcon("action",
186
                "layout-navigation-zoom-out-center", this);
187
        IconThemeHelper.registerIcon("action",
188
                "layout-navigation-zoom-in-topoint", this);
189
        IconThemeHelper.registerIcon("action",
190
                "layout-navigation-zoom-out-topoint", this);
191
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-all",
192
                this);
193
        IconThemeHelper.registerIcon("action", "layout-navigation-zoom-real",
194
                this);
195
        IconThemeHelper.registerIcon("action",
196
                "layout-navigation-zoom-selected", this);
184 197
        IconThemeHelper.registerIcon("action", "layout-navigation-pan", this);
185 198

  
186
        IconThemeHelper.registerIcon("action", "layout-view-navigation-zoom-in-topoint", this);
187
        IconThemeHelper.registerIcon("action", "layout-view-navigation-zoom-out-topoint", this);
188
        IconThemeHelper.registerIcon("action", "layout-view-navigation-zoom-all", this);
189
        IconThemeHelper.registerIcon("action", "layout-view-navigation-pan", this);
199
        IconThemeHelper.registerIcon("action",
200
                "layout-view-navigation-zoom-in-topoint", this);
201
        IconThemeHelper.registerIcon("action",
202
                "layout-view-navigation-zoom-out-topoint", this);
203
        IconThemeHelper.registerIcon("action",
204
                "layout-view-navigation-zoom-all", this);
205
        IconThemeHelper.registerIcon("action", "layout-view-navigation-pan",
206
                this);
190 207
        // ================================================
191 208
        // Cursors
192
        IconThemeHelper.registerIcon("cursor", "cursor-layout-navigation-zoom-in-topoint", this);
193
        IconThemeHelper.registerIcon("cursor", "cursor-layout-navigation-zoom-out-topoint", this);
194
        IconThemeHelper.registerIcon("cursor", "cursor-selection-by-rectangle", this);
209
        IconThemeHelper.registerIcon("cursor",
210
                "cursor-layout-navigation-zoom-in-topoint", this);
211
        IconThemeHelper.registerIcon("cursor",
212
                "cursor-layout-navigation-zoom-out-topoint", this);
213
        IconThemeHelper.registerIcon("cursor", "cursor-selection-by-rectangle",
214
                this);
195 215
        IconThemeHelper.registerIcon("cursor", "cursor-selection-simple", this);
196
        IconThemeHelper.registerIcon("cursor", "cursor-selection-complex", this);
197
        IconThemeHelper.registerIcon("cursor", "cursor-layout-graphic-edit-vertex", this);
198
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-circle", this);
199
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-polyline", this);
200
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-point", this);
201
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-polygon", this);
202
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-rectangle", this);
203
        IconThemeHelper.registerIcon("cursor", "cursor-layout-view-navigation-zoom-in-topoint", this);
204
        IconThemeHelper.registerIcon("cursor", "cursor-layout-view-navigation-zoom-out-topoint", this);
216
        IconThemeHelper
217
                .registerIcon("cursor", "cursor-selection-complex", this);
218
        IconThemeHelper.registerIcon("cursor",
219
                "cursor-layout-graphic-edit-vertex", this);
220
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-circle",
221
                this);
222
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-polyline",
223
                this);
224
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-point",
225
                this);
226
        IconThemeHelper.registerIcon("cursor", "cursor-layout-insert-polygon",
227
                this);
228
        IconThemeHelper.registerIcon("cursor",
229
                "cursor-layout-insert-rectangle", this);
230
        IconThemeHelper.registerIcon("cursor",
231
                "cursor-layout-view-navigation-zoom-in-topoint", this);
232
        IconThemeHelper.registerIcon("cursor",
233
                "cursor-layout-view-navigation-zoom-out-topoint", this);
205 234
        // End cursors
206 235
        // ================================================
207 236

  
208 237
        IconThemeHelper.registerIcon("document", "document-map-icon", this);
209 238
        IconThemeHelper.registerIcon("document", "document-map-icon-sel", this);
210
        
239

  
211 240
        IconThemeHelper.registerIcon("layout", "neresize-icon", this);
212 241
        IconThemeHelper.registerIcon("layout", "eresize-icon", this);
213 242
        IconThemeHelper.registerIcon("layout", "nresize-icon", this);
214 243
        IconThemeHelper.registerIcon("layout", "graphic-move-icon", this);
215
        
244

  
216 245
        IconThemeHelper.registerIcon("layout", "sereresize-icon", this);
217 246
        IconThemeHelper.registerIcon("layout", "symboltag-icon", this);
218 247
        IconThemeHelper.registerIcon("layout", "numero-icon", this);
trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/LayoutMainExtension.java
104 104

  
105 105
/**
106 106
 * Extension que proporciona controles para crear proyectos nuevos, abrirlos y
107
 * guardarlos. Adem?s los tipos de tabla que soporta el proyecto son a?adidos
108
 * en esta clase.
107
 * guardarlos. Adem?s los tipos de tabla que soporta el proyecto son a?adidos en
108
 * esta clase.
109 109
 * 
110 110
 * @author Fernando Gonz?lez Cort?s
111 111
 */
112 112
public class LayoutMainExtension extends Extension {
113

  
113 114
    private static final Logger logger = LoggerFactory
114 115
            .getLogger(FFrameView.class);
116

  
115 117
    private String templatesPath;
116
    public static final String LAYOUT_TEMPLATE_FILECHOOSER_ID =
117
        "LAYOUT_TEMPLATE_FILECHOOSER_ID";
118 118

  
119
    public static final String LAYOUT_TEMPLATE_FILECHOOSER_ID = "LAYOUT_TEMPLATE_FILECHOOSER_ID";
120

  
119 121
    private void registerIcons() {
120
        
122

  
121 123
        IconThemeHelper.registerIcon("action",
122
            "application-layout-template-open", this);
124
                "application-layout-template-open", this);
123 125
    }
124 126

  
125 127
    public void initialize() {
......
151 153
            templatesPath = prefs.get("TemplatesFolder", null);
152 154
        }
153 155

  
154
        JFileChooser jfc =
155
            new JFileChooser(LAYOUT_TEMPLATE_FILECHOOSER_ID, templatesPath);
156
        jfc.addChoosableFileFilter(new GenericFileFilter(
157
            LayoutManager.TEMPLATE_FILE_POINTEXT,
158
            Messages.getText("_Layout_template") + " (*"
159
            + LayoutManager.TEMPLATE_FILE_POINTEXT + ")"
160
            ));
156
        JFileChooser jfc = new JFileChooser(LAYOUT_TEMPLATE_FILECHOOSER_ID,
157
                templatesPath);
158
        GenericFileFilter layoutMainExtensionFilter = new GenericFileFilter(
159
                LayoutManager.TEMPLATE_FILE_POINTEXT,
160
                Messages.getText("_Layout_template") + " (*"
161
                        + LayoutManager.TEMPLATE_FILE_POINTEXT + ")");
162
        jfc.addChoosableFileFilter(layoutMainExtensionFilter);
163
        jfc.setFileFilter(layoutMainExtensionFilter);
161 164

  
162 165
        if (jfc.showOpenDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION) {
163 166
            File file = jfc.getSelectedFile();
164 167
            try {
165 168
                if (!file.exists()) {
166 169
                    /*
167
                     * The user has written a file name instead of clicking on one
168
                     * and it does not exist
170
                     * The user has written a file name instead of clicking on
171
                     * one and it does not exist
169 172
                     */
170
                    File auxfile = new File(file.getPath() + LayoutManager.TEMPLATE_FILE_POINTEXT);
173
                    File auxfile = new File(file.getPath()
174
                            + LayoutManager.TEMPLATE_FILE_POINTEXT);
171 175
                    if (!auxfile.exists()) {
172 176
                        /*
173 177
                         * Not even this one exists: error
174 178
                         */
175
                        throw new IOException("File does not exist: " + file.getName());
176
                    } else {
179
                        throw new IOException("File does not exist: "
180
                                + file.getName());
181
                    }
182
                    else {
177 183
                        file = auxfile;
178 184
                    }
179 185
                }
......
181 187
                File xmlFile = new File(file.getAbsolutePath());
182 188
                FileInputStream is = new FileInputStream(xmlFile);
183 189

  
184
                PersistenceManager persistenceManager =
185
                    ToolsLocator.getPersistenceManager();
186
                PersistentState persistentState =
187
                    persistenceManager.loadState(is);
188
                layout =
189
                    (LayoutPanel) persistenceManager.create(persistentState);
190
                PersistenceManager persistenceManager = ToolsLocator
191
                        .getPersistenceManager();
192
                PersistentState persistentState = persistenceManager
193
                        .loadState(is);
194
                layout = (LayoutPanel) persistenceManager
195
                        .create(persistentState);
190 196

  
191
            } catch (Exception e) {
197
            }
198
            catch (Exception e) {
192 199
                String tit = Messages.getText("_Layout_template");
193 200
                String msg = null;
194
                
201

  
195 202
                if (e instanceof PersistenceException) {
196 203
                    msg = Messages.getText("_Bad_format_in_layout_template");
197
                } else {
204
                }
205
                else {
198 206
                    msg = Messages.getText("_Cant_load_layout_template");
199 207
                }
200
                
208

  
201 209
                msg = msg + ": " + file.getPath();
202 210
                msg = msg + "\n" + e.getMessage();
203 211
                logger.warn(msg, e);
204
                JOptionPane.showMessageDialog(
205
                    ApplicationLocator.getManager().getRootComponent(),
206
                    msg, tit, JOptionPane.ERROR_MESSAGE);
212
                JOptionPane.showMessageDialog(ApplicationLocator.getManager()
213
                        .getRootComponent(), msg, tit,
214
                        JOptionPane.ERROR_MESSAGE);
207 215
            }
208
            
216

  
209 217
            if (layout == null) {
210 218
                return;
211 219
            }
212 220

  
213
            LayoutDocument layoutDocument = (LayoutDocument) layout.getDocument();
221
            LayoutDocument layoutDocument = (LayoutDocument) layout
222
                    .getDocument();
214 223
            /*
215
                (LayoutDocument) ProjectManager.getInstance().createDocument(
216
                    DefaultLayoutManager.TYPENAME, file.getName());
217
                    */
218
                
224
             * (LayoutDocument) ProjectManager.getInstance().createDocument(
225
             * DefaultLayoutManager.TYPENAME, file.getName());
226
             */
227

  
219 228
            Project p = ApplicationLocator.getManager().getProjectManager()
220 229
                    .getCurrentProject();
221 230
            p.addDocument(layoutDocument);
222
            
231

  
223 232
            layout.getLayoutControl().setTool("layoutselect");
224
            
233

  
225 234
            LayoutManager lm = (LayoutManager) layoutDocument.getFactory();
226 235
            layout.setLayoutManager(lm);
227
            
236

  
228 237
            PluginServices.getMDIManager().addWindow(layout);
229 238

  
230 239
        }
......
233 242
    private void registerDocuments() {
234 243
        DefaultLayoutManager.register();
235 244
    }
236
    
245

  
237 246
    private void registerFFrames() {
238
        DefaultLayoutManager layoutManager =
239
            (DefaultLayoutManager) ProjectManager.getInstance()
247
        DefaultLayoutManager layoutManager = (DefaultLayoutManager) ProjectManager
248
                .getInstance()
240 249
                .getDocumentManager(DefaultLayoutManager.TYPENAME);
241
        
250

  
242 251
        // Register Frames
243 252
        layoutManager.registerFrameFactory(new FFrameBasicFactory());
244 253
        layoutManager.registerFrameFactory(new FFrameGraphicsFactory());
......
256 265

  
257 266
        // Register FFrameDialogs forms
258 267
        layoutManager.registerFFrameDialog(
259
            FFrameGraphics.PERSISTENCE_DEFINITION_NAME, FFrameGraphicsDialog.class);
268
                FFrameGraphics.PERSISTENCE_DEFINITION_NAME,
269
                FFrameGraphicsDialog.class);
260 270
        layoutManager.registerFFrameDialog(
261
            FFrameSymbol.PERSISTENCE_DEFINITION_NAME, FFrameGraphicsDialog.class);
271
                FFrameSymbol.PERSISTENCE_DEFINITION_NAME,
272
                FFrameGraphicsDialog.class);
262 273
        layoutManager.registerFFrameDialog(
263
            FFrameGroup.PERSISTENCE_DEFINITION_NAME, FFrameGroupDialog.class);
274
                FFrameGroup.PERSISTENCE_DEFINITION_NAME,
275
                FFrameGroupDialog.class);
264 276
        layoutManager.registerFFrameDialog(
265
            FFrameTable.PERSISTENCE_DEFINITION_NAME, FFrameBoxDialog.class);
277
                FFrameTable.PERSISTENCE_DEFINITION_NAME, FFrameBoxDialog.class);
266 278
        layoutManager.registerFFrameDialog(
267
            FFrameLegend.PERSISTENCE_DEFINITION_NAME, FFrameLegendDialog.class);
279
                FFrameLegend.PERSISTENCE_DEFINITION_NAME,
280
                FFrameLegendDialog.class);
268 281
        layoutManager.registerFFrameDialog(
269
            FFramePicture.PERSISTENCE_DEFINITION_NAME, FFramePictureDialog.class);
282
                FFramePicture.PERSISTENCE_DEFINITION_NAME,
283
                FFramePictureDialog.class);
270 284
        layoutManager.registerFFrameDialog(
271
            FFrameNorth.PERSISTENCE_DEFINITION_NAME, FFrameNorthDialog.class);
285
                FFrameNorth.PERSISTENCE_DEFINITION_NAME,
286
                FFrameNorthDialog.class);
272 287
        layoutManager.registerFFrameDialog(
273
            FFrameScaleBar.PERSISTENCE_DEFINITION_NAME, FFrameScaleBarDialog.class);
288
                FFrameScaleBar.PERSISTENCE_DEFINITION_NAME,
289
                FFrameScaleBarDialog.class);
274 290
        layoutManager.registerFFrameDialog(
275
            FFrameText.PERSISTENCE_DEFINITION_NAME, FFrameTextDialog.class);
291
                FFrameText.PERSISTENCE_DEFINITION_NAME, FFrameTextDialog.class);
276 292
        layoutManager.registerFFrameDialog(
277
            FFrameView.PERSISTENCE_DEFINITION_NAME, FFrameViewDialog.class);
293
                FFrameView.PERSISTENCE_DEFINITION_NAME, FFrameViewDialog.class);
278 294
        layoutManager.registerFFrameDialog(
279
            FFrameOverView.PERSISTENCE_DEFINITION_NAME, FFrameOverViewDialog.class);
295
                FFrameOverView.PERSISTENCE_DEFINITION_NAME,
296
                FFrameOverViewDialog.class);
280 297
        layoutManager.registerFFrameDialog(
281
            FFrameGrid.PERSISTENCE_DEFINITION_NAME, FFrameGridDialog.class);
282
        
298
                FFrameGrid.PERSISTENCE_DEFINITION_NAME, FFrameGridDialog.class);
299

  
283 300
        FFrame.initializeIcons();
284 301
        FFrameTable.initializeIcons();
285 302
    }
286
        
303

  
287 304
    private void registerContextMenuOptions() {
288
        LayoutManager layoutManager =
289
            (LayoutManager) ProjectManager.getInstance()
290
                .getDocumentManager("project.document.layout");
291
        
292
        layoutManager.registerLayoutMenuAction("Terminate", TerminateLayoutMenuEntry.class);
293
        layoutManager.registerLayoutMenuAction("Cancel", CancelLayoutMenuEntry.class);
294
        layoutManager.registerLayoutMenuAction("Copy", CopyLayoutMenuEntry.class);
305
        LayoutManager layoutManager = (LayoutManager) ProjectManager
306
                .getInstance().getDocumentManager("project.document.layout");
307

  
308
        layoutManager.registerLayoutMenuAction("Terminate",
309
                TerminateLayoutMenuEntry.class);
310
        layoutManager.registerLayoutMenuAction("Cancel",
311
                CancelLayoutMenuEntry.class);
312
        layoutManager.registerLayoutMenuAction("Copy",
313
                CopyLayoutMenuEntry.class);
295 314
        layoutManager.registerLayoutMenuAction("Cut", CutLayoutMenuEntry.class);
296
        layoutManager.registerLayoutMenuAction("Paste", PasteLayoutMenuEntry.class);
297
        layoutManager.registerLayoutMenuAction("Simplify", SimplifyLayoutMenuEntry.class);
298
        layoutManager.registerLayoutMenuAction("Property",PropertyLayoutMenuEntry.class);
299
        layoutManager.registerLayoutMenuAction("SelectAll", SelectAllLayoutMenuEntry.class);
300
        layoutManager.registerLayoutMenuAction("Behind", BehindLayoutMenuEntry.class);
301
        layoutManager.registerLayoutMenuAction("Before", BeforeLayoutMenuEntry.class);
302
        layoutManager.registerLayoutMenuAction("Position", PositionLayoutMenuEntry.class);
303
        layoutManager.registerLayoutMenuAction("Refresh", RefreshLayoutMenuEntry.class);
304
        
315
        layoutManager.registerLayoutMenuAction("Paste",
316
                PasteLayoutMenuEntry.class);
317
        layoutManager.registerLayoutMenuAction("Simplify",
318
                SimplifyLayoutMenuEntry.class);
319
        layoutManager.registerLayoutMenuAction("Property",
320
                PropertyLayoutMenuEntry.class);
321
        layoutManager.registerLayoutMenuAction("SelectAll",
322
                SelectAllLayoutMenuEntry.class);
323
        layoutManager.registerLayoutMenuAction("Behind",
324
                BehindLayoutMenuEntry.class);
325
        layoutManager.registerLayoutMenuAction("Before",
326
                BeforeLayoutMenuEntry.class);
327
        layoutManager.registerLayoutMenuAction("Position",
328
                PositionLayoutMenuEntry.class);
329
        layoutManager.registerLayoutMenuAction("Refresh",
330
                RefreshLayoutMenuEntry.class);
331

  
305 332
    }
306 333

  
307 334
    private void initializeDocumentActionsExtensionPoint() {
308 335
        ExtensionPointManager epMan = ToolsLocator.getExtensionPointManager();
309
        epMan.add("DocumentActions_Map",
310
            "Context menu options of the map document list"
311
                + " in the project window " + "(register instances of "
312
                + "org.gvsig.app.project.AbstractDocumentContextMenuAction)");
336
        epMan.add(
337
                "DocumentActions_Map",
338
                "Context menu options of the map document list"
339
                        + " in the project window "
340
                        + "(register instances of "
341
                        + "org.gvsig.app.project.AbstractDocumentContextMenuAction)");
313 342
    }
314 343

  
315 344
    public boolean isEnabled() {

Also available in: Unified diff