/** * This method sets the value of Text, Widgets and pure Strings. Warning, right and center * justfication does not work for pure String cells, only graphics cells. */ public void setValue(String value) { if ((strValue == value) || ((strValue != null) && (strValue.equals(value)))) return; if (graphics != null) { if (graphics instanceof MiWidget) ((MiWidget) graphics).setValue(value); if (graphics instanceof MiText) ((MiText) graphics).setText(value); } strValue = value; table.invalidateLayout(); }
public int processEvent(MiEvent event) { if ((isEnabled()) && (event.getType() != MiEvent.Mi_TIMER_TICK_EVENT) && (event.getType() != MiEvent.Mi_IDLE_EVENT)) { tmpPoint.copy(event.worldPt); MiPageManager pageManager = event.editor.getPageManager(); String unitsName = ""; if (pageManager != null) { pageManager.transformWorldPointToUnitsPoint(tmpPoint); unitsName = pageManager.getUnits().getAbbreviation(); } if (tmpPoint.x != lastX) { lastX = tmpPoint.x; xPos.setValue("X: " + Utility.toShortString(tmpPoint.x) + " " + unitsName); } if (tmpPoint.y != lastY) { lastY = tmpPoint.y; yPos.setValue("Y: " + Utility.toShortString(tmpPoint.y) + " " + unitsName); } } return (Mi_PROPOGATE_EVENT); }