public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; Container cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { JInternalFrame frame = (JInternalFrame) cont; if (frame instanceof ICFBamSwingInt16ColJPanelCommon) { ICFBamSwingInt16ColJPanelCommon jpanelCommon = (ICFBamSwingInt16ColJPanelCommon) frame; jpanelCommon.setPanelMode(CFJPanel.PanelMode.Unknown); ICFBamInt16ColEditObj editObj = (ICFBamInt16ColEditObj) jpanelCommon.getSwingFocusAsInt16Col().getEdit(); if (editObj != null) { editObj.endEdit(); } } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "frame", frame, "ICFBamSwingInt16ColJPanelCommon"); } try { frame.setClosed(true); } catch (Exception x) { } } }
public void setPanelMode(CFJPanel.PanelMode value) { final String S_ProcName = "setPanelMode"; CFJPanel.PanelMode oldMode = getPanelMode(); if (oldMode == value) { return; } super.setPanelMode(value); if ((value != CFJPanel.PanelMode.Unknown) && (value != CFJPanel.PanelMode.View) && (value != CFJPanel.PanelMode.Delete)) { throw CFLib.getDefaultExceptionFactory() .newUsageException( getClass(), S_ProcName, "AskDeleteJInternalFrames only support PanelMode Unknown, View or Delete"); } ((ICFBamSwingInt16ColJPanelCommon) swingAskDeleteJPanel).setPanelMode(value); }