Java调用Windows API,支持Office
源代码在线查看: framemanager.java
package org.jawin.browser.gui;
/**
* Title: Jawin Code Generation GUI
* Description: GUI for exploring type libraries and generating Java code
* Copyright: Copyright (c) 2003
* Company: Open Source Incentive
* @author Josh Passenger
* @version 1.0
*/
public class FrameManager
{
private static FrameManager instance = null;
private TypeBrowserFrame rootFrame = null;
private FrameManager()
{
}
public static synchronized void initialize(TypeBrowserFrame newRootFrame)
{
instance = new FrameManager();
instance.rootFrame = newRootFrame;
}
public static FrameManager getInstance()
{
if (instance == null)
{
throw new IllegalStateException("FrameManager.getInstance() FrameManager was not initialized");
}
return instance;
}
public TypeBrowserFrame getRootFrame()
{
return rootFrame;
}
}