Revision 9392 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/gui/dialogs/FBorderDialog.java
FBorderDialog.java | ||
---|---|---|
57 | 57 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
58 | 58 |
import com.iver.cit.gvsig.fmap.core.adapter.GeometryAdapter; |
59 | 59 |
import com.iver.cit.gvsig.fmap.core.adapter.RectangleAdapter; |
60 |
import com.iver.cit.gvsig.gui.layout.Layout; |
|
61 |
import com.iver.cit.gvsig.gui.layout.fframes.FFrameGraphics; |
|
62 | 60 |
import com.iver.cit.gvsig.project.documents.layout.FLayoutGraphics; |
61 |
import com.iver.cit.gvsig.project.documents.layout.LayoutControl; |
|
62 |
import com.iver.cit.gvsig.project.documents.layout.fframes.FFrameGraphics; |
|
63 | 63 |
import com.iver.cit.gvsig.project.documents.layout.fframes.IFFrame; |
64 | 64 |
import com.iver.cit.gvsig.project.documents.layout.fframes.gui.dialogs.FFrameGraphicsDialog; |
65 |
import com.iver.cit.gvsig.project.documents.layout.gui.Layout; |
|
65 | 66 |
|
66 | 67 |
|
67 | 68 |
/** |
... | ... | |
108 | 109 |
flg = new FLayoutGraphics(layout); |
109 | 110 |
|
110 | 111 |
fframegraphics = new FFrameGraphics(); |
112 |
fframegraphics.setLayout(layout); |
|
111 | 113 |
|
112 | 114 |
fframegraphics.setColor(Color.black); |
113 |
fframegraphics.update(Layout.RECTANGLESIMPLE, layout.getAT());
|
|
115 |
fframegraphics.update(FFrameGraphics.RECTANGLE, layout.getLayoutControl().getAT());
|
|
114 | 116 |
|
115 | 117 |
|
116 | 118 |
initialize(); |
117 | 119 |
startFFrameGraphic(); |
118 | 120 |
} |
119 | 121 |
private void startFFrameGraphic() { |
120 |
IFFrame[] fframes=layout.getFFrames(); |
|
122 |
IFFrame[] fframes=layout.getLayoutContext().getFFrames();
|
|
121 | 123 |
double x = Double.parseDouble(getTIzquierda().getText() |
122 | 124 |
.toString()); |
123 | 125 |
double y = Double.parseDouble(getTSuperior().getText() |
... | ... | |
155 | 157 |
// creaer un Rect?ngulo que incluya a todos los fframes. |
156 | 158 |
} else if (getRbMargen().isSelected()) { |
157 | 159 |
// creaer un Rect?ngulo en los m?rgenes del Layout. |
158 |
re.setRect(layout.getAtributes().getArea()); |
|
160 |
re.setRect(layout.getLayoutContext().getAtributes().getArea());
|
|
159 | 161 |
} |
160 | 162 |
|
161 | 163 |
re.setRect(re.getX() - x, re.getY() - y, re.getWidth() + x + w, |
... | ... | |
180 | 182 |
* This method initializes this |
181 | 183 |
*/ |
182 | 184 |
private void initialize() { |
183 |
selecList=layout.getFFrameSelected(); |
|
185 |
selecList=layout.getLayoutContext().getFFrameSelected();
|
|
184 | 186 |
/*for (int i = 0; i < layout.getFFrames().size(); i++) { |
185 | 187 |
if (((IFFrame) layout.getFFrames().get(i)).getSelected() != IFFrame.NOSELECT) { |
186 | 188 |
selecList.add(layout.getFFrames().get(i)); |
... | ... | |
188 | 190 |
} |
189 | 191 |
*/ |
190 | 192 |
this.setLayout(null); |
191 |
m_NameUnit = layout.getAtributes().getNameUnit(); |
|
193 |
m_NameUnit = layout.getLayoutContext().getAtributes().getNameUnit();
|
|
192 | 194 |
this.add(getRbSeleccionados(), null); |
193 | 195 |
this.add(getRbTodos(), null); |
194 | 196 |
this.add(getRbMargen(), null); |
... | ... | |
544 | 546 |
bAceptar.setText(PluginServices.getText(this, "Aceptar")); |
545 | 547 |
bAceptar.addActionListener(new java.awt.event.ActionListener() { |
546 | 548 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
547 |
IFFrame[] fframes=layout.getFFrames(); |
|
549 |
IFFrame[] fframes=layout.getLayoutContext().getFFrames();
|
|
548 | 550 |
double x = Double.parseDouble(getTIzquierda().getText() |
549 | 551 |
.toString()); |
550 | 552 |
double y = Double.parseDouble(getTSuperior().getText() |
... | ... | |
583 | 585 |
// creaer un Rect?ngulo que incluya a todos los fframes. |
584 | 586 |
} else if (getRbMargen().isSelected()) { |
585 | 587 |
// creaer un Rect?ngulo en los m?rgenes del Layout. |
586 |
re.setRect(layout.getAtributes().getArea()); |
|
588 |
re.setRect(layout.getLayoutContext().getAtributes().getArea());
|
|
587 | 589 |
} |
588 | 590 |
|
589 | 591 |
re.setRect(re.getX() - x, re.getY() - y, re.getWidth() + x + w, |
... | ... | |
605 | 607 |
geometry.end(); |
606 | 608 |
fframegraphics.setGeometryAdapter(geometry); |
607 | 609 |
fframegraphics.setBoundBox(re); |
608 |
layout.addFFrame(fframegraphics, true,true); |
|
610 |
layout.getLayoutContext().addFFrame(fframegraphics, true,true);
|
|
609 | 611 |
} else { //Agrupar |
610 | 612 |
|
611 | 613 |
Rectangle2D re = new Rectangle2D.Double(); |
... | ... | |
637 | 639 |
// creaer un Rect?ngulo que incluya a todos los fframes. |
638 | 640 |
} else if (getRbMargen().isSelected()) { |
639 | 641 |
// creaer un Rect?ngulo en los m?rgenes del Layout. |
640 |
re.setRect(layout.getAtributes().getArea()); |
|
642 |
re.setRect(layout.getLayoutContext().getAtributes().getArea());
|
|
641 | 643 |
} |
642 | 644 |
|
643 | 645 |
re.setRect(re.getX() - x, re.getY() - y, re.getWidth() + x + w, |
... | ... | |
659 | 661 |
fframegraphics.setGeometryAdapter(geometry); |
660 | 662 |
fframegraphics.setBoundBox(re); |
661 | 663 |
|
662 |
layout.getEFS().startComplexCommand(); |
|
663 |
layout.addFFrame(fframegraphics, false,true); |
|
664 |
layout.getLayoutContext().getEFS().startComplexCommand();
|
|
665 |
layout.getLayoutContext().addFFrame(fframegraphics, false,true);
|
|
664 | 666 |
flg.grouping(); |
665 |
layout.getEFS().endComplexCommand(PluginServices.getText(this,"group_graphic_line")); |
|
667 |
layout.getLayoutContext().getEFS().endComplexCommand(PluginServices.getText(this,"group_graphic_line"));
|
|
666 | 668 |
|
667 | 669 |
} |
668 | 670 |
|
669 | 671 |
PluginServices.getMDIManager().closeWindow(FBorderDialog.this); |
670 |
layout.setStatus(Layout.DESACTUALIZADO);
|
|
671 |
layout.repaint(); |
|
672 |
layout.getLayoutControl().setStatus(LayoutControl.DESACTUALIZADO);
|
|
673 |
layout.getLayoutControl().repaint();
|
|
672 | 674 |
} |
673 | 675 |
}); |
674 | 676 |
} |
Also available in: Unified diff