public void adjustComponentEnableStates() { CFJPanel.PanelMode mode = getPanelMode(); boolean isEditing; switch (mode) { case Unknown: case View: case Delete: isEditing = false; break; case Add: case Edit: case Update: isEditing = true; break; default: isEditing = false; break; } if (isEditing) { ICFSecuritySecAppObj focus = getSwingFocusAsSecApp(); if (focus == null) { isEditing = false; } else if (null == focus.getEdit()) { isEditing = false; } } if (swingReferenceContainerCluster != null) { swingReferenceContainerCluster.setEnabled(false); } if (swingEditorSecAppId != null) { swingEditorSecAppId.setEnabled(false); } if (swingEditorJEEMountName != null) { swingEditorJEEMountName.setEnabled(isEditing); } }
public void populateFields() { ICFSecuritySecAppObj popObj; ICFSecuritySecAppObj focus = getSwingFocusAsSecApp(); if (focus != null) { popObj = (ICFSecuritySecAppObj) (focus.getEdit()); if (popObj == null) { popObj = focus; } } else { popObj = null; } if (getPanelMode() == CFJPanel.PanelMode.Unknown) { popObj = null; } if (popObj == null) { swingContainerClusterObj = null; } else { swingContainerClusterObj = (ICFSecurityClusterObj) popObj.getRequiredContainerCluster(swingIsInitializing); } if (swingReferenceContainerCluster != null) { swingReferenceContainerCluster.setReferencedObject(swingContainerClusterObj); } if (popObj == null) { getSwingEditorSecAppId().setInt32Value(null); } else { getSwingEditorSecAppId().setInt32Value(popObj.getRequiredSecAppId()); } if (popObj == null) { getSwingEditorJEEMountName().setStringValue(null); } else { getSwingEditorJEEMountName().setStringValue(popObj.getRequiredJEEMountName()); } }