public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFBamSchemaObj schemaObj = swingSchema.getSchema(); ICFBamDoubleTypeObj obj = (ICFBamDoubleTypeObj) schemaObj.getDoubleTypeTableObj().newInstance(); JInternalFrame frame = swingSchema.getDoubleTypeFactory().newViewEditJInternalFrame(obj); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ICFBamDoubleTypeEditObj edit = (ICFBamDoubleTypeEditObj) (obj.beginEdit()); if (edit == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "edit"); } ICFSecurityTenantObj secTenant = schemaObj.getSecTenant(); edit.setRequiredOwnerTenant(secTenant); ICFBamSchemaDefObj container = (ICFBamSchemaDefObj) (getSwingContainer()); if (container == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "SwingContainer"); } edit.setRequiredContainerSchemaDef(container); ICFBamSwingDoubleTypeJPanelCommon jpanelCommon = (ICFBamSwingDoubleTypeJPanelCommon) 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(); ICFBamDoubleTypeObj o = (ICFBamDoubleTypeObj) model.getValueAt(row, COLID_ROW_HEADER); if (o == null) { return; } JInternalFrame frame = swingSchema.getDoubleTypeFactory().newViewEditJInternalFrame(o); frame.addInternalFrameListener(getViewEditInternalFrameListener()); ((ICFBamSwingDoubleTypeJPanelCommon) 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 setPanelMode(CFJPanel.PanelMode value) { final String S_ProcName = "setPanelMode"; CFJPanel.PanelMode oldValue = getPanelMode(); if (oldValue == value) { return; } if (value != CFJPanel.PanelMode.View) { throw CFLib.getDefaultExceptionFactory() .newUsageException( getClass(), S_ProcName, "PickerJInternalFrames only support PanelMode View"); } super.setPanelMode(value); if (swingPickerJPanel != null) { ICFBamSwingDoubleTypeJPanelCommon jpanelCommon = (ICFBamSwingDoubleTypeJPanelCommon) swingPickerJPanel; jpanelCommon.setPanelMode(value); } }
public void setSwingFocus(ICFLibAnyObj value) { final String S_ProcName = "setSwingFocus"; if ((value == null) || (value instanceof ICFBamDoubleTypeObj)) { super.setSwingFocus(value); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "value", value, "ICFBamDoubleTypeObj"); } ((ICFBamSwingDoubleTypeJPanelCommon) swingPickerJPanel) .setSwingFocus((ICFBamDoubleTypeObj) value); }
public void actionPerformed(ActionEvent e) { final String S_ProcName = "actionPerformed"; ICFBamSchemaObj schemaObj = swingSchema.getSchema(); if (schemaObj == null) { throw CFLib.getDefaultExceptionFactory() .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj"); } ICFBamDoubleTypeObj selectedInstance = getSwingFocusAsDoubleType(); if (selectedInstance != null) { String classCode = selectedInstance.getClassCode(); if ("DBLT".equals(classCode)) { JInternalFrame frame = swingSchema.getDoubleTypeFactory().newAskDeleteJInternalFrame(selectedInstance); ((ICFBamSwingDoubleTypeJPanelCommon) 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, "ICFBamDoubleTypeObj"); } } }