Revision 567 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/DefaultLayoutManager.java
DefaultLayoutManager.java | ||
---|---|---|
141 | 141 |
} |
142 | 142 |
|
143 | 143 |
public IWindow getMainWindow(Document doc, WindowLayout layout) { |
144 |
LayoutPanel layoutPanel; |
|
145 |
layoutPanel = |
|
146 |
(LayoutPanel) PluginServices.getMDIManager().getSingletonWindow( |
|
147 |
getMainWindowClass(), doc); |
|
148 |
if (layoutPanel != null) { |
|
149 |
// The layout window document is already created, return it. |
|
150 |
return layoutPanel; |
|
144 |
LayoutPanel layoutPanel = (LayoutPanel) super.getMainWindow(doc, layout); |
|
145 |
if (layoutPanel == null) { |
|
146 |
layoutPanel = (LayoutPanel) this.createDocumentWindow(doc); |
|
147 |
if (layout != null) { |
|
148 |
layoutPanel.setWindowLayout(layout); |
|
149 |
layoutPanel.setLayoutManager(this); |
|
150 |
layoutPanel.getLayoutControl().fullRect(); |
|
151 |
layoutPanel.getWindowInfo().setTitle( |
|
152 |
PluginServices.getText(this, "Mapa") + " : " |
|
153 |
+ layoutPanel.getName()); |
|
154 |
} |
|
151 | 155 |
} |
152 |
|
|
153 |
layoutPanel = (LayoutPanel) this.createDocumentWindow(doc); |
|
154 |
if (layout != null) { |
|
155 |
layoutPanel.setWindowLayout(layout); |
|
156 |
} |
|
157 |
layoutPanel.setLayoutManager(this); |
|
158 |
layoutPanel.getLayoutControl().fullRect(); |
|
159 |
layoutPanel.getWindowInfo().setTitle( |
|
160 |
PluginServices.getText(this, "Mapa") + " : " |
|
161 |
+ layoutPanel.getName()); |
|
162 | 156 |
((AbstractDocument) doc).raiseEventCreateWindow(layoutPanel); |
163 | 157 |
return layoutPanel; |
164 | 158 |
} |
... | ... | |
239 | 233 |
extensionPoint.append(name, name, clazz); |
240 | 234 |
} |
241 | 235 |
|
236 |
@Override |
|
242 | 237 |
public IWindow getPropertiesWindow(Document doc) { |
243 |
return new MapProperties((LayoutDocument) doc); |
|
238 |
IWindow win = super.getPropertiesWindow(doc); |
|
239 |
if( win == null ) { |
|
240 |
win = new MapProperties((LayoutDocument) doc); |
|
241 |
} |
|
242 |
return win; |
|
244 | 243 |
} |
245 | 244 |
|
246 | 245 |
/** |
Also available in: Unified diff