Merge "Omaha #3163 Fix collaboration string differencing" into omaha_14.4.1

Former-commit-id: fbad2f72d5 [formerly fbad2f72d5 [formerly 4535b6ce392515daa465f395fb002b9c4116c111]]
Former-commit-id: f75a57ac23
Former-commit-id: eaa8958ce2
This commit is contained in:
Nate Jensen 2014-06-03 16:17:34 -05:00 committed by Gerrit Code Review
commit 909d6d5a42

View file

@ -144,38 +144,40 @@ public class DrawStringEvent extends AbstractRemoteGraphicsRenderEvent {
* .graphics.events.rendering.IRenderEvent) * .graphics.events.rendering.IRenderEvent)
*/ */
@Override @Override
public DrawStringEvent createDiffObject(IRenderEvent event) { public DrawStringEvent createDiffObject(IRenderEvent newEvent) {
DrawStringEvent diffEvent = (DrawStringEvent) event; DrawStringEvent newStringEvent = (DrawStringEvent) newEvent;
DrawStringEvent diffObject = new DrawStringEvent(); DrawStringEvent diffStringEvent = new DrawStringEvent();
diffObject.alpha = diffEvent.alpha; diffStringEvent.alpha = newStringEvent.alpha;
diffObject.boxColor = diffEvent.boxColor; diffStringEvent.boxColor = newStringEvent.boxColor;
diffObject.shadowColor = diffEvent.shadowColor; diffStringEvent.shadowColor = newStringEvent.shadowColor;
diffObject.xOrColors = diffEvent.xOrColors; diffStringEvent.xOrColors = newStringEvent.xOrColors;
diffObject.fontId = diffEvent.fontId; diffStringEvent.fontId = newStringEvent.fontId;
diffObject.magnification = diffEvent.magnification; diffStringEvent.magnification = newStringEvent.magnification;
diffObject.rotation = diffEvent.rotation; diffStringEvent.rotation = newStringEvent.rotation;
if (Arrays.equals(colors, diffEvent.colors) == false) { if (Arrays.equals(colors, newStringEvent.colors) == false) {
diffObject.colors = diffEvent.colors; diffStringEvent.colors = newStringEvent.colors;
} }
if (Arrays.equals(text, diffEvent.text) == false) { if (Arrays.equals(text, newStringEvent.text) == false) {
diffObject.text = diffEvent.text; diffStringEvent.text = newStringEvent.text;
} }
if (Arrays.equals(point, diffEvent.point) == false) { if (Arrays.equals(point, newStringEvent.point) == false) {
diffObject.point = diffEvent.point; diffStringEvent.point = newStringEvent.point;
} }
if (horizontalAlignment != diffEvent.horizontalAlignment) { if (horizontalAlignment != newStringEvent.horizontalAlignment) {
diffObject.horizontalAlignment = diffEvent.horizontalAlignment; diffStringEvent.horizontalAlignment = newStringEvent.horizontalAlignment;
} }
if (verticalAlignment != diffEvent.verticalAlignment) { if (verticalAlignment != newStringEvent.verticalAlignment) {
diffObject.verticalAlignment = diffEvent.verticalAlignment; diffStringEvent.verticalAlignment = newStringEvent.verticalAlignment;
} }
if (!textStyles.equals(diffEvent.textStyles)) { if (newStringEvent.textStyles != null
diffObject.textStyles = diffEvent.textStyles; && newStringEvent.textStyles.equals(textStyles) == false) {
diffStringEvent.textStyles = newStringEvent.textStyles;
} }
if (diffEvent.textStyleColorMap != null) { if (newStringEvent.textStyleColorMap != null
diffObject.textStyleColorMap = diffEvent.textStyleColorMap; && newStringEvent.textStyleColorMap.equals(textStyleColorMap) == false) {
diffStringEvent.textStyleColorMap = newStringEvent.textStyleColorMap;
} }
return diffObject; return diffStringEvent;
} }
/* /*