public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFCrmSchemaObj schemaObj = swingSchema.getSchema(); ICFCrmSecGroupMemberObj obj = (ICFCrmSecGroupMemberObj) schemaObj.getSecGroupMemberTableObj().newInstance(); JInternalFrame frame = swingSchema.getSecGroupMemberFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ICFCrmSecGroupMemberEditObj edit = (ICFCrmSecGroupMemberEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityClusterObj secCluster = schemaObj.getSecCluster(); edit.setRequiredOwnerCluster(secCluster); ICFCrmSecGroupObj container = (ICFCrmSecGroupObj) (getSwingContainer()); if (container == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "SwingContainer"); } edit.setRequiredContainerGroup(container); ICFCrmSwingSecGroupMemberJPanelCommon jpanelCommon = (ICFCrmSwingSecGroupMemberJPanelCommon) frame; jpanelCommon.setPanelMode(CFJPanel.PanelMode.Add); Container cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { JInternalFrame myInternalFrame = (JInternalFrame) cont; myInternalFrame.getDesktopPane().add(frame); frame.setVisible(true); frame.show(); } }
public void mousePressed(MouseEvent e) { if (e.getButton() != MouseEvent.BUTTON1) { return; } if (e.getClickCount() != 2) { return; } JTable table = (JTable) e.getSource(); Point p = e.getPoint(); int row = table.rowAtPoint(p); if (row < 0) { return; } ListTableModel model = getDataModel(); ICFCrmSecGroupMemberObj o = (ICFCrmSecGroupMemberObj) model.getValueAt(row, COLID_ROW_HEADER); if (o == null) { return; } JInternalFrame frame = swingSchema.getSecGroupMemberFactory().newViewEditJInternalFrame(o); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFCrmSwingSecGroupMemberJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View); if (frame == null) { return; } Container cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { JInternalFrame myInternalFrame = (JInternalFrame) cont; myInternalFrame.getDesktopPane().add(frame); frame.setVisible(true); frame.show(); } }
public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFCrmSchemaObj schemaObj = swingSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFSecuritySecGroupMemberObj selectedInstance = getSwingFocusAsSecGroupMember(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("SGMB".equals(classCode)) { JInternalFrame frame = swingSchema.getSecGroupMemberFactory().newAskDeleteJInternalFrame(selectedInstance); ((ICFCrmSwingSecGroupMemberJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View); frame.addInternalFrameListener(getViewEditInternalFrameListener()); Container cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { JInternalFrame myInternalFrame = (JInternalFrame) cont; myInternalFrame.getDesktopPane().add(frame); frame.setVisible(true); frame.show(); } } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFCrmSecGroupMemberObj"); } } }