View Javadoc

1   package org.telscenter.pas.otrunk.skeleton;
2   
3   import java.awt.Container;
4   
5   import javax.swing.JComponent;
6   import javax.swing.JFrame;
7   import javax.swing.JLabel;
8   
9   import org.concord.framework.otrunk.OTControllerService;
10  import org.concord.framework.otrunk.OTObject;
11  import org.concord.framework.otrunk.view.AbstractOTJComponentView;
12  import org.telscenter.pas.beans.PasProject;
13  import org.telscenter.pas.ui.frames.PasFrame;
14  
15  public class OTPasProjectView extends AbstractOTJComponentView {
16  
17  	private OTControllerService controllerService;
18  
19  	public JComponent getComponent(OTObject otPasProject) {
20  		controllerService = createControllerService();
21  		PasProject pasProject = (PasProject) controllerService
22  				.getRealObject(otPasProject);
23  		
24  		PasFrame frame = pasProject.getProjectFrame();
25  		
26  		//remember the content pane
27  		Container contentPane = frame.getContentPane();
28  		
29  		frame.showFrame();
30  		frame.setVisible(false);
31  		
32  		/* dispose the frame because it shows up as a blank window and
33  		   will pop back up and confuse the user when popups such as 
34  		   note or hints pop up */
35  		frame.dispose();
36  		
37  		return (JComponent) contentPane;
38  		//return (JComponent) frame.getContentPane();
39  		// return new JLabel("Loading Pas project, " + pasProject.getTitle());
40  	}
41  
42  	public void viewClosed() {
43  		// TODO Auto-generated method stub
44  
45  	}
46  
47  }