Index: trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java
===================================================================
--- trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java	(revision 1510)
+++ trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java	(revision 1511)
@@ -1208,5 +1208,5 @@
 		}
 		if (bReparse) {
-			FrameUtils.Parse(currentFrame, false, false);
+			FrameUtils.Parse(currentFrame, false, false, false);
 		} else {
 			currentFrame.notifyObservers(bRecalculate);
@@ -1933,5 +1933,5 @@
 		Frame currentFrame = DisplayController.getCurrentFrame();
 		if (bReparse) {
-			FrameUtils.Parse(currentFrame, false, false);
+			FrameUtils.Parse(currentFrame, false, false, false);
 		} else {
 			currentFrame.notifyObservers(bRecalculate);
@@ -2013,5 +2013,5 @@
 		itemList.clear();
 		if (bReparse) {
-			FrameUtils.Parse(currentFrame, false, false);
+			FrameUtils.Parse(currentFrame, false, false, false);
 			/*
 			 * TODO check if I need to recalculate even if reparse occurs, here and in
@@ -3344,5 +3344,5 @@
 			}
 			if (toDelete.hasOverlay()) {
-				FrameUtils.Parse(parent, false, false);
+				FrameUtils.Parse(parent, false, false, false);
 				DisplayController.requestRefresh(false);
 			}
Index: trunk/src/org/expeditee/gui/Frame.java
===================================================================
--- trunk/src/org/expeditee/gui/Frame.java	(revision 1510)
+++ trunk/src/org/expeditee/gui/Frame.java	(revision 1511)
@@ -1196,5 +1196,5 @@
 		
 		if (reparse) {
-			FrameUtils.Parse(this, false, false);
+			FrameUtils.Parse(this, false, false, false);
 		} else {
 			notifyObservers(recalculate);
@@ -1258,5 +1258,5 @@
 		
 		if (bReparse) {
-			FrameUtils.Parse(this, false, false);
+			FrameUtils.Parse(this, false, false, false);
 		} else {
 			notifyObservers(bRecalculate);
Index: trunk/src/org/expeditee/gui/FrameUtils.java
===================================================================
--- trunk/src/org/expeditee/gui/FrameUtils.java	(revision 1510)
+++ trunk/src/org/expeditee/gui/FrameUtils.java	(revision 1511)
@@ -71,4 +71,5 @@
 import org.expeditee.items.Item;
 import org.expeditee.items.Item.HighlightMode;
+import org.expeditee.items.ItemParentStateChangedEvent;
 import org.expeditee.items.ItemUtils;
 import org.expeditee.items.JSItem;
@@ -680,4 +681,5 @@
 	 * @param txt
 	 *            Text to create the widget from. Must not be null.
+	 * @param userEdit True if createWidget is being called because a user has made a edit, false otherwise.
 	 * 
 	 * @return True if created/added. False if could not create.
@@ -685,5 +687,5 @@
 	 * @author Brook Novak
 	 */
-	private static boolean createWidget(Frame frame, Text txt, ItemsList list) {
+	private static boolean createWidget(Frame frame, Text txt, ItemsList list, boolean userEdit) {
 
 		if (frame == null) {
@@ -723,4 +725,8 @@
 
 		frame.addAllItems(iw.getItems(), list);
+		
+		if (userEdit) {
+			iw.onParentStateChanged(new ItemParentStateChangedEvent(frame, ItemParentStateChangedEvent.EVENT_TYPE_SHOWN));
+		}
 
 		return true;
@@ -728,5 +734,5 @@
 	
 	private static boolean createWidgetInBody(Frame frame, Text txt) {
-		return createWidget(frame, txt, frame.getBody(false));
+		return createWidget(frame, txt, frame.getBody(false), false);
 	}
 
@@ -889,5 +895,5 @@
 	}
 	
-	private static void transformOutOfPlaceItems(Frame toParse, ItemsList toTransform) {
+	private static void transformOutOfPlaceItems(Frame toParse, ItemsList toTransform, boolean sendWidgetVisible) {
 		// Get all items from toTransform that have not been marked as deleted.
 		List<Item> items = toParse.getItems(false, toTransform);
@@ -988,5 +994,5 @@
 							// Check for interactive widgets
 						} else if (ItemUtils.startsWithTag(i, ItemUtils.TAG_IWIDGET)) {
-							createWidget(toParse, (Text) i, toTransform);
+							createWidget(toParse, (Text) i, toTransform, sendWidgetVisible);
 						}
 
@@ -1149,5 +1155,5 @@
 	 */
 	public static void Parse(Frame toParse, boolean firstParse) {
-		Parse(toParse, firstParse, false);
+		Parse(toParse, firstParse, false, false);
 	}
 
@@ -1160,6 +1166,7 @@
 	 *            an ao tag linked to a frame with an frameImage of a frame which
 	 *            also has an ao tag on it.
+	 * @param userEdit TODO
 	 */	
-	public static void Parse(Frame toParse, boolean firstParse, boolean ignoreAnnotations) { 
+	public static void Parse(Frame toParse, boolean firstParse, boolean ignoreAnnotations, boolean userEdit) { 
 		List<String> accessList = Label.getAccessibleLabelsNames(toParse.getPrimaryBody());
 		
@@ -1167,6 +1174,6 @@
 		ItemsList surrogates = toParse.getSurrogateBody();
 		
-		transformOutOfPlaceItems(toParse, primaries);
-		transformOutOfPlaceItems(toParse, surrogates);
+		transformOutOfPlaceItems(toParse, primaries, userEdit);
+		transformOutOfPlaceItems(toParse, surrogates, userEdit);
 		
 		toParse.getInteractableItems().clear();
@@ -1801,5 +1808,5 @@
 		if (!DisplayController.isXRayMode()) {
 			if (toReparse != null) {
-				Parse(toReparse, false, false);
+				Parse(toReparse, false, false, true);
 			} else {
 				if (toRecalculate != null) {
Index: trunk/src/org/expeditee/items/Item.java
===================================================================
--- trunk/src/org/expeditee/items/Item.java	(revision 1510)
+++ trunk/src/org/expeditee/items/Item.java	(revision 1511)
@@ -2740,14 +2740,22 @@
 	}
 
-	public void setRightMargin(int i, boolean fixWidth)
-	{
-		int newWidth = i - getX() - Item.MARGIN_LEFT;
-		if (newWidth < 0) newWidth = 0;
-		
-		if (!fixWidth) {
-			newWidth *= -1;
-		}
-
-		setWidth(newWidth);
+	public void setRightMargin(int rightEdgeToFitTo, boolean fixWidth)
+	{
+		int itemXLeft = getX();
+		int adjustedRightEdgeToFitTo = rightEdgeToFitTo - Item.MARGIN_LEFT;
+		
+		if (itemXLeft < adjustedRightEdgeToFitTo) {
+			int newWidth = adjustedRightEdgeToFitTo - itemXLeft;
+
+			if (!fixWidth) {
+				newWidth *= -1;
+			}
+
+			setWidth(newWidth);
+		} else if (fixWidth) {
+			System.err.println(
+					"Item::setRightMargin() called to set right margin outside of writable area but with fixWidth set to true.");
+			System.err.println(this);
+		}
 	}
 
@@ -3655,5 +3663,7 @@
 		if (anchor != null) {
 			anchorConstraints();
-			setX(DisplayController.getFramePaintArea().getMaxX() - anchor - getBoundsWidth());
+			int width = Math.abs(getBoundsWidth());
+			//System.err.println("Item::setAnchorRight::Text Content= " + getText() + "; width=" + width);
+			setX(DisplayController.getFramePaintArea().getMaxX() - anchor - width);
 		}
 		
Index: trunk/src/org/expeditee/items/Text.java
===================================================================
--- trunk/src/org/expeditee/items/Text.java	(revision 1510)
+++ trunk/src/org/expeditee/items/Text.java	(revision 1511)
@@ -393,4 +393,5 @@
 	@Override
 	public void setWidth(Integer width) {
+		System.err.println("Text::setWidth::Text content=" + getText() + ", new width=" + width);
 		invalidateAll();
 
@@ -400,5 +401,9 @@
 			return;
 		}
-
+		
+		if (width == 0) {
+			System.err.println("Width of Zero: " + getText());
+		}
+		
 		_width = width;
 		rebuild(true);
@@ -1783,4 +1788,5 @@
 
 		if (this.getMinWidth() != null && getTextLayouts().size() == 0 && this.getFont() != null) {
+			// could use any text, 'p' is used simply to get some text in correct font.
 			getTextLayouts().add(TextLayout.getManager().layoutStringSimple("p", this.getFont()));
 			isFakeLayout = true;
@@ -2910,4 +2916,5 @@
 			if (anchor != null) {
 				setX(DisplayController.getFramePaintAreaWidth() - anchor - getBoundsWidth() + getLeftMargin());
+				//System.err.println("Text::setAnchorRight::boundsWidth=" + getBoundsWidth());
 			}
 			return;
Index: trunk/src/org/expeditee/items/widgets/SampleWidget1.java
===================================================================
--- trunk/src/org/expeditee/items/widgets/SampleWidget1.java	(revision 1510)
+++ trunk/src/org/expeditee/items/widgets/SampleWidget1.java	(revision 1511)
@@ -50,4 +50,6 @@
 			c.setFocusable(true);
 		}
+		System.err.println("SampleWidget1::setting light weight popup enabled to false.");
+		cmboOptions.setLightWeightPopupEnabled(false);
 	}
 		
Index: trunk/src/org/expeditee/items/widgets/SampleWidget2.java
===================================================================
--- trunk/src/org/expeditee/items/widgets/SampleWidget2.java	(revision 1510)
+++ trunk/src/org/expeditee/items/widgets/SampleWidget2.java	(revision 1511)
@@ -74,4 +74,5 @@
 		cmboPrepend.setFont(BIG_FONT);
 		cmboPrepend.addActionListener(new PrependManager(cmboPrepend, utxt));
+		cmboPrepend.setLightWeightPopupEnabled(false);
 		
 		controls.add(lblTitle);
Index: trunk/src/org/expeditee/items/widgets/SwingWidget.java
===================================================================
--- trunk/src/org/expeditee/items/widgets/SwingWidget.java	(revision 1510)
+++ trunk/src/org/expeditee/items/widgets/SwingWidget.java	(revision 1511)
@@ -15,5 +15,4 @@
 
 import javax.swing.JComponent;
-import javax.swing.JPopupMenu;
 
 import org.expeditee.core.bounds.AxisAlignedBoxBounds;
@@ -52,5 +51,6 @@
 		onBoundsChanged();
 		
-		JPopupMenu.setDefaultLightWeightPopupEnabled(false);
+		System.err.println("SwingWidget::Suppressed static setDefaultLightWeightPopupEnabled to false.");
+		//JPopupMenu.setDefaultLightWeightPopupEnabled(false);
 	}
 
Index: trunk/src/org/expeditee/items/widgets/Widget.java
===================================================================
--- trunk/src/org/expeditee/items/widgets/Widget.java	(revision 1510)
+++ trunk/src/org/expeditee/items/widgets/Widget.java	(revision 1511)
@@ -1113,6 +1113,9 @@
 			case ItemParentStateChangedEvent.EVENT_TYPE_ADDED:
 			case ItemParentStateChangedEvent.EVENT_TYPE_ADDED_VIA_OVERLAY:
+				System.err.println("Widget::onParentStateChanged: Added but not yet shown widget.");
+				break;
 			case ItemParentStateChangedEvent.EVENT_TYPE_SHOWN:
 			case ItemParentStateChangedEvent.EVENT_TYPE_SHOWN_VIA_OVERLAY:
+				System.err.println("Widget::onParentStateChanged: Shown widget.");
 				EcosystemManager.addInteractiveWidget(this);
 				addWidgetContent(e);
