Revision 46215
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/ToolsWindowManager.java | ||
---|---|---|
43 | 43 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE; |
44 | 44 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
45 | 45 |
import org.gvsig.tools.swing.impl.windowmanager.DefaultDialog; |
46 |
import org.gvsig.tools.util.PropertiesSupport; |
|
46 | 47 |
|
47 | 48 |
|
48 | 49 |
/** |
... | ... | |
66 | 67 |
|
67 | 68 |
@Override |
68 | 69 |
public void showWindow(JComponent contents, String title, MODE mode) { |
69 |
showWindow(contents, title, mode, getAlign(mode), null, 0); |
|
70 |
int flags = getFlags(contents); |
|
71 |
showWindow(contents, title, mode, getAlign(mode), null, flags); |
|
70 | 72 |
} |
71 | 73 |
|
72 | 74 |
@Override |
73 | 75 |
public void showWindow(final JComponent contents, final String title, final MODE mode, final Image icon, final int flags) { |
74 |
showWindow(contents, title, mode, getAlign(mode), icon, 0);
|
|
76 |
showWindow(contents, title, mode, getAlign(mode), icon, flags);
|
|
75 | 77 |
} |
76 | 78 |
// |
77 | 79 |
// public void showWindow(final JComponent contents, final String title, final MODE mode, final int align) { |
... | ... | |
232 | 234 |
showWindow(contents, title, mode, align, icon, 0); |
233 | 235 |
} |
234 | 236 |
|
237 |
private int getFlags(JComponent comp) { |
|
238 |
try { |
|
239 |
if( !(comp instanceof PropertiesSupport) ) { |
|
240 |
return 0; |
|
241 |
} |
|
242 |
int flags = ((Number) ((PropertiesSupport)comp).getProperty("WindowInfo.Flags")).intValue(); |
|
243 |
return flags; |
|
244 |
} catch(Exception ex) { |
|
245 |
return 0; |
|
246 |
} |
|
247 |
} |
|
235 | 248 |
} |
Also available in: Unified diff