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 int compare(ICFBamDoubleTypeObj lhs, ICFBamDoubleTypeObj rhs) { if (lhs == null) { if (rhs == null) { return (0); } else { return (-1); } } else if (rhs == null) { return (1); } else { String lhsValue = lhs.getObjQualifiedName(); String rhsValue = rhs.getObjQualifiedName(); if (lhsValue == null) { if (rhsValue == null) { return (0); } else { return (-1); } } else if (rhsValue == null) { return (1); } else { return (lhsValue.compareTo(rhsValue)); } } }
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"); } } }
public Object getValueAt(int row, int column) { final String S_ProcName = "getValueAt"; if ((row < 0) || (column < -1)) { return (null); } if (arrayOfDoubleType == null) { return (null); } int len = arrayOfDoubleType.length; if (row >= len) { return (null); } ICFBamDoubleTypeObj obj = arrayOfDoubleType[row]; if (obj == null) { return (null); } Object retval; switch (column) { case COLID_ROW_HEADER: retval = obj; break; case COLID_OBJQUALIFIEDNAME: retval = obj.getObjQualifiedName(); break; case COLID_ID: retval = new Long(obj.getRequiredId()); break; case COLID_NAME: retval = obj.getRequiredName(); if (retval == null) { retval = ""; } break; case COLID_SHORTNAME: retval = obj.getOptionalShortName(); if (retval == null) { retval = ""; } break; case COLID_LABEL: retval = obj.getOptionalLabel(); if (retval == null) { retval = ""; } break; case COLID_SHORTDESCRIPTION: retval = obj.getOptionalShortDescription(); if (retval == null) { retval = ""; } break; case COLID_DESCRIPTION: retval = obj.getOptionalDescription(); if (retval == null) { retval = ""; } break; case COLID_ISNULLABLE: retval = new Boolean(obj.getRequiredIsNullable()); break; case COLID_GENERATEID: retval = obj.getOptionalGenerateId(); break; case COLID_DEFAULTVISIBILITY: retval = new Boolean(obj.getRequiredDefaultVisibility()); break; case COLID_DBNAME: retval = obj.getOptionalDbName(); if (retval == null) { retval = ""; } break; case COLID_INITVALUE: retval = obj.getOptionalInitValue(); break; case COLID_DEFAULTVALUE: retval = obj.getOptionalDefaultValue(); break; case COLID_MINVALUE: retval = obj.getOptionalMinValue(); break; case COLID_MAXVALUE: retval = obj.getOptionalMaxValue(); break; case COLID_NULLVALUE: retval = obj.getOptionalNullValue(); break; case COLID_UNKNOWNVALUE: retval = obj.getOptionalUnknownValue(); break; case COLID_LOOKUP_DEFSCHEMA: retval = obj.getOptionalLookupDefSchema(swingIsInitializing); break; case COLID_LOOKUP_DATASCOPE: retval = obj.getOptionalLookupDataScope(swingIsInitializing); break; case COLID_LOOKUP_VACCSEC: retval = obj.getOptionalLookupVAccSec(swingIsInitializing); break; case COLID_LOOKUP_EACCSEC: retval = obj.getOptionalLookupEAccSec(swingIsInitializing); break; case COLID_LOOKUP_VACCFREQ: retval = obj.getOptionalLookupVAccFreq(swingIsInitializing); break; case COLID_LOOKUP_EACCFREQ: retval = obj.getOptionalLookupEAccFreq(swingIsInitializing); break; default: retval = null; break; } return (retval); }