Revision 42770 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/mdiManager/NewSkin.java

View differences:

NewSkin.java
1263 1263
    }
1264 1264

  
1265 1265
    public void showWindow(final JPanel panel, final String title, final MODE mode) {
1266
        // This prepare a default JPanel that implements IWindow 
1266
        // This prepare a default JPanel that implements IWindow
1267 1267
        // for the passed panel and call to the addWindow
1268 1268
        // to show it.
1269 1269
        if (!SwingUtilities.isEventDispatchThread()) {
......
1277 1277
        ToolsSwingLocator.getWindowManager().showWindow(panel, title, mode);
1278 1278
    }
1279 1279

  
1280
    public IWindow getWindow(JPanel panel){
1281
        Iterator<IWindow> i = fws.getWindowIterator();
1282

  
1283
        while (i.hasNext()) {
1284
            IWindow window = (IWindow) i.next();
1285
            if(window instanceof JPanel){
1286
                JPanel p = (JPanel)window;
1287
                if(p.getComponentCount()==1){
1288
                    if(p.getComponent(0) == panel){
1289
                        return window;
1290
                    }
1291
                }
1292
            }
1293
        }
1294
        return null;
1295
    }
1296

  
1280 1297
    private Point getLocationForAlignment(IWindow panel, int mode) {
1281 1298

  
1282 1299
        // The top-left square of frame reference

Also available in: Unified diff