contextMenu.removeAll();
if (canOpen()) {
String pop1 = ClientContext.getString("watingList.popup.openKarte");
JMenuItem openKarte = new JMenuItem(new ReflectAction(pop1, PatientSearchImpl.this, "openKarte"));
JMenuItem addAsPvt = new JMenuItem(new ReflectAction("受付登録", PatientSearchImpl.this, "addAsPvt"));
openKarte.setIconTextGap(8);
addAsPvt.setIconTextGap(8);
contextMenu.add(openKarte);
contextMenu.add(addAsPvt);
}
JCheckBoxMenuItem item = new JCheckBoxMenuItem("年齢表示");
item.setIconTextGap(12);
contextMenu.add(item);
item.setSelected(ageDisplay);
item.addActionListener(EventHandler.create(ActionListener.class, PatientSearchImpl.this, "switchAgeDisplay"));
// 検索結果をファイル保存
int selectedRowCount = view.getTable().getSelectedRowCount();
if (selectedRowCount > 0) {
JMenuItem export = new JMenuItem(new ReflectAction("選択された " + selectedRowCount + " 件をファイル保存", PatientSearchImpl.this, "exportSearchResult"));
export.setIconTextGap(8);
contextMenu.add(export);
}
contextMenu.show(e.getComponent(), e.getX(), e.getY());