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; } FinderTableModel model = getDataModel(); ICFSecurityISOTimezoneObj o = (ICFSecurityISOTimezoneObj) model.getValueAt(row, COLID_ROW_HEADER); if (o == null) { return; } JInternalFrame frame = swingSchema.getISOTimezoneFactory().newViewEditJInternalFrame(o); ((ICFSecuritySwingISOTimezoneJPanelCommon) 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"; ICFInternetSchemaObj schemaObj = swingSchema.getSchema(); ICFInternetMajorVersionObj obj = (ICFInternetMajorVersionObj) schemaObj.getMajorVersionTableObj().newInstance(); JInternalFrame frame = swingSchema.getMajorVersionFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ICFInternetMajorVersionEditObj edit = (ICFInternetMajorVersionEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityTenantObj secTenant = schemaObj.getSecTenant(); edit.setRequiredOwnerTenant(secTenant); ICFInternetRealProjectObj container = (ICFInternetRealProjectObj) (getSwingContainer()); if (container == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "SwingContainer"); } edit.setRequiredContainerParent(container); ICFInternetSwingMajorVersionJPanelCommon jpanelCommon = (ICFInternetSwingMajorVersionJPanelCommon) 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 actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFAccSchemaObj schemaObj = swingSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFSecurityServiceObj selectedInstance = getSwingFocusAsService(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("HSVC".equals(classCode)) { JInternalFrame frame = swingSchema.getServiceFactory().newAskDeleteJInternalFrame(selectedInstance); ((ICFAccSwingServiceJPanelCommon) 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, "ICFAccServiceObj"); } } }
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"); } ICFSecurityServiceTypeObj selectedInstance = getSwingFocusAsServiceType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("SVCT".equals(classCode)) { JInternalFrame frame = swingSchema.getServiceTypeFactory().newViewEditJInternalFrame(selectedInstance); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFCrmSwingServiceTypeJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.Edit); getDesktopPane().add(frame); frame.setVisible(true); frame.show(); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "selectedInstance", selectedInstance, "ICFCrmServiceTypeObj"); } } }
public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFBamSchemaObj schemaObj = swingSchema.getSchema(); ICFBamAuditActionObj obj = (ICFBamAuditActionObj) schemaObj.getAuditActionTableObj().newInstance(); JInternalFrame frame = swingSchema.getAuditActionFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ICFBamAuditActionEditObj edit = (ICFBamAuditActionEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFBamSwingAuditActionJPanelCommon jpanelCommon = (ICFBamSwingAuditActionJPanelCommon) 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 actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFSecuritySchemaObj schemaObj = swingSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFSecurityHostNodeObj obj = (ICFSecurityHostNodeObj) schemaObj.getHostNodeTableObj().newInstance(); ICFSecurityHostNodeEditObj edit = (ICFSecurityHostNodeEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityClusterObj secCluster = schemaObj.getSecCluster(); edit.setRequiredContainerCluster(secCluster); JInternalFrame frame = swingSchema.getHostNodeFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ICFSecuritySwingHostNodeJPanelCommon jpanelCommon = (ICFSecuritySwingHostNodeJPanelCommon) frame; jpanelCommon.setPanelMode(CFJPanel.PanelMode.Add); 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(); ICFInternetVersionObj o = (ICFInternetVersionObj) model.getValueAt(row, COLID_ROW_HEADER); if (o == null) { return; } JInternalFrame frame = null; String classCode = o.getClassCode(); if (classCode.equals("VERN")) { frame = swingSchema.getVersionFactory().newViewEditJInternalFrame(o); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFInternetSwingVersionJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View); } else if (classCode.equals("MJVR")) { frame = swingSchema .getMajorVersionFactory() .newViewEditJInternalFrame((ICFInternetMajorVersionObj) o); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFInternetSwingMajorVersionJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View); } else if (classCode.equals("MNVR")) { frame = swingSchema .getMinorVersionFactory() .newViewEditJInternalFrame((ICFInternetMinorVersionObj) o); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFInternetSwingMinorVersionJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.View); } else { frame = null; } 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"); } ICFCrmServiceTypeObj obj = (ICFCrmServiceTypeObj) schemaObj.getServiceTypeTableObj().newInstance(); ICFCrmServiceTypeEditObj edit = (ICFCrmServiceTypeEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } JInternalFrame frame = swingSchema.getServiceTypeFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ICFCrmSwingServiceTypeJPanelCommon jpanelCommon = (ICFCrmSwingServiceTypeJPanelCommon) frame; jpanelCommon.setPanelMode(CFJPanel.PanelMode.Add); getDesktopPane().add(frame); frame.setVisible(true); frame.show(); }
public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFInternetSchemaObj schemaObj = swingSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFInternetVersionObj selectedInstance = getSwingFocusAsVersion(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("VERN".equals(classCode)) { JInternalFrame frame = swingSchema.getVersionFactory().newViewEditJInternalFrame(selectedInstance); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFInternetSwingVersionJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.Edit); 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 if ("MJVR".equals(classCode)) { ICFInternetMajorVersionObj obj = (ICFInternetMajorVersionObj) selectedInstance; JInternalFrame frame = swingSchema.getMajorVersionFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFInternetSwingMajorVersionJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.Edit); 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 if ("MNVR".equals(classCode)) { ICFInternetMinorVersionObj obj = (ICFInternetMinorVersionObj) selectedInstance; JInternalFrame frame = swingSchema.getMinorVersionFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFInternetSwingMinorVersionJPanelCommon) frame).setPanelMode(CFJPanel.PanelMode.Edit); 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, "ICFInternetVersionObj, ICFInternetMajorVersionObj, ICFInternetMinorVersionObj"); } } }
/** * Method to handle hyper link events. * * @param event hyper link event */ public void hyperlinkUpdate(HyperlinkEvent event) { if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { setCursor(cbusy); try { URL url = event.getURL(); int ind1 = event.getDescription().indexOf("["); int ind2 = event.getDescription().lastIndexOf("]"); String search = ""; if (ind1 > -1 && ind2 > -1) search = event.getDescription().substring(ind1 + 1, ind2); else { ind1 = event.getDescription().indexOf("=") + 1; // genedb if (ind1 > -1) search = event.getDescription().substring(ind1); } if (desktop != null) { if (BigPane.srsTabPane.isSelected()) setUpSRSFrame(url, search); if (BigPane.srsWin.isSelected()) { int hgt = (2 * desktop.getHeight()) / 3; Annotation edPane = new Annotation(url); JScrollPane jsp = new JScrollPane(edPane); JInternalFrame jif = new JInternalFrame( "SRS " + search, true, // resizable true, // closable true, // maximizable true); // iconifiable); JMenuBar menuBar = new JMenuBar(); menuBar.add(new CommonMenu(jif)); jif.setJMenuBar(menuBar); jif.getContentPane().add(jsp); jif.setLocation(0, 0); jif.setSize(800, hgt); jif.setVisible(true); desktop.add(jif); } if (BigPane.srsBrowser.isSelected()) BrowserControl.displayURL(event.getDescription()); } else { setPage(url); back.add(url); } } catch (IOException ioe) { String msg = event.getDescription(); if (msg.length() > 50) msg = msg.substring(0, 50) + "...."; JOptionPane.showMessageDialog( this, "Cannot reach URL:\n" + msg, "Cannot Connect", JOptionPane.INFORMATION_MESSAGE); // ioe.printStackTrace(); // ("Can't follow link to " + // event.getURL().toExternalForm() ); } setCursor(cdone); } else if (event.getEventType() == HyperlinkEvent.EventType.ENTERED) { try { JTextField statusField = (JTextField) BigPane.srsFrame.getContentPane().getComponent(1); statusField.setText(event.getDescription()); } catch (Exception exp) { } } else if (event.getEventType() == HyperlinkEvent.EventType.EXITED) { try { JTextField statusField = (JTextField) BigPane.srsFrame.getContentPane().getComponent(1); statusField.setText(""); } catch (Exception exp) { } } }