fingerPrint.setFingerprintType(Fingerprint.Type.rightRingFinger);
} else if (leftRingRadioButton.isSelected()) {
fingerPrint.setFingerprintType(Fingerprint.Type.leftRingFinger);
}
fingerPrint.setTechnologyType(TechnologyType.griauleTemplate);
ImagedFingerprint imagedFingerprint = new ImagedFingerprint(fingerPrint, fingerprintImagePanel.getImage(), qualityTextField.getText(), false);
if (fingerprintManager != null && fingerprintManager.getData() != null) {
fingerPrint.setTemplate(fingerprintManager.getData());
} else {
return;
}
if (!imagedFingerprintCache.contains(imagedFingerprint)) {
imagedFingerprintCache.add(imagedFingerprint);
} else {
ImagedFingerprint oldImagedFingerprint = imagedFingerprintCache.get(imagedFingerprintCache.indexOf(imagedFingerprint));
if (showConfirmMessage("A print has already been taken from the finger you just"
+ " took. Would you like to overwite it?", this)) {
imagedFingerprintCache.remove(oldImagedFingerprint);
imagedFingerprintCache.add(imagedFingerprint);
if (session.getImagedFingerprintList().contains(oldImagedFingerprint)) {
session.getImagedFingerprintList().remove(oldImagedFingerprint);
}
showImage(imagedFingerprint.getImage(), true);
showQuality(imagedFingerprint.getQuality());
} else {
showImage(oldImagedFingerprint.getImage(), true);
showQuality(oldImagedFingerprint.getQuality());
}
}
}