DocumentView.java (d0dd86958) | DocumentView.java (58a988d9) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 23 24// __________ Imports __________ 25 26import com.sun.star.uno.UnoRuntime; 27 --- 159 unchanged lines hidden (view full) --- 187 // be listener for closing the application 188 this.enableEvents(AWTEvent.WINDOW_EVENT_MASK); 189 } 190 191 // ____________________ 192 193 /** 194 * Create the view frame for showing the office documents on demand. | 20 *************************************************************/ 21 22 23 24// __________ Imports __________ 25 26import com.sun.star.uno.UnoRuntime; 27 --- 159 unchanged lines hidden (view full) --- 187 // be listener for closing the application 188 this.enableEvents(AWTEvent.WINDOW_EVENT_MASK); 189 } 190 191 // ____________________ 192 193 /** 194 * Create the view frame for showing the office documents on demand. |
195 * Dependend from given command line parameter we create | 195 * Dependent from given command line parameter we create |
196 * an office XFrame and initialize it with a window. This 197 * window can be a pure toolkit window (means toolkit of office!) 198 * or a plugged java canvas - office window combination. 199 */ 200 public void createFrame() 201 { 202 // create view frame (as a XFrame!) here | 196 * an office XFrame and initialize it with a window. This 197 * window can be a pure toolkit window (means toolkit of office!) 198 * or a plugged java canvas - office window combination. 199 */ 200 public void createFrame() 201 { 202 // create view frame (as a XFrame!) here |
203 // Look for right view mode setted by user command line parameter. 204 // First try to get a new unambigous frame name from our global ViewContainer. | 203 // Look for right view mode set by user command line parameter. 204 // First try to get a new unambiguous frame name from our global ViewContainer. |
205 if(ViewContainer.mbInplace==true) 206 { 207 // inplace document view can't be initialized without a visible parent window hierarchy! 208 // So make sure that we are visible in every case! 209 this.setVisible(true); 210 mxFrame = FunctionHelper.createViewFrame(msName,maDocumentView); 211 } 212 else --- 115 unchanged lines hidden (view full) --- 328 maStatusView = null; 329 maCustomizeView = null; 330 331 // disable all interceptions 332 maInterceptor.shutdown(); 333 maInterceptor = null; 334 335 // close the frame and his document | 205 if(ViewContainer.mbInplace==true) 206 { 207 // inplace document view can't be initialized without a visible parent window hierarchy! 208 // So make sure that we are visible in every case! 209 this.setVisible(true); 210 mxFrame = FunctionHelper.createViewFrame(msName,maDocumentView); 211 } 212 else --- 115 unchanged lines hidden (view full) --- 328 maStatusView = null; 329 maCustomizeView = null; 330 331 // disable all interceptions 332 maInterceptor.shutdown(); 333 maInterceptor = null; 334 335 // close the frame and his document |
336 // Relaesing of our listener connections for disposing() | 336 // Releasing of our listener connections for disposing() |
337 // will be forced automatically then. Because the frame 338 // will call us back ... 339 if (mxFrame!=null) 340 FunctionHelper.closeFrame(mxFrame); 341 342 // deregister this view in the global container 343 // Normally we should die afterwards by garbage collection ... 344 // In case this was the last view - it forces a system.exit(). --- 75 unchanged lines hidden --- | 337 // will be forced automatically then. Because the frame 338 // will call us back ... 339 if (mxFrame!=null) 340 FunctionHelper.closeFrame(mxFrame); 341 342 // deregister this view in the global container 343 // Normally we should die afterwards by garbage collection ... 344 // In case this was the last view - it forces a system.exit(). --- 75 unchanged lines hidden --- |