Index: trunk/src/org/expeditee/items/Item.java
===================================================================
--- trunk/src/org/expeditee/items/Item.java	(revision 1414)
+++ trunk/src/org/expeditee/items/Item.java	(revision 1415)
@@ -48,4 +48,7 @@
 import org.expeditee.core.bounds.PolygonBounds;
 import org.expeditee.encryption.items.surrogates.EncryptionDetail;
+import org.expeditee.encryption.items.surrogates.EncryptionDetail.Type;
+import org.expeditee.encryption.items.surrogates.Label;
+import org.expeditee.encryption.items.surrogates.Label.LabelResult;
 //import org.expeditee.encryption.items.surrogates.Surrogate;
 import org.expeditee.gio.EcosystemManager;
@@ -156,10 +159,10 @@
 
 	public static final Cursor.CursorType CROP_CURSOR = Cursor.CursorType.CROSSHAIR;
-
+	
 	/** The default value for integer attributes */
 	public static final int DEFAULT_INTEGER = -1;
-
+	
 	private static final int BRIGHTNESS = 185;
-
+	
 	/** Contains all dots (including this one) that form an enclosure if this dot is part of an enclosing shape. */
 	private Collection<Item> _enclosure = null;
@@ -317,4 +320,8 @@
 	
 	private Data _data = new Data();
+	
+	// Used via reflection by AttributeUtils to determine if the boolean value is different from default.
+	public static final boolean acceptsKeyboardEnterDefault = false;
+	private boolean _acceptsKeyboardEnter = acceptsKeyboardEnterDefault;
 
 	private Item surrogateFor = null;
@@ -326,4 +333,5 @@
 	
 	{
+		EncryptionDetail unencryptedOnSave = new EncryptionDetail(EncryptionDetail.Type.UnencryptedOnSave);
 		for(Character tag: DefaultFrameWriter.getItemTags().keySet()) {
 			if (tag == 'T' || tag == 'S') {
@@ -332,10 +340,10 @@
 				surrogatePropertyInheritanceDefault.put(tag + "", true);
 			}
-			primaryPropertyEncryptionDefault.put(tag + "", EncryptionDetail.UnencryptedOnSave);
+			primaryPropertyEncryptionDefault.put(tag + "", unencryptedOnSave);
 		}
 		
 		for(String tag: DefaultFrameWriter.getItemTagsExt().keySet()) {
 			surrogatePropertyInheritanceDefault.put(tag, true);
-			primaryPropertyEncryptionDefault.put(tag, EncryptionDetail.UnencryptedOnSave);
+			primaryPropertyEncryptionDefault.put(tag, unencryptedOnSave);
 		}
 	}
@@ -383,5 +391,5 @@
 		dest.setLinkTemplate(this.getLinkTemplate());
 
-		// dest.setMaxWidth(this.getMaxWidth());
+		// dest.setWidth(this.getWidth());
 
 		dest.setOffset(this.getOffset());
@@ -424,8 +432,16 @@
 		}
 		
-		final String currentUser = UserSettings.UserName.get();
-		if (parent != null && (parent.getOwner() == null || currentUser.compareTo(parent.getOwner()) != 0)) {
-			dest.setOwner(currentUser);
-		}
+		String currentUser = UserSettings.UserName.get();
+//		if (parent != null && !currentUser.equals(parent.getOwner())) {
+//			//dest.setOwner(currentUser);
+//		} else {
+//			System.err.println("I have duplicated a item and made it owned by "
+//					+ "current user, whereas the old code would not have "
+//					+ "changed ownership at this time.");
+//			System.err.println("Item: " + dest + ", Class: " + dest.getClass());
+//			System.err.println("Current owner: " + dest.getOwner());
+//			System.err.println("Current user: " + currentUser);
+//		}
+		dest.setOwner(currentUser);
 	}
 	
@@ -438,5 +454,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.DOT_TYPE_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.DOT_TYPE_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -461,5 +478,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -494,5 +512,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -567,5 +586,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1114,5 +1134,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FORMULA_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1389,5 +1410,11 @@
 		if (otherBounds.equals(thisBounds)) return true;
 
-		return otherBounds.intersects(thisBounds);
+		boolean intersects = otherBounds.intersects(thisBounds);
+		
+		/*if (intersects) {
+			System.err.println("Found intersection between this item (" + this + ") with bounds: " + thisBounds + "...and...");
+			System.err.println("item with bounds: " + otherBounds.toString());
+		}*/
+		return intersects;
 
 		// Need to check the second equality so that we dont pick up circles
@@ -1523,5 +1550,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TOOLTIP_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1827,5 +1855,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1847,5 +1876,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DATA_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATA_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATA_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1863,5 +1893,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1875,5 +1906,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1887,5 +1919,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_ENTER_FRAME_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1899,5 +1932,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1914,5 +1948,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_MARK_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_MARK_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_MARK_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1947,5 +1982,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ARROW_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -1985,5 +2021,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.BACKGROUND_COLOR_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2000,5 +2037,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.BORDER_COLOR_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.BORDER_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.BORDER_COLOR_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2039,5 +2077,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.CONSTRAINT_IDS_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2068,5 +2107,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DATE_CREATED_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATE_CREATED_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATE_CREATED_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2091,5 +2131,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FILL_COLOR_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_COLOR_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2112,5 +2153,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.GRADIENT_COLOR_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_COLOR_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2134,5 +2176,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FILL_PATTERN_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_PATTERN_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2156,5 +2199,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.HIGHLIGHT_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2175,5 +2219,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TYPE_AND_ID_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.TYPE_AND_ID_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.TYPE_AND_ID_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2191,5 +2236,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINE_IDS_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_IDS_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_IDS_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2206,5 +2252,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINE_PATTERN_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_PATTERN_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2246,5 +2293,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2258,5 +2306,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_HISTORY_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_HISTORY_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_HISTORY_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2284,5 +2333,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_FRAMESET_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_FRAMESET_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_FRAMESET_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2299,5 +2349,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_MARK_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_MARK_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_MARK_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2316,5 +2367,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_TEMPLATE_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_TEMPLATE_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_TEMPLATE_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2350,5 +2402,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.OWNER_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2541,5 +2594,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2585,5 +2639,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.THICKNESS_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2697,5 +2752,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2715,5 +2771,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -2827,5 +2884,5 @@
 
 		current.addItem(this, false);
-		current.setResort(true);
+		current.invalidateSorted();
 		setRelativeLink();
 		setFloating(false);
@@ -3527,5 +3584,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_LEFT_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3543,5 +3601,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_RIGHT_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3559,5 +3618,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_TOP_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3576,5 +3636,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3886,5 +3947,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3911,5 +3973,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3936,5 +3999,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3961,5 +4025,6 @@
 			Item primary = getPrimary();
 			if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR)) {
-				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);
+				EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
+				primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, inheritanceCheckOnSave);
 			}
 		}
@@ -3975,4 +4040,14 @@
 	
 	public void setEncryptionLabel(String label) {
+		if (this.getParent().getEncryptionLabel() == null) {
+			MessageBay.displayMessage("Items can only be entrypted if the frame they are on is.");
+			return;
+		}
+		LabelResult labelResult = Label.getLabel(label);
+		if (labelResult != LabelResult.SuccessResolveLabelToKey) {
+			MessageBay.displayMessage(labelResult.toString());
+			return;
+		}
+		
 		this._encryptionLabel = label;
 		this.getSurrogates().clear();
@@ -3980,4 +4055,8 @@
 		if (copy instanceof Text) {	copy.setText("Encrypted"); }
 		this.addToSurrogates(copy);
+	}
+	
+	public void setEncryptionLabelOnLoad(String label) {
+		this._encryptionLabel = label;
 	}
 
@@ -4006,5 +4085,5 @@
 		Frame current = dot.getParentOrCurrentFrame();
 		current.removeItem(dot);
-		ItemUtils.EnclosedCheck(current.getItems());
+		ItemUtils.EnclosedCheck(current.getSortedItems());
 		return text;
 		// TODO: Should this add the newly-created Text item to the frame? cts16
@@ -4029,5 +4108,5 @@
 		current.addItem(dot);
 		DisplayController.setCursor(Item.DEFAULT_CURSOR);
-		ItemUtils.EnclosedCheck(current.getItems());
+		ItemUtils.EnclosedCheck(current.getSortedItems());
 		return dot;
 	}
@@ -4044,10 +4123,15 @@
 		this.surrogateItems.add(surrogate);
 		surrogate.setAsSurrogateFor(this);
+		this.getParent().addItem(surrogate);
+		
+		EncryptionDetail reencryptOnSave = new EncryptionDetail(EncryptionDetail.Type.ReencryptOnSave);
+		EncryptionDetail unencryptedOnSave = new EncryptionDetail(EncryptionDetail.Type.UnencryptedOnSave);
+		EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
 		
 		for (Character tag: DefaultFrameWriter.getItemTags().keySet()) {
 			if (tag == 'T') {
-				primaryPropertyEncryption.put(tag + "", EncryptionDetail.ReencryptOnSave);
+				primaryPropertyEncryption.put(tag + "", reencryptOnSave.clone());
 			} else {
-				primaryPropertyEncryption.put(tag + "", EncryptionDetail.UnencryptedOnSave);
+				primaryPropertyEncryption.put(tag + "", unencryptedOnSave.clone());
 			}
 					
@@ -4060,5 +4144,5 @@
 		
 		for (String tag: DefaultFrameWriter.getItemTagsExt().keySet()) {
-			primaryPropertyEncryption.put(tag, EncryptionDetail.UnencryptedOnSave);
+			primaryPropertyEncryption.put(tag, inheritanceCheckOnSave.clone());
 			surrogate.surrogatePropertyInheritance.put(tag + "", true);
 		}
@@ -4077,5 +4161,6 @@
 		
 		if (encryptionDetail == null) {
-			return EncryptionDetail.UnencryptedOnSave;
+			EncryptionDetail unencryptedOnSave = new EncryptionDetail(EncryptionDetail.Type.UnencryptedOnSave);
+			return unencryptedOnSave;
 		} else {
 			return encryptionDetail;
@@ -4091,13 +4176,40 @@
 	}
 	
-
-	/**
-	 * If when setting a property, we find that the primary has a undeciphered value, when we must containue using that undeciphered value
+	public void setTagNotInherited(String tag) {
+		surrogatePropertyInheritance.put(tag, false);
+	}
+	
+	public boolean hasAccessToItemAsPrimary() {
+		String label = this.getEncryptionLabel();
+		if (this.isSurrogate() || label == null || label.length() == 0) {
+			return true;
+		}
+		
+		return Label.getLabel(label) == LabelResult.SuccessResolveLabelToKey;
+	}
+	
+
+	/**
+	 * If when setting a property, we find that the primary has a undeciphered value, when we must continue using that undeciphered value
 	 * when eventually saving.
 	 * @return
 	 */
 	protected boolean subjectToInheritanceCheckOnSave(String tag) {
-		if (getPrimary() == null) return false;
-		return getPrimary().primaryPropertyEncryption.get(tag) != EncryptionDetail.UseUndecipheredValueOnSave;
+		Item primary = getPrimary();
+		if (primary == null) return false;
+		EncryptionDetail primaryItemTagEncryptionDetail = primary.primaryPropertyEncryption.get(tag);
+		Type primaryItemTagEncryptionDetailType = primaryItemTagEncryptionDetail.getEncryptionDetailType();
+		return primaryItemTagEncryptionDetailType != EncryptionDetail.Type.UseUndecipheredValueOnSave;
+	}
+
+	public boolean acceptsKeyboardEnter() {
+		return _acceptsKeyboardEnter;
+	}
+		
+	public void setAcceptsEnter(boolean value) {
+		if (this.getText() != null && this.getText().equals("Beep")) {
+			System.err.println();
+		}
+		_acceptsKeyboardEnter = value;
 	}
 }
