Revision 1714 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/FLayoutGraphics.java
FLayoutGraphics.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
import java.awt.geom.Rectangle2D; |
25 | 25 |
import java.util.ArrayList; |
26 |
|
|
27 |
import org.slf4j.Logger; |
|
28 |
import org.slf4j.LoggerFactory; |
|
29 | 26 |
import org.gvsig.andami.PluginServices; |
30 | 27 |
import org.gvsig.app.project.ProjectManager; |
31 | 28 |
import org.gvsig.app.project.documents.layout.fframes.FFrameGroup; |
... | ... | |
33 | 30 |
import org.gvsig.app.project.documents.layout.fframes.IFFrame; |
34 | 31 |
import org.gvsig.app.project.documents.layout.fframes.IFFrameUseFMap; |
35 | 32 |
import org.gvsig.app.project.documents.layout.fframes.gui.dialogs.FFrameDialogNotification; |
36 |
import org.gvsig.app.project.documents.layout.fframes.gui.dialogs.FFrameViewDialog; |
|
37 | 33 |
import org.gvsig.app.project.documents.layout.fframes.gui.dialogs.IFFrameDialog; |
38 | 34 |
import org.gvsig.app.project.documents.layout.gui.LayoutPanel; |
39 | 35 |
import org.gvsig.app.project.documents.layout.gui.dialogs.FAlignDialog; |
... | ... | |
41 | 37 |
import org.gvsig.app.project.documents.layout.gui.dialogs.FPositionDialog; |
42 | 38 |
import org.gvsig.tools.observer.Observable; |
43 | 39 |
import org.gvsig.tools.observer.Observer; |
44 |
import org.gvsig.tools.swing.api.ToolsSwingLocator;
|
|
45 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
|
|
40 |
import org.slf4j.Logger;
|
|
41 |
import org.slf4j.LoggerFactory;
|
|
46 | 42 |
|
47 | 43 |
/** |
48 | 44 |
* Operaciones realizadas sobre el conjunto de FFrames. |
... | ... | |
53 | 49 |
|
54 | 50 |
protected static final Logger LOG = LoggerFactory |
55 | 51 |
.getLogger(FLayoutGraphics.class); |
56 |
private LayoutPanel layout; |
|
52 |
private final LayoutPanel layout;
|
|
57 | 53 |
private FAlignDialog m_alignLayout = null; |
58 | 54 |
private FBorderDialog borderdialog = null; |
59 | 55 |
private FPositionDialog positiondialog = null; |
... | ... | |
176 | 172 |
*/ |
177 | 173 |
public void aligning() { |
178 | 174 |
m_alignLayout = new FAlignDialog(layout); |
179 |
WindowManager winManager = ToolsSwingLocator.getWindowManager(); |
|
175 |
// WindowManager winManager = ToolsSwingLocator.getWindowManager();
|
|
180 | 176 |
// winManager.showWindow(m_alignLayout, "Alinear", WindowManager.MODE.TOOL); |
181 | 177 |
PluginServices.getMDIManager().addWindow(m_alignLayout); |
182 | 178 |
} |
... | ... | |
257 | 253 |
|
258 | 254 |
if (selecList.length == 1) { |
259 | 255 |
final IFFrame frame = selecList[0]; |
260 |
final IFFrameDialog fframeDialog = layout.createFFrameDialog(frame); |
|
256 |
final IFFrameDialog fframeDialog = (IFFrameDialog) layout.createFFrameDialog(frame);
|
|
261 | 257 |
if (fframeDialog != null) { |
262 |
Observer onPanelClosedObserver = new Observer() { |
|
263 |
public void update(Observable observable, |
|
264 |
Object notification) { |
|
265 |
if (notification instanceof FFrameDialogNotification && |
|
266 |
((FFrameDialogNotification)notification).getType()==FFrameDialogNotification.DIALOG_CLOSED) { |
|
267 |
onDialogClosed(fframeDialog, frame, observer); |
|
268 |
} |
|
269 |
} |
|
270 |
}; |
|
258 |
Observer onPanelClosedObserver = (Observable observable, Object notification) -> { |
|
259 |
if (notification instanceof FFrameDialogNotification && |
|
260 |
((FFrameDialogNotification)notification).getType()==FFrameDialogNotification.DIALOG_CLOSED) { |
|
261 |
onDialogClosed(fframeDialog, frame, observer); |
|
262 |
} |
|
263 |
}; |
|
271 | 264 |
fframeDialog.addObserver(onPanelClosedObserver); |
272 | 265 |
if (observer!=null) { |
273 | 266 |
fframeDialog.addObserver(observer); |
... | ... | |
339 | 332 |
|
340 | 333 |
IFFrame[] fframes = layout.getLayoutContext().getSelectedFFrames(); |
341 | 334 |
if (fframes.length != 0) { |
342 |
for (int i = 0; i < fframes.length; i++) {
|
|
343 |
positiondialog = new FPositionDialog(layout, fframes[i]);
|
|
335 |
for (IFFrame fframe : fframes) {
|
|
336 |
positiondialog = new FPositionDialog(layout, fframe); |
|
344 | 337 |
PluginServices.getMDIManager().addWindow(positiondialog); |
345 | 338 |
} |
346 | 339 |
} |
Also available in: Unified diff