getPatient().getPatientId());
windowSupport = WindowSupport.create(title);
JMenuBar myMenuBar = windowSupport.getMenuBar();
MainFrame frame = windowSupport.getFrame();
frame.setName("editorFrame");
frame.removeStatusPanel();
statusPanel = new StatusPanel(); // dummy 表示はしない AbstractChartDocument から呼ばれるので
statusPanel.add("", "message");
MainFrame.MainPanel mainPanel = frame.getMainPanel();
mainPanel.setLayout(new BorderLayout(0,0));
MainFrame.CommandPanel comPanel = frame.getCommandPanel();
//content = new JPanel(new BorderLayout());
//
// Mediator が変更になる
//
mediator = new ChartMediator(this);
//
// MenuBar を生成する
//
MenuFactory appMenu = new MenuFactory();
appMenu.setMenuSupports(realChart.getContext().getMenuSupport(), mediator);
appMenu.build(myMenuBar);
mediator.registerActions(appMenu.getActionMap());
myToolPanel = appMenu.getToolPanelProduct();
//content.add(myToolPanel, BorderLayout.NORTH);
myToolPanel.setOpaque(false);
comPanel.add(myToolPanel);
comPanel.setBottomLineAlpha(0.4f);
//
// このクラス固有のToolBarを生成する
//
ChartToolBar toolBar = new ChartToolBar(this);
myToolPanel.add(toolBar);
//statusPanel = new StatusPanel();
if (view != null) {
mode = EditorMode.BROWSER;
view.setContext(EditorFrame.this);
view.start();
scroller = new JScrollPane(view.getUI());
mediator.enabledAction(GUIConst.ACTION_NEW_DOCUMENT, false);
} else if (editor != null) {
mode = EditorMode.EDITOR;
editor.setContext(EditorFrame.this);
editor.initialize();
editor.start();
//pns^ scroller = new JScrollPane(editor.getUI());
scroller = new MyJScrollPane(editor.getUI());
scroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
//pns$
mediator.enabledAction(GUIConst.ACTION_NEW_KARTE, false);
mediator.enabledAction(GUIConst.ACTION_NEW_DOCUMENT, false);
//pns KarteEditor で save が完了したら通知される
editor.getBoundSupport().addPropertyChangeListener(KarteEditor.SAVE_DONE, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
stop();
}
});
}
//content.add(scroller, BorderLayout.CENTER);
mainPanel.add(scroller, BorderLayout.CENTER);
//frame.getContentPane().setLayout(new BorderLayout(0, 7));
//frame.getContentPane().add(content, BorderLayout.CENTER);
//pns frame.getContentPane().add((JPanel) statusPanel, BorderLayout.SOUTH);
//pns resMap.injectComponents(frame);
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
processWindowClosing();
}
});
blockGlass = new BlockGlass();
frame.setGlassPane(blockGlass);
// Frame の大きさをストレージからロードする
int x = ClientContext.getInt("editorFrame.frameX");
int y = ClientContext.getInt("editorFrame.frameY");
int width = ClientContext.getInt("editorFrame.frameWidth");
int height = ClientContext.getInt("editorFrame.frameHeight");
Rectangle bounds = PreferencesUtils.getRectangle(prefs, PN_FRAME, new Rectangle(x,y,width,height));
frame.setBounds(bounds);
windowSupport.getFrame().setVisible(true);
Runnable awt = new Runnable() {
@Override
public void run() {