// WindowSupport を生成する この時点で Frame,WindowMenu を持つMenuBar が生成されている
String title = ClientContext.getFrameTitle(windowTitle);
// System.out.println(title);
windowSupport = WindowSupport.create(title);
MainFrame myFrame = windowSupport.getFrame(); // MainWindow の JFrame
JMenuBar myMenuBar = windowSupport.getMenuBar(); // MainWindow の JMenuBar
// Windowにこのクラス固有の設定をする
Point loc = new Point(defaultX, defaultY);
Dimension size = new Dimension(defaultWidth, defaultHeight);
myFrame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
processExit();
}
//@Override
//public void windowActivated(WindowEvent e) {
// int index = tabbedPane.getSelectedIndex();
// MainComponent plugin = (MainComponent) providers.get(String.valueOf(index));
// plugin.enter();
//}
});
ComponentMemory cm = new ComponentMemory(myFrame, loc, size, this);
cm.setToPreferenceBounds();
// BlockGlass を設定する
blockGlass = new BlockGlass();
blockGlass.setSize(myFrame.getSize());
myFrame.setGlassPane(blockGlass);
// mainWindowのメニューを生成しメニューバーに追加する
mediator = new Mediator(this);
MenuFactory appMenu = new MenuFactory();
appMenu.setMenuSupports(mediator, null);
appMenu.build(myMenuBar);
mediator.registerActions(appMenu.getActionMap());
// mainWindowのコンテントGUIを生成しFrameに追加する
tabbedPane = new PNSTabbedPane();
tabbedPane.setButtonVgap(4);
tabbedPane.getButtonPanel().setBackgroundColor(Color.BLACK, 0f, 0.1f);
MainFrame.MainPanel mainPanel = myFrame.getMainPanel();
mainPanel.setLayout(new BorderLayout(0,0));
mainPanel.add(tabbedPane, BorderLayout.CENTER);
// MainComponent では,MainFrame の CommandPanel, StatusPanel は使わない
// MainComponentPanel で自前で用意する
myFrame.removeCommandPanel();
myFrame.removeStatusPanel();
// タブペインに格納する Plugin をロードする
MainComponent[] plugin = new MainComponent[3];
plugin[0] = new WatingListImpl();
plugin[1] = new PatientSearchImpl();