Revision 21299 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/gui/dialogs/EventsFAlign.java

View differences:

EventsFAlign.java
52 52

  
53 53
import com.iver.andami.PluginServices;
54 54
import com.iver.cit.gvsig.project.documents.layout.commands.EditableFeatureSource;
55
import com.iver.cit.gvsig.project.documents.layout.commands.FrameCommandsRecord;
55 56
import com.iver.cit.gvsig.project.documents.layout.fframes.IFFrame;
56 57
import com.iver.cit.gvsig.project.documents.layout.gui.Layout;
57 58

  
......
90 91
            }
91 92
        }
92 93

  
93
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
94
        efs.startComplexCommand();
94
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
95
        efs.startComplex();
95 96

  
96 97
        for (int i = fframes.length - 1; i >= 0; i--) {
97 98
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
100 101
                                                              .clone();
101 102
            r.x = xmin;
102 103
            fframe.setBoundBox(r);
103
            efs.modifyFFrame(fframes[i], fframe);
104
            efs.update(fframes[i], fframe);
104 105
        }
105 106

  
106
        efs.endComplexCommand(PluginServices.getText(this, "align_left"));
107
        efs.endComplex(PluginServices.getText(this, "align_left"));
107 108
    }
108 109

  
109 110
    /**
......
112 113
    private void alignLeftL() {
113 114
        double xmin = 0;
114 115
        IFFrame[] fframes = m_layout.getLayoutContext().getFFrameSelected();
115
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
116
        efs.startComplexCommand();
116
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
117
        efs.startComplex();
117 118

  
118 119
        for (int i = 0; i < fframes.length; i++) {
119 120
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
122 123
                                                              .clone();
123 124
            r.x = xmin;
124 125
            fframe.setBoundBox(r);
125
            efs.modifyFFrame(fframes[i], fframe);
126
            efs.update(fframes[i], fframe);
126 127
        }
127 128

  
128
        efs.endComplexCommand(PluginServices.getText(this,
129
                "align_to_layout_left"));
129
        efs.endComplex(PluginServices.getText(this,"align_to_layout_left"));
130 130
    }
131 131

  
132 132
    /**
......
147 147
            }
148 148
        }
149 149

  
150
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
151
        efs.startComplexCommand();
150
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
151
        efs.startComplex();
152 152

  
153 153
        for (int i = 0; i < fframes.length; i++) {
154 154
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
157 157
                                                              .clone();
158 158
            r.x = xcenter - (fframe.getBoundBox().width / 2);
159 159
            fframe.setBoundBox(r);
160
            efs.modifyFFrame(fframes[i], fframe);
160
            efs.update(fframes[i], fframe);
161 161
        }
162 162

  
163
        efs.endComplexCommand(PluginServices.getText(this, "align_center"));
163
        efs.endComplex(PluginServices.getText(this, "align_center"));
164 164
    }
165 165

  
166 166
    /**
......
171 171
        xcenter = m_layout.getLayoutContext().getAtributes().m_sizePaper.getAncho() / 2;
172 172

  
173 173
        IFFrame[] fframes = m_layout.getLayoutContext().getFFrameSelected();
174
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
175
        efs.startComplexCommand();
174
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
175
        efs.startComplex();
176 176

  
177 177
        for (int i = 0; i < fframes.length; i++) {
178 178
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
181 181
                                                              .clone();
182 182
            r.x = xcenter - (fframe.getBoundBox().width / 2);
183 183
            fframe.setBoundBox(r);
184
            efs.modifyFFrame(fframes[i], fframe);
184
            efs.update(fframes[i], fframe);
185 185
        }
186 186

  
187
        efs.endComplexCommand(PluginServices.getText(this,
188
                "align_to_layout_center"));
187
        efs.endComplex(PluginServices.getText(this,"align_to_layout_center"));
189 188
    }
190 189

  
191 190
    /**
......
204 203
            }
205 204
        }
206 205

  
207
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
208
        efs.startComplexCommand();
206
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
207
        efs.startComplex();
209 208

  
210 209
        for (int i = 0; i < fframes.length; i++) {
211 210
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
214 213
                                                              .clone();
215 214
            r.x = xmax - fframes[i].getBoundBox().width;
216 215
            fframe.setBoundBox(r);
217
            efs.modifyFFrame(fframes[i], fframe);
216
            efs.update(fframes[i], fframe);
218 217
        }
219 218

  
220
        efs.endComplexCommand(PluginServices.getText(this, "align_right"));
219
        efs.endComplex(PluginServices.getText(this, "align_right"));
221 220
    }
222 221

  
223 222
    /**
......
228 227
        xmax = m_layout.getLayoutContext().getAtributes().m_sizePaper.getAncho();
229 228

  
230 229
        IFFrame[] fframes = m_layout.getLayoutContext().getFFrameSelected();
231
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
232
        efs.startComplexCommand();
230
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
231
        efs.startComplex();
233 232

  
234 233
        for (int i = 0; i < fframes.length; i++) {
235 234
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
238 237
                                                              .clone();
239 238
            r.x = xmax - fframes[i].getBoundBox().width;
240 239
            fframe.setBoundBox(r);
241
            efs.modifyFFrame(fframes[i], fframe);
240
            efs.update(fframes[i], fframe);
242 241
        }
243 242

  
244
        efs.endComplexCommand(PluginServices.getText(this,
243
        efs.endComplex(PluginServices.getText(this,
245 244
                "align_to_layout_right"));
246 245
    }
247 246

  
......
261 260
            }
262 261
        }
263 262

  
264
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
265
        efs.startComplexCommand();
263
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
264
        efs.startComplex();
266 265

  
267 266
        for (int i = 0; i < fframes.length; i++) {
268 267
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
271 270
                                                              .clone();
272 271
            r.y = ymax - fframe.getBoundBox().height;
273 272
            fframe.setBoundBox(r);
274
            efs.modifyFFrame(fframes[i], fframe);
273
            efs.update(fframes[i], fframe);
275 274
        }
276 275

  
277
        efs.endComplexCommand(PluginServices.getText(this, "align_down"));
276
        efs.endComplex(PluginServices.getText(this, "align_down"));
278 277
    }
279 278

  
280 279
    /**
......
285 284
        ymax = m_layout.getLayoutContext().getAtributes().m_sizePaper.getAlto();
286 285

  
287 286
        IFFrame[] fframes = m_layout.getLayoutContext().getFFrameSelected();
288
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
289
        efs.startComplexCommand();
287
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
288
        efs.startComplex();
290 289

  
291 290
        for (int i = 0; i < fframes.length; i++) {
292 291
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
294 293
                                                              .clone();
295 294
            r.y = ymax - fframe.getBoundBox().height;
296 295
            fframe.setBoundBox(r);
297
            efs.modifyFFrame(fframes[i], fframe);
296
            efs.update(fframes[i], fframe);
298 297
        }
299 298

  
300
        efs.endComplexCommand(PluginServices.getText(this,
299
        efs.endComplex(PluginServices.getText(this,
301 300
                "align_to_layout_down"));
302 301
    }
303 302

  
......
317 316
            }
318 317
        }
319 318

  
320
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
321
        efs.startComplexCommand();
319
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
320
        efs.startComplex();
322 321

  
323 322
        for (int i = 0; i < fframes.length; i++) {
324 323
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
326 325
                                                              .clone();
327 326
            r.y = ymin;
328 327
            fframe.setBoundBox(r);
329
            efs.modifyFFrame(fframes[i], fframe);
328
            efs.update(fframes[i], fframe);
330 329
        }
331 330

  
332
        efs.endComplexCommand(PluginServices.getText(this, "align_up"));
331
        efs.endComplex(PluginServices.getText(this, "align_up"));
333 332
    }
334 333

  
335 334
    /**
......
338 337
    private void alignUpL() {
339 338
        double ymin = 0;
340 339
        IFFrame[] fframes = m_layout.getLayoutContext().getFFrameSelected();
341
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
342
        efs.startComplexCommand();
340
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
341
        efs.startComplex();
343 342

  
344 343
        for (int i = 0; i < fframes.length; i++) {
345 344
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
347 346
                                                              .clone();
348 347
            r.y = ymin;
349 348
            fframe.setBoundBox(r);
350
            efs.modifyFFrame(fframes[i], fframe);
349
            efs.update(fframes[i], fframe);
351 350
        }
352 351

  
353
        efs.endComplexCommand(PluginServices.getText(this, "align_to_layout_up"));
352
        efs.endComplex(PluginServices.getText(this, "align_to_layout_up"));
354 353
    }
355 354

  
356 355
    /**
......
371 370
            }
372 371
        }
373 372

  
374
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
375
        efs.startComplexCommand();
373
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
374
        efs.startComplex();
376 375

  
377 376
        for (int i = 0; i < fframes.length; i++) {
378 377
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
380 379
                                                              .clone();
381 380
            r.y = ycenter - (fframe.getBoundBox().height / 2);
382 381
            fframe.setBoundBox(r);
383
            efs.modifyFFrame(fframes[i], fframe);
382
            efs.update(fframes[i], fframe);
384 383
        }
385 384

  
386
        efs.endComplexCommand(PluginServices.getText(this,
385
        efs.endComplex(PluginServices.getText(this,
387 386
                "align_vertical_center"));
388 387
    }
389 388

  
......
395 394
        ycenter = m_layout.getLayoutContext().getAtributes().m_sizePaper.getAlto() / 2;
396 395

  
397 396
        IFFrame[] fframes = m_layout.getLayoutContext().getFFrameSelected();
398
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
399
        efs.startComplexCommand();
397
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
398
        efs.startComplex();
400 399

  
401 400
        for (int i = 0; i < fframes.length; i++) {
402 401
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
404 403
                                                              .clone();
405 404
            r.y = ycenter - (fframe.getBoundBox().height / 2);
406 405
            fframe.setBoundBox(r);
407
            efs.modifyFFrame(fframes[i], fframe);
406
            efs.update(fframes[i], fframe);
408 407
        }
409 408

  
410
        efs.endComplexCommand(PluginServices.getText(this,
409
        efs.endComplex(PluginServices.getText(this,
411 410
                "align_to_layout_vertical_center"));
412 411
    }
413 412

  
......
436 435

  
437 436
        double dif = xmax - xmin;
438 437
        double dist = dif / num;
439
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
440
        efs.startComplexCommand();
438
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
439
        efs.startComplex();
441 440

  
442 441
        for (int i = 0; i < fframes.length; i++) {
443 442
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
445 444
                                                              .clone();
446 445
            r.x = xmin + (dist * i);
447 446
            fframe.setBoundBox(r);
448
            efs.modifyFFrame(fframes[i], fframe);
447
            efs.update(fframes[i], fframe);
449 448
        }
450 449

  
451
        efs.endComplexCommand(PluginServices.getText(this, "distributes_left"));
450
        efs.endComplex(PluginServices.getText(this, "distributes_left"));
452 451
    }
453 452

  
454 453
    /**
......
466 465

  
467 466
        double dif = xmax - xmin;
468 467
        double dist = dif / num;
469
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
470
        efs.startComplexCommand();
468
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
469
        efs.startComplex();
471 470

  
472 471
        for (int i = 0; i < fframes.length; i++) {
473 472
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
475 474
                                                              .clone();
476 475
            r.x = xmin + (dist * i);
477 476
            fframe.setBoundBox(r);
478
            efs.modifyFFrame(fframes[i], fframe);
477
            efs.update(fframes[i], fframe);
479 478
        }
480 479

  
481
        efs.endComplexCommand(PluginServices.getText(this,
480
        efs.endComplex(PluginServices.getText(this,
482 481
                "distributes_to_layout_left"));
483 482
    }
484 483

  
......
507 506

  
508 507
        double dif = xmax - xmin;
509 508
        double dist = dif / num;
510
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
511
        efs.startComplexCommand();
509
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
510
        efs.startComplex();
512 511

  
513 512
        for (int i = 0; i < fframes.length; i++) {
514 513
            IFFrame fframe = fframes[i];
......
516 515
                                                              .clone();
517 516
            r.x = xmax - (dist * i) - fframe.getBoundBox().width;
518 517
            fframe.setBoundBox(r);
519
            efs.modifyFFrame(fframes[i], fframe);
518
            efs.update(fframes[i], fframe);
520 519
        }
521 520

  
522
        efs.endComplexCommand(PluginServices.getText(this, "distributes_right"));
521
        efs.endComplex(PluginServices.getText(this, "distributes_right"));
523 522
    }
524 523

  
525 524
    /**
......
537 536

  
538 537
        double dif = xmax - xmin;
539 538
        double dist = dif / num;
540
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
541
        efs.startComplexCommand();
539
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
540
        efs.startComplex();
542 541

  
543 542
        for (int i = 0; i < fframes.length; i++) {
544 543
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
546 545
                                                              .clone();
547 546
            r.x = xmax - (dist * i) - fframe.getBoundBox().width;
548 547
            fframe.setBoundBox(r);
549
            efs.modifyFFrame(fframes[i], fframe);
548
            efs.update(fframes[i], fframe);
550 549
        }
551 550

  
552
        efs.endComplexCommand(PluginServices.getText(this,
551
        efs.endComplex(PluginServices.getText(this,
553 552
                "distributes_to_layout_right"));
554 553
    }
555 554

  
......
578 577

  
579 578
        double dif = ymax - ymin;
580 579
        double dist = dif / num;
581
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
582
        efs.startComplexCommand();
580
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
581
        efs.startComplex();
583 582

  
584 583
        for (int i = 0; i < fframes.length; i++) {
585 584
            IFFrame fframe = fframes[i];
......
587 586
                                                              .clone();
588 587
            r.y = ymin + (dist * i);
589 588
            fframe.setBoundBox(r);
590
            efs.modifyFFrame(fframes[i], fframe);
589
            efs.update(fframes[i], fframe);
591 590
        }
592 591

  
593
        efs.endComplexCommand(PluginServices.getText(this, "distributes_up"));
592
        efs.endComplex(PluginServices.getText(this, "distributes_up"));
594 593
    }
595 594

  
596 595
    /**
......
609 608

  
610 609
        double dif = ymax - ymin;
611 610
        double dist = dif / num;
612
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
613
        efs.startComplexCommand();
611
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
612
        efs.startComplex();
614 613

  
615 614
        for (int i = 0; i < fframes.length; i++) {
616 615
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
618 617
                                                              .clone();
619 618
            r.y = ymin + (dist * i);
620 619
            fframe.setBoundBox(r);
621
            efs.modifyFFrame(fframes[i], fframe);
620
            efs.update(fframes[i], fframe);
622 621
        }
623 622

  
624
        efs.endComplexCommand(PluginServices.getText(this,
623
        efs.endComplex(PluginServices.getText(this,
625 624
                "distributes_to_layout_up"));
626 625
    }
627 626

  
......
650 649

  
651 650
        double dif = ymax - ymin;
652 651
        double dist = dif / num;
653
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
654
        efs.startComplexCommand();
652
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
653
        efs.startComplex();
655 654

  
656 655
        for (int i = 0; i < fframes.length; i++) {
657 656
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
659 658
                                                              .clone();
660 659
            r.y = ymax - (dist * i) - fframe.getBoundBox().height;
661 660
            fframe.setBoundBox(r);
662
            efs.modifyFFrame(fframes[i], fframe);
661
            efs.update(fframes[i], fframe);
663 662
        }
664 663

  
665
        efs.endComplexCommand(PluginServices.getText(this, "distributes_down"));
664
        efs.endComplex(PluginServices.getText(this, "distributes_down"));
666 665
    }
667 666

  
668 667
    /**
......
681 680

  
682 681
        double dif = ymax - ymin;
683 682
        double dist = dif / num;
684
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
685
        efs.startComplexCommand();
683
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
684
        efs.startComplex();
686 685

  
687 686
        for (int i = fframes.length - 1; i >= 0; i--) {
688 687
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
690 689
                                                              .clone();
691 690
            r.y = ymax - (dist * i) - fframe.getBoundBox().height;
692 691
            fframe.setBoundBox(r);
693
            efs.modifyFFrame(fframes[i], fframe);
692
            efs.update(fframes[i], fframe);
694 693
        }
695 694

  
696
        efs.endComplexCommand(PluginServices.getText(this,
695
        efs.endComplex(PluginServices.getText(this,
697 696
                "distributes_to_layout_down"));
698 697
    }
699 698

  
......
721 720

  
722 721
        double dif = xmax - xmin;
723 722
        double dist = dif / num;
724
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
725
        efs.startComplexCommand();
723
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
724
        efs.startComplex();
726 725

  
727 726
        for (int i = 0; i < fframes.length; i++) {
728 727
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
731 730
            r.x = (xmin + (((dist) * (i + 1)) - (dist / 2))) -
732 731
                (fframe.getBoundBox().width / 2);
733 732
            fframe.setBoundBox(r);
734
            efs.modifyFFrame(fframes[i], fframe);
733
            efs.update(fframes[i], fframe);
735 734
        }
736 735

  
737
        efs.endComplexCommand(PluginServices.getText(this,
736
        efs.endComplex(PluginServices.getText(this,
738 737
                "distributes_vertical"));
739 738
    }
740 739

  
......
753 752

  
754 753
        double dif = xmax - xmin;
755 754
        double dist = dif / num;
756
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
757
        efs.startComplexCommand();
755
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
756
        efs.startComplex();
758 757

  
759 758
        for (int i = 0; i < fframes.length; i++) {
760 759
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
763 762
            r.x = (xmin + (((dist) * (i + 1)) - (dist / 2))) -
764 763
                (fframe.getBoundBox().width / 2);
765 764
            fframe.setBoundBox(r);
766
            efs.modifyFFrame(fframes[i], fframe);
765
            efs.update(fframes[i], fframe);
767 766
        }
768 767

  
769
        efs.endComplexCommand(PluginServices.getText(this,
768
        efs.endComplex(PluginServices.getText(this,
770 769
                "distributes_to_layout_vertical"));
771 770
    }
772 771

  
......
794 793

  
795 794
        double dif = ymax - ymin;
796 795
        double dist = dif / num;
797
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
798
        efs.startComplexCommand();
796
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
797
        efs.startComplex();
799 798

  
800 799
        for (int i = 0; i < fframes.length; i++) {
801 800
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
804 803
            r.y = (ymin + (((dist) * (i + 1)) - (dist / 2))) -
805 804
                (fframe.getBoundBox().height / 2);
806 805
            fframe.setBoundBox(r);
807
            efs.modifyFFrame(fframes[i], fframe);
806
            efs.update(fframes[i], fframe);
808 807
        }
809 808

  
810
        efs.endComplexCommand(PluginServices.getText(this,
809
        efs.endComplex(PluginServices.getText(this,
811 810
                "distributes_horizontal"));
812 811
    }
813 812

  
......
826 825

  
827 826
        double dif = ymax - ymin;
828 827
        double dist = dif / num;
829
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
830
        efs.startComplexCommand();
828
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
829
        efs.startComplex();
831 830

  
832 831
        for (int i = 0; i < fframes.length; i++) {
833 832
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
836 835
            r.y = (ymin + (((dist) * (i + 1)) - (dist / 2))) -
837 836
                (fframe.getBoundBox().height / 2);
838 837
            fframe.setBoundBox(r);
839
            efs.modifyFFrame(fframes[i], fframe);
838
            efs.update(fframes[i], fframe);
840 839
        }
841 840

  
842
        efs.endComplexCommand(PluginServices.getText(this,
841
        efs.endComplex(PluginServices.getText(this,
843 842
                "distributes_to_layout_horizontal"));
844 843
    }
845 844

  
......
859 858
            }
860 859
        }
861 860

  
862
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
863
        efs.startComplexCommand();
861
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
862
        efs.startComplex();
864 863

  
865 864
        for (int i = 0; i < fframes.length; i++) {
866 865
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
868 867
                                                              .clone();
869 868
            r.width = wmax;
870 869
            fframe.setBoundBox(r);
871
            efs.modifyFFrame(fframes[i], fframe);
870
            efs.update(fframes[i], fframe);
872 871
        }
873 872

  
874
        efs.endComplexCommand(PluginServices.getText(this, "change_width"));
873
        efs.endComplex(PluginServices.getText(this, "change_width"));
875 874
    }
876 875

  
877 876
    /**
......
890 889
            }
891 890
        }
892 891

  
893
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
894
        efs.startComplexCommand();
892
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
893
        efs.startComplex();
895 894

  
896 895
        for (int i = 0; i < fframes.length; i++) {
897 896
            IFFrame fframe = fframes[i].cloneFFrame(m_layout);
......
899 898
                                                              .clone();
900 899
            r.height = hmax;
901 900
            fframe.setBoundBox(r);
902
            efs.modifyFFrame(fframes[i], fframe);
901
            efs.update(fframes[i], fframe);
903 902
        }
904 903

  
905
        efs.endComplexCommand(PluginServices.getText(this, "change_height"));
904
        efs.endComplex(PluginServices.getText(this, "change_height"));
906 905
    }
907 906

  
908 907
    /**
......
951 950

  
952 951
        double dist = total / (num - 1);
953 952
        Iterator k = treemap.keySet().iterator();
954
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
955
        efs.startComplexCommand();
953
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
954
        efs.startComplex();
956 955

  
957 956
        if (k.hasNext()) {
958 957
            IFFrame fframe = (IFFrame) treemap.get(k.next());
......
963 962
                                                                   .clone();
964 963
                r.x = dist;
965 964
                fframeA.setBoundBox(r);
966
                efs.modifyFFrame(fframe, fframeA);
965
                efs.update(fframe, fframeA);
967 966
            }
968 967

  
969 968
            while (k.hasNext()) {
......
973 972
                                                                   .clone();
974 973
                r.x = fframeA.getBoundBox().getMaxX() + dist;
975 974
                fframeS.setBoundBox(r);
976
                efs.modifyFFrame(fframeAux, fframeS);
975
                efs.update(fframeAux, fframeS);
977 976
                fframeA = fframeS;
978 977
            }
979 978
        }
980 979

  
981
        efs.endComplexCommand(PluginServices.getText(this, "horizontal_space"));
980
        efs.endComplex(PluginServices.getText(this, "horizontal_space"));
982 981
    }
983 982

  
984 983
    /**
......
1028 1027

  
1029 1028
        double dist = total / (num - 1);
1030 1029
        Iterator k = treemap.keySet().iterator();
1031
        EditableFeatureSource efs = m_layout.getLayoutContext().getEFS();
1032
        efs.startComplexCommand();
1030
        FrameCommandsRecord efs = m_layout.getLayoutContext().getEFS();
1031
        efs.startComplex();
1033 1032

  
1034 1033
        if (k.hasNext()) {
1035 1034
            IFFrame fframe = (IFFrame) treemap.get(k.next());
......
1040 1039
                                                                   .clone();
1041 1040
                r.y = dist;
1042 1041
                fframeA.setBoundBox(r);
1043
                efs.modifyFFrame(fframe, fframeA);
1042
                efs.update(fframe, fframeA);
1044 1043
            }
1045 1044

  
1046 1045
            while (k.hasNext()) {
......
1050 1049
                                                                   .clone();
1051 1050
                r.y = fframeA.getBoundBox().getMaxY() + dist;
1052 1051
                fframeS.setBoundBox(r);
1053
                efs.modifyFFrame(fframeAux, fframeS);
1052
                efs.update(fframeAux, fframeS);
1054 1053
                fframeA = fframeS;
1055 1054
            }
1056 1055
        }
1057 1056

  
1058
        efs.endComplexCommand(PluginServices.getText(this, "vertical_space"));
1057
        efs.endComplex(PluginServices.getText(this, "vertical_space"));
1059 1058
    }
1060 1059

  
1061 1060
    /**

Also available in: Unified diff