Update of /cvsroot/openproj/openproj_ui/src/com/projity/pm/graphic/frames
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4844/src/com/projity/pm/graphic/frames
Modified Files:
StartupFactory.java GraphicManager.java
Log Message:
Index: StartupFactory.java
===================================================================
RCS file: /cvsroot/openproj/openproj_ui/src/com/projity/pm/graphic/frames/StartupFactory.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- StartupFactory.java 21 Oct 2008 23:37:46 -0000 1.27
+++ StartupFactory.java 13 Nov 2008 22:31:00 -0000 1.28
@@ -100,10 +100,15 @@
protected Map credentials=new HashMap();
protected long projectId;
protected HashMap opts=null;
-
+ private boolean instanceFromNewSessionDone;
+ private static StartupFactory instance = null;
protected StartupFactory() {
+ instance = this;
// System.out.println("---------- StartupFactory");
}
+ public static StartupFactory getInstance() {
+ return instance;
+ }
/**
* Used to test restoring of workspace to simulate applet restart
@@ -155,7 +160,7 @@
VersionUtils.versionCheck(true);
if (!VersionUtils.isJnlpUpToDate()) System.out.println("Jnlp isn't up to date, current version is: "+VersionUtils.getJnlpVersion());
long t=System.currentTimeMillis();
-// System.out.println("---------- StartupFactory instanceFromNewSession#1 main");
+ System.out.println("---------- StartupFactory instanceFromNewSession#1 main");
Environment.setClientSide(true);
System.setSecurityManager(null);
@@ -230,6 +235,7 @@
}finally{
graphicManager.finishInitialization();
}
+ instanceFromNewSessionDone = true;
return graphicManager;
}
@@ -366,7 +372,7 @@
/*
* Returns null if shouldn't open, returns false if open read only, true if open writable
*
- */ public static Boolean verifyOpenWritable(Long projectId) {
+ */ public Boolean verifyOpenWritable(Long projectId) {
if (projectId == null || projectId == 0)
return null;
if (ProjectFactory.getInstance().isResourcePoolOpenAndWritable()) {
Index: GraphicManager.java
===================================================================
RCS file: /cvsroot/openproj/openproj_ui/src/com/projity/pm/graphic/frames/GraphicManager.java,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- GraphicManager.java 24 Oct 2008 00:10:55 -0000 1.61
+++ GraphicManager.java 13 Nov 2008 22:31:00 -0000 1.62
@@ -312,6 +312,7 @@
public GraphicManager(/*String[] projectUrl,*/ String server,Container container) throws HeadlessException {
graphicManagers.add(this);
lastGraphicManager = this;
+ SessionFactory.getInstance().setJobQueue(getJobQueue());
container.addFocusListener(new FocusListener() {
public void focusGained(FocusEvent e) {
@@ -510,6 +511,10 @@
final DocumentFrame frame = new DocumentFrame(this,project,tabId);
if (frame == null) // in case of out memory error
return null;
+ if (getFrameManager() == null) {
+ System.out.println("frame manager null, so initView being called");
+ initView();
+ }
getFrameManager().addFrame(frame);
// DocumentFrame newDocumentFrame = (DocumentFrame)getFrameManager().getFrame(tabId);
@@ -2389,8 +2394,9 @@
//System.setProperty("com.apple.mrj.application.apple.menu.about.name", Messages.getMetaString("Text.ShortTitle"));
JMenuBar menu = getMenuManager().getMenu(Environment.getStandAlone()?MenuManager.MAC_STANDARD_MENU:MenuManager.SERVER_STANDARD_MENU);
//((JComponent)menu).setBorder(BorderFactory.createEmptyBorder());
-
- ((JFrame)container).setJMenuBar(menu);
+ if (!(container instanceof JApplet)) {
+ ((JFrame)container).setJMenuBar(menu);
+ }
projectListMenu = (JMenu) menu.getComponent(5);
}
@@ -2679,6 +2685,7 @@
}
public void initView() {
+ System.out.println("initView");
Container c=container;
if (container!=null && container instanceof RootPaneContainer){
c=((RootPaneContainer)container).getContentPane();
@@ -2811,7 +2818,7 @@
if (Environment.getStandAlone()) OSXAdapter.setFileHandler(this, getClass().getDeclaredMethod("openFile", new Class[] { String.class }));
} catch (Exception e) {
System.err.println("Error while loading the OSXAdapter:");
- e.printStackTrace();
+ // e.printStackTrace();
}
}
}
|