Changeset 1427 for trunk/src/org/expeditee/items/Item.java
- Timestamp:
- 08/07/19 14:14:42 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Item.java
r1426 r1427 47 47 import org.expeditee.core.bounds.EllipticalBounds; 48 48 import org.expeditee.core.bounds.PolygonBounds; 49 import org.expeditee.encryption.core.EncryptedImage; 49 50 import org.expeditee.encryption.items.surrogates.EncryptionDetail; 50 51 import org.expeditee.encryption.items.surrogates.EncryptionDetail.Type; … … 4049 4050 } 4050 4051 4052 //Setup surrogate items. 4051 4053 Item copy = this.copy(); 4052 4054 if (copy.isAnnotation()) { … … 4075 4077 copy.setText("Encrypted"); 4076 4078 } 4079 4080 // Encrypt XRayables representative files and update pointer. 4081 Collection<? extends XRayable> xrayables = this.getEnclosures(); 4082 for (XRayable xray: xrayables) { 4083 if (xray instanceof Picture) { 4084 EncryptedImage.encryptImage((Picture) xray, labelResult.key); 4085 Text source = xray._source; 4086 String oldName = xray.getName(); 4087 String newName = oldName.substring(0, oldName.lastIndexOf('.')) + EncryptedImage.EXPEDITEE_ENCRYPTED_IMAGE_EXTENSION; 4088 source.setText(source.getText().replace(oldName, newName)); 4089 } 4090 } 4091 4077 4092 this.addToSurrogates(copy); 4078 4093 }
Note:
See TracChangeset
for help on using the changeset viewer.