Revision 41854
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/ToolsWindowManager.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
import javax.swing.JComponent; |
33 | 33 |
import javax.swing.JPanel; |
34 |
import javax.swing.event.AncestorEvent; |
|
35 |
import javax.swing.event.AncestorListener; |
|
34 | 36 |
|
35 | 37 |
import org.gvsig.andami.PluginServices; |
36 | 38 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
... | ... | |
111 | 113 |
this.contents.addComponentListener(this); |
112 | 114 |
} |
113 | 115 |
|
116 |
public void fireClosingWindow() { |
|
117 |
this.contents.removeComponentListener(this); |
|
118 |
ComponentListener[] l = this.contents.getComponentListeners(); |
|
119 |
for( int i=0; i<l.length; i++) { |
|
120 |
l[i].componentHidden(new ComponentEvent(this, i)); |
|
121 |
} |
|
122 |
} |
|
123 |
|
|
114 | 124 |
public WindowInfo getWindowInfo() { |
115 | 125 |
return this.windowInfo; |
116 | 126 |
} |
... | ... | |
136 | 146 |
public void componentShown(ComponentEvent arg0) { |
137 | 147 |
// Do nothing |
138 | 148 |
} |
139 |
|
|
149 |
|
|
140 | 150 |
} |
141 | 151 |
} |
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 | ||
---|---|---|
65 | 65 |
import javax.swing.event.InternalFrameEvent; |
66 | 66 |
import javax.swing.event.InternalFrameListener; |
67 | 67 |
|
68 |
import org.gvsig.andami.IconThemeHelper; |
|
69 | 68 |
import org.gvsig.andami.PluginServices; |
70 | 69 |
import org.gvsig.andami.plugins.Extension; |
70 |
import org.gvsig.andami.ui.ToolsWindowManager; |
|
71 | 71 |
import org.gvsig.andami.ui.mdiFrame.GlassPane; |
72 | 72 |
import org.gvsig.andami.ui.mdiFrame.MDIFrame; |
73 | 73 |
import org.gvsig.andami.ui.mdiFrame.NewStatusBar; |
... | ... | |
986 | 986 |
// e.getInternalFrame().getTitle()); |
987 | 987 |
|
988 | 988 |
JInternalFrame c = (JInternalFrame) e.getSource(); |
989 |
try { |
|
990 |
ToolsWindowManager.Window wwin = (ToolsWindowManager.Window) c.getContentPane().getComponent(0); |
|
991 |
wwin.fireClosingWindow(); |
|
992 |
} catch(Throwable ex) { |
|
993 |
|
|
994 |
} |
|
995 |
|
|
989 | 996 |
WindowInfo wi = wis.getWindowInfo((IWindow) fws.getWindow(c)); |
990 | 997 |
|
991 | 998 |
IWindow win = fws.getWindow(c); |
992 | 999 |
callWindowClosed(win); |
993 |
boolean alwaysLive; |
|
1000 |
// boolean alwaysLive;
|
|
994 | 1001 |
if (win instanceof SingletonWindow) { |
995 | 1002 |
sws.closeWindow((SingletonWindow) win); |
996 | 1003 |
} |
... | ... | |
998 | 1005 |
fws.closeWindow(win); |
999 | 1006 |
|
1000 | 1007 |
panel.remove(c); |
1001 |
|
|
1008 |
|
|
1002 | 1009 |
wss.remove(win); |
1003 | 1010 |
|
1004 | 1011 |
if (!wi.isPalette()) |
Also available in: Unified diff