Revision 9950
trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/FrameWindowSupport.java | ||
---|---|---|
145 | 145 |
return frame; |
146 | 146 |
} |
147 | 147 |
} |
148 |
|
|
149 |
/** |
|
150 |
* Gets the frame associated to the provided IWindow panel. |
|
151 |
* The frame will usually be a JInternalFrame or a JDialog. |
|
152 |
* |
|
153 |
* @param panel The IWindow panel whose frame wants to be retrieved. |
|
154 |
* |
|
155 |
* @return The associated frame, it will usually be a JInternalFrame or |
|
156 |
* a JDialog. |
|
157 |
*/ |
|
158 |
public Component getFrame(IWindow panel) { |
|
159 |
Object object = viewFrame.get(panel); |
|
160 |
if (object!=null && object instanceof Component) { |
|
161 |
return (Component) object; |
|
162 |
} |
|
163 |
else { |
|
164 |
PluginServices.getLogger().error("window_not_found_"+panel.getWindowInfo().getTitle()); |
|
165 |
return null; |
|
166 |
} |
|
167 |
} |
|
148 | 168 |
|
149 | 169 |
public JInternalFrame createJInternalFrame(IWindow p) |
150 | 170 |
{ |
... | ... | |
171 | 191 |
return (IWindow) frameView.get(dlg); |
172 | 192 |
} |
173 | 193 |
|
174 |
public Component getFrame(IWindow window) { |
|
175 |
return (Component) viewFrame.get(window); |
|
176 |
} |
|
177 |
|
|
178 | 194 |
public void closeWindow(IWindow v){ |
179 | 195 |
Object c = viewFrame.remove(v); |
180 | 196 |
frameView.remove(c); |
Also available in: Unified diff