- Timestamp:
- 06/26/19 16:02:00 (5 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/encryption/Actions.java
r1408 r1414 31 31 public class Actions implements CryptographyConstants { 32 32 33 public static void TestSurrogate(Item classic) {33 public static void TestSurrogate(Item primary) { 34 34 System.out.println("Test surrogates: "); 35 35 } -
trunk/src/org/expeditee/encryption/io/EncryptedExpReader.java
r1413 r1414 14 14 import java.util.Base64; 15 15 import java.util.List; 16 import java.util.function.BiConsumer; 16 17 import java.util.function.Predicate; 17 18 … … 30 31 import org.expeditee.gui.FrameIO; 31 32 import org.expeditee.io.Conversion; 33 import org.expeditee.io.DefaultFrameWriter; 32 34 import org.expeditee.io.ExpReader; 33 35 import org.expeditee.items.Item; … … 122 124 } 123 125 124 @Override 126 // @Override 127 // protected String readTheItems(Frame newFrame, List<DelayedAction> delayedActions) throws IOException { 128 // String next = null; 129 // Item currentItem = null; 130 // 131 // Predicate<String> endOfSection = s -> s.equals(EncryptedExpWriter.TERMINATOR + "") || s.equals(EncryptedExpWriter.TERMINATOR_WITH_CONTINUATION); 132 // while (_reader.ready() && !endOfSection.test(next = _reader.readLine())) { 133 // if (!isValidLine(next)) { 134 // continue; 135 // } 136 // 137 // String tag = getTagEnc(next); 138 // if (next.startsWith(DefaultFrameWriter.TYPE_AND_ID_STR + " ")) { 139 // currentItem = newItem(next); 140 // _linePoints.put(currentItem.getID(), currentItem); 141 // newFrame.addItem(currentItem); 142 // currentItem.setEncryptionDetailForTag(tag + "", EncryptionDetail.UnencryptedOnSave); 143 // } else if (next.startsWith("SurrogateFor")) { 144 // int parentID = Integer.parseInt(next.split(" ")[1]); 145 // newFrame.getItemWithID(parentID).addToSurrogates(currentItem); 146 // newFrame.addToSurrogates(currentItem); 147 // } else if (currentItem != null && actionShouldBeDelayed(tag.charAt(0))) { 148 // delayedActions.add(new DelayedAction(currentItem, next)); 149 // } else if (currentItem != null) { 150 // processBodyLine(currentItem, next); 151 // } else { 152 // System.err.println("Error while reading in frame (ExpReader): Found body line but no current item to apply it to."); 153 // } 154 // } 155 // 156 // if (next.equals(EncryptedExpWriter.TERMINATOR_WITH_CONTINUATION)) { 157 // next = readTheItems(newFrame, delayedActions); 158 // } 159 // 160 // return next; 161 // } 162 125 163 protected String readTheItems(Frame newFrame, List<DelayedAction> delayedActions) throws IOException { 164 // Read the primary item. 165 BiConsumer<Item, String> addToBody = (item, line) -> newFrame.addItem(item); 166 String next = readLineAfterLine(false, addToBody, delayedActions); 167 168 // Read the surrogate items. 169 if (next.equals(EncryptedExpWriter.TERMINATOR_WITH_CONTINUATION)) { 170 BiConsumer<Item, String> addToSurrogates = (item, line) -> { 171 int parentID = Integer.parseInt(line.split(" ")[1]); 172 newFrame.getItemWithID(parentID).addToSurrogates(item); 173 newFrame.addToSurrogates(item); 174 }; 175 next = readLineAfterLine(true, addToSurrogates, delayedActions); 176 } 177 return next; 178 } 179 180 private String readLineAfterLine(boolean isSurrogate, BiConsumer<Item, String> storeResult, List<DelayedAction> delayedActions) throws IOException { 126 181 String next = null; 127 182 Item currentItem = null; 128 183 129 Predicate<String> endOfSection = s -> s.equals( "Z") || s.equals("Z...");184 Predicate<String> endOfSection = s -> s.equals(EncryptedExpWriter.TERMINATOR + "") || s.equals(EncryptedExpWriter.TERMINATOR_WITH_CONTINUATION); 130 185 while (_reader.ready() && !endOfSection.test(next = _reader.readLine())) { 131 186 if (!isValidLine(next)) { … … 134 189 135 190 String tag = getTagEnc(next); 136 if (next.startsWith( "S")) {191 if (next.startsWith(DefaultFrameWriter.TYPE_AND_ID_STR + " ")) { 137 192 currentItem = newItem(next); 138 193 _linePoints.put(currentItem.getID(), currentItem); 139 newFrame.addItem(currentItem); 194 if (!isSurrogate) { 195 storeResult.accept(currentItem, next); 196 } 140 197 currentItem.setEncryptionDetailForTag(tag + "", EncryptionDetail.UnencryptedOnSave); 141 198 } else if (next.startsWith("SurrogateFor")) { 142 int parentID = Integer.parseInt(next.split(" ")[1]); 143 newFrame.getItemWithID(parentID).addToSurrogates(currentItem); 199 if (isSurrogate) { 200 storeResult.accept(currentItem, next); 201 } 144 202 } else if (currentItem != null && actionShouldBeDelayed(tag.charAt(0))) { 145 203 delayedActions.add(new DelayedAction(currentItem, next)); … … 151 209 } 152 210 153 if (next.equals(EncryptedExpWriter.SURROGATE_TERMINATOR)) {154 next = readTheItems(newFrame, delayedActions);155 }156 157 211 return next; 158 212 } 213 214 // private String readLineAfterLine(Consumer<Item> storeResult, List<DelayedAction> delayedActions) throws IOException { 215 // String next = null; 216 // Item currentItem = null; 217 // 218 // Predicate<String> endOfSection = s -> { 219 // return s.equals(EncryptedExpWriter.TERMINATOR + "") || s.equals(EncryptedExpWriter.TERMINATOR_WITH_CONTINUATION); 220 // }; 221 // while (_reader.ready() && !endOfSection.test(next = _reader.readLine())) { 222 // if (!isValidLine(next)) { 223 // continue; 224 // } 225 // 226 // String tag = getTagEnc(next); 227 // if (next.startsWith(DefaultFrameWriter.TYPE_AND_ID_STR + " ")) { 228 // currentItem = newItem(next); 229 // _linePoints.put(currentItem.getID(), currentItem); 230 // currentItem.setEncryptionDetailForTag(tag + "", EncryptionDetail.UnencryptedOnSave); 231 // storeResult.accept(currentItem); 232 // } else if (next.startsWith("SurrogateFor")) { 233 // int parentID = Integer.parseInt(next.split(" ")[1]); 234 // newFrame.getItemWithID(parentID).addToSurrogates(currentItem); 235 // new Delayed 236 // } 237 // } 238 // 239 // return next; 240 // } 159 241 160 242 @Override -
trunk/src/org/expeditee/encryption/io/EncryptedExpWriter.java
r1413 r1414 44 44 private static final String labelProfile = "Profile"; 45 45 private static final String labelNone = "None"; 46 protected static final String SURROGATE_TERMINATOR = TERMINATOR + "..."; 46 protected static final char TERMINATOR = 'Z'; 47 protected static final String TERMINATOR_WITH_CONTINUATION = TERMINATOR + "..."; 47 48 48 49 public EncryptedExpWriter(String encryptionLabel) { … … 132 133 133 134 if (toWrite.isSurrogate()) { 134 writeLine("SurrogateFor " + toWrite.get Classic().getID());135 writeLine("SurrogateFor " + toWrite.getPrimary().getID()); 135 136 } 136 137 … … 177 178 } 178 179 180 // write out the surrogates 179 181 List<Item> surrogates = frame.getSurrogateItemsToSave(); 180 182 if (!surrogates.isEmpty()) { … … 242 244 243 245 private void writeSurrogateTerminator() throws IOException { 244 writeLine( SURROGATE_TERMINATOR+ nl);246 writeLine(TERMINATOR_WITH_CONTINUATION + nl); 245 247 } 246 248 -
trunk/src/org/expeditee/gui/Frame.java
r1413 r1414 141 141 private List<Item> _body = new ArrayList<Item>(); 142 142 private List<Item> _bodyHiddenDueToPermissions = new ArrayList<Item>(); 143 private List<Item> _surrogates = new ArrayList<Item>(); 143 144 144 145 // for drawing purposes … … 981 982 change(); 982 983 } 984 985 public void addToSurrogates(Item surrogate) { 986 this._surrogates.add(surrogate); 987 } 983 988 984 989 public void refreshSize() -
trunk/src/org/expeditee/io/DefaultFrameReader.java
r1413 r1414 181 181 _DelayedItemTags.add('/'); 182 182 183 _ItemTagsExt.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, Item.class.getMethod("setEncryptionLabel OnLoad", pString));183 _ItemTagsExt.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, Item.class.getMethod("setEncryptionLabel", pString)); 184 184 185 185 _ItemTagsExt.put(DefaultFrameWriter.PLACEHOLDER_STR, Text.class.getMethod("setPlaceholder", pString)); -
trunk/src/org/expeditee/items/Item.java
r1413 r1414 320 320 private Item surrogateFor = null; 321 321 private Set<Item> surrogateItems = new HashSet<Item>(); 322 private static Map<String, EncryptionDetail> classicPropertyEncryptionDefault = new HashMap<String, EncryptionDetail>();322 private static Map<String, EncryptionDetail> primaryPropertyEncryptionDefault = new HashMap<String, EncryptionDetail>(); 323 323 private static Map<String, Boolean> surrogatePropertyInheritanceDefault = new HashMap<String, Boolean>(); 324 protected Map<String, EncryptionDetail> classicPropertyEncryption = new HashMap<String, EncryptionDetail>(classicPropertyEncryptionDefault);324 protected Map<String, EncryptionDetail> primaryPropertyEncryption = new HashMap<String, EncryptionDetail>(primaryPropertyEncryptionDefault); 325 325 protected Map<String, Boolean> surrogatePropertyInheritance = new HashMap<String, Boolean>(surrogatePropertyInheritanceDefault); 326 326 … … 332 332 surrogatePropertyInheritanceDefault.put(tag + "", true); 333 333 } 334 classicPropertyEncryptionDefault.put(tag + "", EncryptionDetail.UnencryptedOnSave);334 primaryPropertyEncryptionDefault.put(tag + "", EncryptionDetail.UnencryptedOnSave); 335 335 } 336 336 337 337 for(String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 338 338 surrogatePropertyInheritanceDefault.put(tag, true); 339 classicPropertyEncryptionDefault.put(tag, EncryptionDetail.UnencryptedOnSave);339 primaryPropertyEncryptionDefault.put(tag, EncryptionDetail.UnencryptedOnSave); 340 340 } 341 341 } … … 436 436 if (isSurrogate()) { 437 437 surrogatePropertyInheritance.put(DefaultFrameWriter.DOT_TYPE_STR, false); 438 Item classic = getClassic();438 Item primary = getPrimary(); 439 439 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 440 classic.classicPropertyEncryption.put(DefaultFrameWriter.DOT_TYPE_STR, EncryptionDetail.InheritanceCheckOnSave);440 primary.primaryPropertyEncryption.put(DefaultFrameWriter.DOT_TYPE_STR, EncryptionDetail.InheritanceCheckOnSave); 441 441 } 442 442 } … … 445 445 public DotType getDotType() { 446 446 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DOT_TYPE_STR)) { 447 return this.get Classic().getDotType();447 return this.getPrimary().getDotType(); 448 448 } else { 449 449 return _type; … … 459 459 if (isSurrogate()) { 460 460 surrogatePropertyInheritance.put(DefaultFrameWriter.FILLED_STR, false); 461 Item classic = getClassic();461 Item primary = getPrimary(); 462 462 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 463 classic.classicPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, EncryptionDetail.InheritanceCheckOnSave);463 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, EncryptionDetail.InheritanceCheckOnSave); 464 464 } 465 465 } … … 468 468 public boolean getFilled() { 469 469 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILLED_STR)) { 470 return this.get Classic().getFilled();470 return this.getPrimary().getFilled(); 471 471 } else { 472 472 return _filled; … … 492 492 if (isSurrogate()) { 493 493 surrogatePropertyInheritance.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, false); 494 Item classic = getClassic();494 Item primary = getPrimary(); 495 495 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 496 classic.classicPropertyEncryption.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, EncryptionDetail.InheritanceCheckOnSave);496 primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, EncryptionDetail.InheritanceCheckOnSave); 497 497 } 498 498 } … … 506 506 public double getGradientAngle() { 507 507 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.GRADIENT_ANGLE_STR)) { 508 return this.get Classic().getGradientAngle();508 return this.getPrimary().getGradientAngle(); 509 509 } else { 510 510 return _gradientAngle; … … 565 565 if (isSurrogate()) { 566 566 surrogatePropertyInheritance.put(DefaultFrameWriter.PERMISSION_STR, false); 567 Item classic = getClassic();567 Item primary = getPrimary(); 568 568 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 569 classic.classicPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, EncryptionDetail.InheritanceCheckOnSave);569 primary.primaryPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, EncryptionDetail.InheritanceCheckOnSave); 570 570 } 571 571 } … … 574 574 public PermissionTriple getPermission() { 575 575 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.PERMISSION_STR)) { 576 return this.get Classic().getPermission();576 return this.getPrimary().getPermission(); 577 577 } else { 578 578 return _permissionTriple; … … 724 724 public List<String> getAction() { 725 725 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_STR)) { 726 return this.get Classic().getAction();726 return this.getPrimary().getAction(); 727 727 } else { 728 728 return _actions; … … 732 732 public List<String> getData() { 733 733 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DATA_STR)) { 734 return this.get Classic().getData();734 return this.getPrimary().getData(); 735 735 } else { 736 736 return _data.getData(); … … 740 740 public List<String> getActionCursorEnter() { 741 741 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR)) { 742 return this.get Classic().getActionCursorEnter();742 return this.getPrimary().getActionCursorEnter(); 743 743 } else { 744 744 return _actionCursorEnter; … … 748 748 public List<String> getActionCursorLeave() { 749 749 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR)) { 750 return this.get Classic().getActionCursorLeave();750 return this.getPrimary().getActionCursorLeave(); 751 751 } else { 752 752 return _actionCursorLeave; … … 756 756 public List<String> getActionEnterFrame() { 757 757 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_ENTER_FRAME_STR)) { 758 return this.get Classic().getActionEnterFrame();758 return this.getPrimary().getActionEnterFrame(); 759 759 } else { 760 760 return _actionEnterFrame; … … 764 764 public List<String> getActionLeaveFrame() { 765 765 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR)) { 766 return this.get Classic().getActionLeaveFrame();766 return this.getPrimary().getActionLeaveFrame(); 767 767 } else { 768 768 return _actionLeaveFrame; … … 772 772 public boolean getActionMark() { 773 773 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_MARK_STR)) { 774 return this.get Classic().getActionMark();774 return this.getPrimary().getActionMark(); 775 775 } else { 776 776 return _actionMark; … … 797 797 public String getArrow() { 798 798 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ARROW_STR)) { 799 return this.get Classic().getArrow();799 return this.getPrimary().getArrow(); 800 800 } else { 801 801 if (!hasVisibleArrow()) … … 832 832 public Colour getBackgroundColor() { 833 833 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.BACKGROUND_COLOR_STR)) { 834 return this.get Classic().getBackgroundColor();834 return this.getPrimary().getBackgroundColor(); 835 835 } else { 836 836 return _backgroundColour; … … 840 840 public Colour getBorderColor() { 841 841 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.BORDER_COLOR_STR)) { 842 return this.get Classic().getBorderColor();842 return this.getPrimary().getBorderColor(); 843 843 } else { 844 844 return _colorBorder; … … 917 917 public Colour getColor() { 918 918 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.COLOR_STR)) { 919 return this.get Classic().getColor();919 return this.getPrimary().getColor(); 920 920 } else { 921 921 return _foregroundColour; … … 934 934 public String getConstraintIDs() { 935 935 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.CONSTRAINT_IDS_STR)) { 936 return this.get Classic().getConstraintIDs();936 return this.getPrimary().getConstraintIDs(); 937 937 } else { 938 938 if (_constraints == null || _constraints.size() == 0) … … 971 971 public String getDateCreated() { 972 972 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DATE_CREATED_STR)) { 973 return this.get Classic().getDateCreated();973 return this.getPrimary().getDateCreated(); 974 974 } else { 975 975 return _creationDate; … … 979 979 public Colour getFillColor() { 980 980 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILL_COLOR_STR)) { 981 return this.get Classic().getFillColor();981 return this.getPrimary().getFillColor(); 982 982 } else { 983 983 return _fillColour; … … 987 987 public String getFillPattern() { 988 988 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILL_PATTERN_STR)) { 989 return this.get Classic().getFillPattern();989 return this.getPrimary().getFillPattern(); 990 990 } else { 991 991 return _fillPattern; … … 1008 1008 public boolean getHighlight() { 1009 1009 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.HIGHLIGHT_STR)) { 1010 return this.get Classic().getHighlight();1010 return this.getPrimary().getHighlight(); 1011 1011 } else { 1012 1012 return _highlight; … … 1040 1040 public String getLineIDs() { 1041 1041 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINE_IDS_STR)) { 1042 return this.get Classic().getLineIDs();1042 return this.getPrimary().getLineIDs(); 1043 1043 } else { 1044 1044 String lineID = null; … … 1057 1057 public int[] getLinePattern() { 1058 1058 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINE_PATTERN_STR)) { 1059 return this.get Classic().getLinePattern();1059 return this.getPrimary().getLinePattern(); 1060 1060 } else { 1061 1061 return _linePattern; … … 1083 1083 public String getLink() { 1084 1084 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_STR)) { 1085 return this.get Classic().getLink();1085 return this.getPrimary().getLink(); 1086 1086 } else { 1087 1087 return _link; … … 1091 1091 public String getFormula() { 1092 1092 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FORMULA_STR)) { 1093 return this.get Classic().getFormula();1093 return this.getPrimary().getFormula(); 1094 1094 } else { 1095 1095 return _formula; … … 1112 1112 if (isSurrogate()) { 1113 1113 surrogatePropertyInheritance.put(DefaultFrameWriter.FORMULA_STR, false); 1114 Item classic = getClassic();1114 Item primary = getPrimary(); 1115 1115 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FORMULA_STR)) { 1116 classic.classicPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, EncryptionDetail.InheritanceCheckOnSave);1116 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, EncryptionDetail.InheritanceCheckOnSave); 1117 1117 } 1118 1118 } … … 1127 1127 public String getLinkFrameset() { 1128 1128 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_FRAMESET_STR)) { 1129 return this.get Classic().getLinkFrameset();1129 return this.getPrimary().getLinkFrameset(); 1130 1130 } else { 1131 1131 return _link_frameset; … … 1135 1135 public boolean getLinkMark() { 1136 1136 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_MARK_STR)) { 1137 return this.get Classic().getLinkMark();1137 return this.getPrimary().getLinkMark(); 1138 1138 } else { 1139 1139 return _linkMark; … … 1143 1143 public String getLinkTemplate() { 1144 1144 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_TEMPLATE_STR)) { 1145 return this.get Classic().getLinkTemplate();1145 return this.getPrimary().getLinkTemplate(); 1146 1146 } else { 1147 1147 return _link_template; … … 1156 1156 public String getOwner() { 1157 1157 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.OWNER_STR)) { 1158 return this.get Classic().getOwner();1158 return this.getPrimary().getOwner(); 1159 1159 } else { 1160 1160 return _owner; … … 1276 1276 public final Point getPosition() { 1277 1277 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) { 1278 return this.get Classic().getPosition();1278 return this.getPrimary().getPosition(); 1279 1279 } else { 1280 1280 return new Point(getX(), getY()); … … 1306 1306 public String getTypeAndID() { 1307 1307 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TYPE_AND_ID_STR)) { 1308 return this.get Classic().getTypeAndID();1308 return this.getPrimary().getTypeAndID(); 1309 1309 } else { 1310 1310 return "T " + getID(); … … 1314 1314 public Integer getWidthToSave() { 1315 1315 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.WIDTH_TO_SAVE_STR)) { 1316 return this.get Classic().getWidthToSave();1316 return this.getPrimary().getWidthToSave(); 1317 1317 } else { 1318 1318 return getWidth(); … … 1322 1322 public Integer getMinWidthToSave() { 1323 1323 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR)) { 1324 return this.get Classic().getMinWidthToSave();1324 return this.getPrimary().getMinWidthToSave(); 1325 1325 } else { 1326 1326 return getMinWidth(); … … 1349 1349 public int getX() { 1350 1350 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) { 1351 return this.get Classic().getX();1351 return this.getPrimary().getX(); 1352 1352 } else { 1353 1353 return Math.round(_x); … … 1362 1362 public int getY() { 1363 1363 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) { 1364 return this.get Classic().getY();1364 return this.getPrimary().getY(); 1365 1365 } else { 1366 1366 return Math.round(_y); … … 1521 1521 if (isSurrogate()) { 1522 1522 surrogatePropertyInheritance.put(DefaultFrameWriter.TOOLTIP_STR, false); 1523 Item classic = getClassic();1523 Item primary = getPrimary(); 1524 1524 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TOOLTIP_STR)) { 1525 classic.classicPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, EncryptionDetail.InheritanceCheckOnSave);1525 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, EncryptionDetail.InheritanceCheckOnSave); 1526 1526 } 1527 1527 } … … 1530 1530 public List<String> getTooltip() { 1531 1531 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TOOLTIP_STR)) { 1532 return this.get Classic().getTooltip();1532 return this.getPrimary().getTooltip(); 1533 1533 } else { 1534 1534 return _tooltip.asStringList(); … … 1825 1825 if (isSurrogate()) { 1826 1826 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_STR, false); 1827 Item classic = getClassic();1827 Item primary = getPrimary(); 1828 1828 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_STR)) { 1829 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, EncryptionDetail.InheritanceCheckOnSave);1829 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, EncryptionDetail.InheritanceCheckOnSave); 1830 1830 } 1831 1831 } … … 1845 1845 if (isSurrogate()) { 1846 1846 surrogatePropertyInheritance.put(DefaultFrameWriter.DATA_STR, false); 1847 Item classic = getClassic();1847 Item primary = getPrimary(); 1848 1848 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DATA_STR)) { 1849 classic.classicPropertyEncryption.put(DefaultFrameWriter.DATA_STR, EncryptionDetail.InheritanceCheckOnSave);1849 primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATA_STR, EncryptionDetail.InheritanceCheckOnSave); 1850 1850 } 1851 1851 } … … 1861 1861 if (isSurrogate()) { 1862 1862 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, false); 1863 Item classic = getClassic();1863 Item primary = getPrimary(); 1864 1864 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR)) { 1865 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, EncryptionDetail.InheritanceCheckOnSave);1865 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, EncryptionDetail.InheritanceCheckOnSave); 1866 1866 } 1867 1867 } … … 1873 1873 if (isSurrogate()) { 1874 1874 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, false); 1875 Item classic = getClassic();1875 Item primary = getPrimary(); 1876 1876 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR)) { 1877 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, EncryptionDetail.InheritanceCheckOnSave);1877 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, EncryptionDetail.InheritanceCheckOnSave); 1878 1878 } 1879 1879 } … … 1885 1885 if (isSurrogate()) { 1886 1886 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, false); 1887 Item classic = getClassic();1887 Item primary = getPrimary(); 1888 1888 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_ENTER_FRAME_STR)) { 1889 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave);1889 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave); 1890 1890 } 1891 1891 } … … 1897 1897 if (isSurrogate()) { 1898 1898 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, false); 1899 Item classic = getClassic();1899 Item primary = getPrimary(); 1900 1900 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR)) { 1901 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave);1901 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave); 1902 1902 } 1903 1903 } … … 1912 1912 if (isSurrogate()) { 1913 1913 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_MARK_STR, false); 1914 Item classic = getClassic();1914 Item primary = getPrimary(); 1915 1915 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_MARK_STR)) { 1916 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_MARK_STR, EncryptionDetail.InheritanceCheckOnSave);1916 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_MARK_STR, EncryptionDetail.InheritanceCheckOnSave); 1917 1917 } 1918 1918 } … … 1945 1945 if (isSurrogate()) { 1946 1946 surrogatePropertyInheritance.put(DefaultFrameWriter.ARROW_STR, false); 1947 Item classic = getClassic();1947 Item primary = getPrimary(); 1948 1948 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ARROW_STR)) { 1949 classic.classicPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, EncryptionDetail.InheritanceCheckOnSave);1949 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, EncryptionDetail.InheritanceCheckOnSave); 1950 1950 } 1951 1951 } … … 1983 1983 if (isSurrogate()) { 1984 1984 surrogatePropertyInheritance.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, false); 1985 Item classic = getClassic();1985 Item primary = getPrimary(); 1986 1986 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.BACKGROUND_COLOR_STR)) { 1987 classic.classicPropertyEncryption.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);1987 primary.primaryPropertyEncryption.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 1988 1988 } 1989 1989 } … … 1998 1998 if (isSurrogate()) { 1999 1999 surrogatePropertyInheritance.put(DefaultFrameWriter.BORDER_COLOR_STR, false); 2000 Item classic = getClassic();2000 Item primary = getPrimary(); 2001 2001 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.BORDER_COLOR_STR)) { 2002 classic.classicPropertyEncryption.put(DefaultFrameWriter.BORDER_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);2002 primary.primaryPropertyEncryption.put(DefaultFrameWriter.BORDER_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 2003 2003 } 2004 2004 } … … 2037 2037 if (isSurrogate()) { 2038 2038 surrogatePropertyInheritance.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, false); 2039 Item classic = getClassic();2039 Item primary = getPrimary(); 2040 2040 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.CONSTRAINT_IDS_STR)) { 2041 classic.classicPropertyEncryption.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, EncryptionDetail.InheritanceCheckOnSave);2041 primary.primaryPropertyEncryption.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, EncryptionDetail.InheritanceCheckOnSave); 2042 2042 } 2043 2043 } … … 2066 2066 if (isSurrogate()) { 2067 2067 surrogatePropertyInheritance.put(DefaultFrameWriter.DATE_CREATED_STR, false); 2068 Item classic = getClassic();2068 Item primary = getPrimary(); 2069 2069 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DATE_CREATED_STR)) { 2070 classic.classicPropertyEncryption.put(DefaultFrameWriter.DATE_CREATED_STR, EncryptionDetail.InheritanceCheckOnSave);2070 primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATE_CREATED_STR, EncryptionDetail.InheritanceCheckOnSave); 2071 2071 } 2072 2072 } … … 2089 2089 if (isSurrogate()) { 2090 2090 surrogatePropertyInheritance.put(DefaultFrameWriter.FILL_COLOR_STR, false); 2091 Item classic = getClassic();2091 Item primary = getPrimary(); 2092 2092 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FILL_COLOR_STR)) { 2093 classic.classicPropertyEncryption.put(DefaultFrameWriter.FILL_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);2093 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 2094 2094 } 2095 2095 } … … 2110 2110 if (isSurrogate()) { 2111 2111 surrogatePropertyInheritance.put(DefaultFrameWriter.GRADIENT_COLOR_STR, false); 2112 Item classic = getClassic();2112 Item primary = getPrimary(); 2113 2113 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.GRADIENT_COLOR_STR)) { 2114 classic.classicPropertyEncryption.put(DefaultFrameWriter.GRADIENT_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);2114 primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 2115 2115 } 2116 2116 } … … 2119 2119 public Colour getGradientColor() { 2120 2120 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.GRADIENT_COLOR_STR)) { 2121 return this.get Classic().getGradientColor();2121 return this.getPrimary().getGradientColor(); 2122 2122 } else { 2123 2123 return _gradientColour; … … 2132 2132 if (isSurrogate()) { 2133 2133 surrogatePropertyInheritance.put(DefaultFrameWriter.FILL_PATTERN_STR, false); 2134 Item classic = getClassic();2134 Item primary = getPrimary(); 2135 2135 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FILL_PATTERN_STR)) { 2136 classic.classicPropertyEncryption.put(DefaultFrameWriter.FILL_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave);2136 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave); 2137 2137 } 2138 2138 } … … 2154 2154 if (isSurrogate()) { 2155 2155 surrogatePropertyInheritance.put(DefaultFrameWriter.HIGHLIGHT_STR, false); 2156 Item classic = getClassic();2156 Item primary = getPrimary(); 2157 2157 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.HIGHLIGHT_STR)) { 2158 classic.classicPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);2158 primary.primaryPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, EncryptionDetail.InheritanceCheckOnSave); 2159 2159 } 2160 2160 } … … 2173 2173 if (isSurrogate()) { 2174 2174 surrogatePropertyInheritance.put(DefaultFrameWriter.TYPE_AND_ID_STR, false); 2175 Item classic = getClassic();2175 Item primary = getPrimary(); 2176 2176 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TYPE_AND_ID_STR)) { 2177 classic.classicPropertyEncryption.put(DefaultFrameWriter.TYPE_AND_ID_STR, EncryptionDetail.InheritanceCheckOnSave);2177 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TYPE_AND_ID_STR, EncryptionDetail.InheritanceCheckOnSave); 2178 2178 } 2179 2179 } … … 2189 2189 if (isSurrogate()) { 2190 2190 surrogatePropertyInheritance.put(DefaultFrameWriter.LINE_IDS_STR, false); 2191 Item classic = getClassic();2191 Item primary = getPrimary(); 2192 2192 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINE_IDS_STR)) { 2193 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINE_IDS_STR, EncryptionDetail.InheritanceCheckOnSave);2193 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_IDS_STR, EncryptionDetail.InheritanceCheckOnSave); 2194 2194 } 2195 2195 } … … 2204 2204 if (isSurrogate()) { 2205 2205 surrogatePropertyInheritance.put(DefaultFrameWriter.LINE_PATTERN_STR, false); 2206 Item classic = getClassic();2206 Item primary = getPrimary(); 2207 2207 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINE_PATTERN_STR)) { 2208 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINE_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave);2208 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave); 2209 2209 } 2210 2210 } … … 2244 2244 if (isSurrogate()) { 2245 2245 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_STR, false); 2246 Item classic = getClassic();2246 Item primary = getPrimary(); 2247 2247 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_STR)) { 2248 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_STR, EncryptionDetail.InheritanceCheckOnSave);2248 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_STR, EncryptionDetail.InheritanceCheckOnSave); 2249 2249 } 2250 2250 } … … 2256 2256 if (isSurrogate()) { 2257 2257 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_HISTORY_STR, false); 2258 Item classic = getClassic();2258 Item primary = getPrimary(); 2259 2259 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_HISTORY_STR)) { 2260 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_HISTORY_STR, EncryptionDetail.InheritanceCheckOnSave);2260 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_HISTORY_STR, EncryptionDetail.InheritanceCheckOnSave); 2261 2261 } 2262 2262 } … … 2265 2265 public boolean getLinkHistory() { 2266 2266 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_HISTORY_STR)) { 2267 return this.get Classic().getLinkHistory();2267 return this.getPrimary().getLinkHistory(); 2268 2268 } else { 2269 2269 return _linkHistory; … … 2282 2282 if (isSurrogate()) { 2283 2283 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_FRAMESET_STR, false); 2284 Item classic = getClassic();2284 Item primary = getPrimary(); 2285 2285 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_FRAMESET_STR)) { 2286 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_FRAMESET_STR, EncryptionDetail.InheritanceCheckOnSave);2286 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_FRAMESET_STR, EncryptionDetail.InheritanceCheckOnSave); 2287 2287 } 2288 2288 } … … 2297 2297 if (isSurrogate()) { 2298 2298 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_MARK_STR, false); 2299 Item classic = getClassic();2299 Item primary = getPrimary(); 2300 2300 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_MARK_STR)) { 2301 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_MARK_STR, EncryptionDetail.InheritanceCheckOnSave);2301 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_MARK_STR, EncryptionDetail.InheritanceCheckOnSave); 2302 2302 } 2303 2303 } … … 2314 2314 if (isSurrogate()) { 2315 2315 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_TEMPLATE_STR, false); 2316 Item classic = getClassic();2316 Item primary = getPrimary(); 2317 2317 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_TEMPLATE_STR)) { 2318 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_TEMPLATE_STR, EncryptionDetail.InheritanceCheckOnSave);2318 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_TEMPLATE_STR, EncryptionDetail.InheritanceCheckOnSave); 2319 2319 } 2320 2320 } … … 2348 2348 if (isSurrogate()) { 2349 2349 surrogatePropertyInheritance.put(DefaultFrameWriter.OWNER_STR, false); 2350 Item classic = getClassic();2350 Item primary = getPrimary(); 2351 2351 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.OWNER_STR)) { 2352 classic.classicPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, EncryptionDetail.InheritanceCheckOnSave);2352 primary.primaryPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, EncryptionDetail.InheritanceCheckOnSave); 2353 2353 } 2354 2354 } … … 2539 2539 if (isSurrogate()) { 2540 2540 surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false); 2541 Item classic = getClassic();2541 Item primary = getPrimary(); 2542 2542 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) { 2543 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);2543 primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave); 2544 2544 } 2545 2545 } … … 2583 2583 if (isSurrogate()) { 2584 2584 surrogatePropertyInheritance.put(DefaultFrameWriter.THICKNESS_STR, false); 2585 Item classic = getClassic();2585 Item primary = getPrimary(); 2586 2586 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.THICKNESS_STR)) { 2587 classic.classicPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, EncryptionDetail.InheritanceCheckOnSave);2587 primary.primaryPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, EncryptionDetail.InheritanceCheckOnSave); 2588 2588 } 2589 2589 } … … 2641 2641 public float getThickness() { 2642 2642 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.THICKNESS_STR)) { 2643 return this.get Classic().getThickness();2643 return this.getPrimary().getThickness(); 2644 2644 } else { 2645 2645 return _thickness; … … 2695 2695 if (isSurrogate()) { 2696 2696 surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false); 2697 Item classic = getClassic();2697 Item primary = getPrimary(); 2698 2698 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) { 2699 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);2699 primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave); 2700 2700 } 2701 2701 } … … 2713 2713 if (isSurrogate()) { 2714 2714 surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false); 2715 Item classic = getClassic();2715 Item primary = getPrimary(); 2716 2716 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) { 2717 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);2717 primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave); 2718 2718 } 2719 2719 } … … 3525 3525 if (isSurrogate()) { 3526 3526 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_LEFT_STR, false); 3527 Item classic = getClassic();3527 Item primary = getPrimary(); 3528 3528 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_LEFT_STR)) { 3529 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);3529 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave); 3530 3530 } 3531 3531 } … … 3541 3541 if (isSurrogate()) { 3542 3542 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, false); 3543 Item classic = getClassic();3543 Item primary = getPrimary(); 3544 3544 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_RIGHT_STR)) { 3545 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);3545 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave); 3546 3546 } 3547 3547 } … … 3557 3557 if (isSurrogate()) { 3558 3558 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_TOP_STR, false); 3559 Item classic = getClassic();3559 Item primary = getPrimary(); 3560 3560 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_TOP_STR)) { 3561 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);3561 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave); 3562 3562 } 3563 3563 } … … 3574 3574 if (isSurrogate()) { 3575 3575 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, false); 3576 Item classic = getClassic();3576 Item primary = getPrimary(); 3577 3577 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) { 3578 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);3578 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave); 3579 3579 } 3580 3580 } … … 3596 3596 public Integer getAnchorLeft() { 3597 3597 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_LEFT_STR)) { 3598 return this.get Classic().getAnchorLeft();3598 return this.getPrimary().getAnchorLeft(); 3599 3599 } else { 3600 3600 return _anchoring.getLeftAnchor(); … … 3604 3604 public Integer getAnchorRight() { 3605 3605 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_RIGHT_STR)) { 3606 return this.get Classic().getAnchorRight();3606 return this.getPrimary().getAnchorRight(); 3607 3607 } else { 3608 3608 return _anchoring.getRightAnchor(); … … 3612 3612 public Integer getAnchorTop() { 3613 3613 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_TOP_STR)) { 3614 return this.get Classic().getAnchorTop();3614 return this.getPrimary().getAnchorTop(); 3615 3615 } else { 3616 3616 return _anchoring.getTopAnchor(); … … 3620 3620 public Integer getAnchorBottom() { 3621 3621 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) { 3622 return this.get Classic().getAnchorBottom();3622 return this.getPrimary().getAnchorBottom(); 3623 3623 } else { 3624 3624 return _anchoring.getBottomAnchor(); … … 3628 3628 public String getText() { 3629 3629 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TEXT_STR)) { 3630 return this.get Classic().getText();3630 return this.getPrimary().getText(); 3631 3631 } else { 3632 3632 return "@" + getClass().getSimpleName() + ":" + getID(); … … 3868 3868 public int getMagnetizedItemLeft() { 3869 3869 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR)) { 3870 return this.get Classic().getMagnetizedItemLeft();3870 return this.getPrimary().getMagnetizedItemLeft(); 3871 3871 } else { 3872 3872 if(_magnetizedItemLeft != null) return _magnetizedItemLeft.getID(); … … 3884 3884 if (isSurrogate()) { 3885 3885 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, false); 3886 Item classic = getClassic();3886 Item primary = getPrimary(); 3887 3887 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR)) { 3888 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);3888 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave); 3889 3889 } 3890 3890 } … … 3893 3893 public int getMagnetizedItemRight() { 3894 3894 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR)) { 3895 return this.get Classic().getMagnetizedItemRight();3895 return this.getPrimary().getMagnetizedItemRight(); 3896 3896 } else { 3897 3897 if(_magnetizedItemRight != null) return _magnetizedItemRight.getID(); … … 3909 3909 if (isSurrogate()) { 3910 3910 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, false); 3911 Item classic = getClassic();3911 Item primary = getPrimary(); 3912 3912 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR)) { 3913 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);3913 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave); 3914 3914 } 3915 3915 } … … 3918 3918 public int getMagnetizedItemTop() { 3919 3919 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR)) { 3920 return this.get Classic().getMagnetizedItemTop();3920 return this.getPrimary().getMagnetizedItemTop(); 3921 3921 } else { 3922 3922 if(_magnetizedItemTop != null) return _magnetizedItemTop.getID(); … … 3934 3934 if (isSurrogate()) { 3935 3935 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, false); 3936 Item classic = getClassic();3936 Item primary = getPrimary(); 3937 3937 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR)) { 3938 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);3938 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, EncryptionDetail.InheritanceCheckOnSave); 3939 3939 } 3940 3940 } … … 3943 3943 public int getMagnetizedItemBottom() { 3944 3944 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR)) { 3945 return this.get Classic().getMagnetizedItemBottom();3945 return this.getPrimary().getMagnetizedItemBottom(); 3946 3946 } else { 3947 3947 if(_magnetizedItemBottom != null) return _magnetizedItemBottom.getID(); … … 3959 3959 if (isSurrogate()) { 3960 3960 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, false); 3961 Item classic = getClassic();3961 Item primary = getPrimary(); 3962 3962 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR)) { 3963 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);3963 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave); 3964 3964 } 3965 3965 } … … 3968 3968 public String getEncryptionLabel() { 3969 3969 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ENCRYPTION_LABEL_STR)) { 3970 return this.get Classic().getEncryptionLabel();3970 return this.getPrimary().getEncryptionLabel(); 3971 3971 } else { 3972 3972 return _encryptionLabel; … … 3976 3976 public void setEncryptionLabel(String label) { 3977 3977 this._encryptionLabel = label; 3978 if (this.getSurrogates().isEmpty()) { 3979 Item copy = this.copy(); 3980 if (copy instanceof Text) { copy.setText("Encrypted"); } 3981 this.addToSurrogates(copy); 3982 } 3983 3984 3985 3986 for (Character tag: DefaultFrameWriter.getItemTags().keySet()) { 3987 if (tag == 'S') { 3988 classicPropertyEncryption.put(tag + "", EncryptionDetail.UnencryptedOnSave); 3989 } else { 3990 classicPropertyEncryption.put(tag + "", EncryptionDetail.ReencryptOnSave); 3991 } 3992 3993 for (Item surrogate: this.getSurrogates()) { 3994 if (tag == 'T') { 3995 surrogate.surrogatePropertyInheritance.put(tag + "", false); 3996 } else { 3997 surrogate.surrogatePropertyInheritance.put(tag + "", true); 3998 } 3999 } 4000 } 4001 4002 for (String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 4003 if (tag == "_el") { 4004 classicPropertyEncryption.put(tag, EncryptionDetail.UnencryptedOnSave); 4005 } else { 4006 classicPropertyEncryption.put(tag, EncryptionDetail.ReencryptOnSave); 4007 } 4008 4009 for (Item surrogate: this.getSurrogates()) { 4010 surrogate.surrogatePropertyInheritance.put(tag + "", true); 4011 } 4012 } 4013 4014 /* if (isSurrogate()) { 4015 surrogatePropertyInheritance.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, false); 4016 Item classic = getClassic(); 4017 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ENCRYPTION_LABEL_STR)) { 4018 classic.classicPropertyEncryption.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, EncryptionDetail.InheritanceCheckOnSave); 4019 } 4020 }*/ 4021 } 4022 4023 public void setEncryptionLabelOnLoad(String label) { 4024 this._encryptionLabel = label; 4025 4026 for (Character tag: DefaultFrameWriter.getItemTags().keySet()) { 4027 if (tag == 'S') { 4028 classicPropertyEncryption.put(tag + "", EncryptionDetail.UnencryptedOnSave); 4029 } else { 4030 classicPropertyEncryption.put(tag + "", EncryptionDetail.ReencryptOnSave); 4031 } 4032 } 4033 4034 for (String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 4035 if (tag == "_el") { 4036 classicPropertyEncryption.put(tag, EncryptionDetail.UnencryptedOnSave); 4037 } else { 4038 classicPropertyEncryption.put(tag, EncryptionDetail.ReencryptOnSave); 4039 } 4040 } 3978 this.getSurrogates().clear(); 3979 Item copy = this.copy(); 3980 if (copy instanceof Text) { copy.setText("Encrypted"); } 3981 this.addToSurrogates(copy); 4041 3982 } 4042 3983 … … 4096 4037 } 4097 4038 4098 private void setAsSurrogateFor(Item classic) {4099 this.surrogateFor = classic;4039 private void setAsSurrogateFor(Item primary) { 4040 this.surrogateFor = primary; 4100 4041 } 4101 4042 … … 4103 4044 this.surrogateItems.add(surrogate); 4104 4045 surrogate.setAsSurrogateFor(this); 4046 4047 for (Character tag: DefaultFrameWriter.getItemTags().keySet()) { 4048 if (tag == 'T') { 4049 primaryPropertyEncryption.put(tag + "", EncryptionDetail.ReencryptOnSave); 4050 } else { 4051 primaryPropertyEncryption.put(tag + "", EncryptionDetail.UnencryptedOnSave); 4052 } 4053 4054 if (tag == 'T' || tag == 'S') { 4055 surrogate.surrogatePropertyInheritance.put(tag + "", false); 4056 } else { 4057 surrogate.surrogatePropertyInheritance.put(tag + "", true); 4058 } 4059 } 4060 4061 for (String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 4062 primaryPropertyEncryption.put(tag, EncryptionDetail.UnencryptedOnSave); 4063 surrogate.surrogatePropertyInheritance.put(tag + "", true); 4064 } 4105 4065 } 4106 4066 … … 4109 4069 } 4110 4070 4111 public Item get Classic() {4071 public Item getPrimary() { 4112 4072 return this.surrogateFor; 4113 4073 } 4114 4074 4115 4075 public EncryptionDetail getEncryptionDetailForTag(String tag) { 4116 EncryptionDetail encryptionDetail = classicPropertyEncryption.get(tag);4076 EncryptionDetail encryptionDetail = primaryPropertyEncryption.get(tag); 4117 4077 4118 4078 if (encryptionDetail == null) { … … 4124 4084 4125 4085 public void setEncryptionDetailForTag(String tag, EncryptionDetail encryptionDetail) { 4126 classicPropertyEncryption.put(tag, encryptionDetail);4086 primaryPropertyEncryption.put(tag, encryptionDetail); 4127 4087 } 4128 4088 … … 4133 4093 4134 4094 /** 4135 * If when setting a property, we find that the classichas a undeciphered value, when we must containue using that undeciphered value4095 * If when setting a property, we find that the primary has a undeciphered value, when we must containue using that undeciphered value 4136 4096 * when eventually saving. 4137 4097 * @return 4138 4098 */ 4139 4099 protected boolean subjectToInheritanceCheckOnSave(String tag) { 4140 if (get Classic() == null) return false;4141 return get Classic().classicPropertyEncryption.get(tag) != EncryptionDetail.UseUndecipheredValueOnSave;4100 if (getPrimary() == null) return false; 4101 return getPrimary().primaryPropertyEncryption.get(tag) != EncryptionDetail.UseUndecipheredValueOnSave; 4142 4102 } 4143 4103 } -
trunk/src/org/expeditee/items/Text.java
r1413 r1414 407 407 if (isSurrogate()) { 408 408 surrogatePropertyInheritance.put(DefaultFrameWriter.WIDTH_TO_SAVE_STR, false); 409 Item classic = getClassic();409 Item primary = getPrimary(); 410 410 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.WIDTH_TO_SAVE_STR)) { 411 classic.classicPropertyEncryption.put(DefaultFrameWriter.WIDTH_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave);411 primary.primaryPropertyEncryption.put(DefaultFrameWriter.WIDTH_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave); 412 412 } 413 413 } … … 430 430 if (isSurrogate()) { 431 431 surrogatePropertyInheritance.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR, false); 432 Item classic = getClassic();432 Item primary = getPrimary(); 433 433 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR)) { 434 classic.classicPropertyEncryption.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave);434 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave); 435 435 } 436 436 } … … 451 451 public Integer getWidth() { 452 452 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.WIDTH_TO_SAVE_STR)) { 453 return this.get Classic().getWidth();453 return this.getPrimary().getWidth(); 454 454 } else { 455 455 return _width; … … 467 467 public Integer getMinWidth() { 468 468 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR)) { 469 return this.get Classic().getMinWidth();469 return this.getPrimary().getMinWidth(); 470 470 } else { 471 471 return _minWidth; … … 483 483 public Colour getHighlightColor() { 484 484 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.HIGHLIGHT_STR)) { 485 return this.get Classic().getHighlightColor();485 return this.getPrimary().getHighlightColor(); 486 486 } else { 487 487 return _highlightColour; … … 511 511 if (isSurrogate()) { 512 512 surrogatePropertyInheritance.put(DefaultFrameWriter.JUSTIFICATION_STR, false); 513 Item classic = getClassic();513 Item primary = getPrimary(); 514 514 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.JUSTIFICATION_STR)) { 515 classic.classicPropertyEncryption.put(DefaultFrameWriter.JUSTIFICATION_STR, EncryptionDetail.InheritanceCheckOnSave);515 primary.primaryPropertyEncryption.put(DefaultFrameWriter.JUSTIFICATION_STR, EncryptionDetail.InheritanceCheckOnSave); 516 516 } 517 517 } … … 528 528 public Justification getJustification() { 529 529 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.JUSTIFICATION_STR)) { 530 return ((Text) this.get Classic()).getJustification();530 return ((Text) this.getPrimary()).getJustification(); 531 531 } else { 532 532 if (_justification == null || _justification.equals(Justification.left)) { … … 692 692 if (isSurrogate()) { 693 693 surrogatePropertyInheritance.put(DefaultFrameWriter.TEXT_STR, false); 694 Item classic = getClassic();694 Item primary = getPrimary(); 695 695 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TEXT_STR)) { 696 classic.classicPropertyEncryption.put(DefaultFrameWriter.TEXT_STR, EncryptionDetail.InheritanceCheckOnSave);696 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TEXT_STR, EncryptionDetail.InheritanceCheckOnSave); 697 697 } 698 698 } … … 1330 1330 if (isSurrogate()) { 1331 1331 surrogatePropertyInheritance.put(DefaultFrameWriter.FONT_STR, false); 1332 Item classic = getClassic();1332 Item primary = getPrimary(); 1333 1333 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FONT_STR)) { 1334 classic.classicPropertyEncryption.put(DefaultFrameWriter.FONT_STR, EncryptionDetail.InheritanceCheckOnSave);1334 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FONT_STR, EncryptionDetail.InheritanceCheckOnSave); 1335 1335 } 1336 1336 } … … 1344 1344 public Font getFont() { 1345 1345 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FONT_STR)) { 1346 return ((Text) this.get Classic()).getFont();1346 return ((Text) this.getPrimary()).getFont(); 1347 1347 } else { 1348 1348 return _font; … … 1508 1508 public String getText() { 1509 1509 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TEXT_STR)) { 1510 return this.get Classic().getText();1510 return this.getPrimary().getText(); 1511 1511 } else { 1512 1512 return _text.toString(); … … 1552 1552 if (isSurrogate()) { 1553 1553 surrogatePropertyInheritance.put(DefaultFrameWriter.SPACING_STR, false); 1554 Item classic = getClassic();1554 Item primary = getPrimary(); 1555 1555 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.SPACING_STR)) { 1556 classic.classicPropertyEncryption.put(DefaultFrameWriter.SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);1556 primary.primaryPropertyEncryption.put(DefaultFrameWriter.SPACING_STR, EncryptionDetail.InheritanceCheckOnSave); 1557 1557 } 1558 1558 } … … 1566 1566 public float getSpacing() { 1567 1567 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.SPACING_STR)) { 1568 return ((Text) this.get Classic()).getSpacing();1568 return ((Text) this.getPrimary()).getSpacing(); 1569 1569 } else { 1570 1570 return _spacing; … … 1593 1593 if (isSurrogate()) { 1594 1594 surrogatePropertyInheritance.put(DefaultFrameWriter.WORD_SPACING_STR, false); 1595 Item classic = getClassic();1595 Item primary = getPrimary(); 1596 1596 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.WORD_SPACING_STR)) { 1597 classic.classicPropertyEncryption.put(DefaultFrameWriter.WORD_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);1597 primary.primaryPropertyEncryption.put(DefaultFrameWriter.WORD_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave); 1598 1598 } 1599 1599 } … … 1602 1602 public int getWordSpacing() { 1603 1603 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.WORD_SPACING_STR)) { 1604 return ((Text) this.get Classic()).getWordSpacing();1604 return ((Text) this.getPrimary()).getWordSpacing(); 1605 1605 } else { 1606 1606 return _word_spacing; … … 1624 1624 if (isSurrogate()) { 1625 1625 surrogatePropertyInheritance.put(DefaultFrameWriter.LETTER_SPACING_STR, false); 1626 Item classic = getClassic();1626 Item primary = getPrimary(); 1627 1627 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LETTER_SPACING_STR)) { 1628 classic.classicPropertyEncryption.put(DefaultFrameWriter.LETTER_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);1628 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LETTER_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave); 1629 1629 } 1630 1630 } … … 1637 1637 public float getLetterSpacing() { 1638 1638 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LETTER_SPACING_STR)) { 1639 return ((Text) this.get Classic()).getLetterSpacing();1639 return ((Text) this.getPrimary()).getLetterSpacing(); 1640 1640 } else { 1641 1641 return _letter_spacing; … … 1648 1648 if (isSurrogate()) { 1649 1649 surrogatePropertyInheritance.put(DefaultFrameWriter.INITIAL_SPACING_STR, false); 1650 Item classic = getClassic();1650 Item primary = getPrimary(); 1651 1651 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.INITIAL_SPACING_STR)) { 1652 classic.classicPropertyEncryption.put(DefaultFrameWriter.INITIAL_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);1652 primary.primaryPropertyEncryption.put(DefaultFrameWriter.INITIAL_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave); 1653 1653 } 1654 1654 } … … 1657 1657 public float getInitialSpacing() { 1658 1658 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.INITIAL_SPACING_STR)) { 1659 return ((Text) this.get Classic()).getInitialSpacing();1659 return ((Text) this.getPrimary()).getInitialSpacing(); 1660 1660 } else { 1661 1661 return _initial_spacing; … … 2864 2864 if (isSurrogate()) { 2865 2865 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_LEFT_STR, false); 2866 Item classic = getClassic();2866 Item primary = getPrimary(); 2867 2867 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_LEFT_STR)) { 2868 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);2868 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave); 2869 2869 } 2870 2870 } … … 2898 2898 if (isSurrogate()) { 2899 2899 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, false); 2900 Item classic = getClassic();2900 Item primary = getPrimary(); 2901 2901 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_RIGHT_STR)) { 2902 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);2902 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave); 2903 2903 } 2904 2904 } … … 2939 2939 if (isSurrogate()) { 2940 2940 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_TOP_STR, false); 2941 Item classic = getClassic();2941 Item primary = getPrimary(); 2942 2942 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_TOP_STR)) { 2943 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);2943 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave); 2944 2944 } 2945 2945 } … … 2985 2985 if (isSurrogate()) { 2986 2986 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, false); 2987 Item classic = getClassic();2987 Item primary = getPrimary(); 2988 2988 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) { 2989 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);2989 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave); 2990 2990 } 2991 2991 } … … 3146 3146 public boolean getAutoWrap() { 3147 3147 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR)) { 3148 return ((Text) this.get Classic()).getAutoWrap();3148 return ((Text) this.getPrimary()).getAutoWrap(); 3149 3149 } else { 3150 3150 return _autoWrap; … … 3166 3166 if (isSurrogate()) { 3167 3167 surrogatePropertyInheritance.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR, false); 3168 Item classic = getClassic();3168 Item primary = getPrimary(); 3169 3169 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR)) { 3170 classic.classicPropertyEncryption.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave);3170 primary.primaryPropertyEncryption.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave); 3171 3171 } 3172 3172 } … … 3294 3294 public Integer getMask() { 3295 3295 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MASK_STR)) { 3296 return ((Text) this.get Classic()).getMask();3296 return ((Text) this.getPrimary()).getMask(); 3297 3297 } else { 3298 3298 return _mask; … … 3305 3305 if (isSurrogate()) { 3306 3306 surrogatePropertyInheritance.put(DefaultFrameWriter.MASK_STR, false); 3307 Item classic = getClassic();3307 Item primary = getPrimary(); 3308 3308 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MASK_STR)) { 3309 classic.classicPropertyEncryption.put(DefaultFrameWriter.MASK_STR, EncryptionDetail.InheritanceCheckOnSave);3309 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MASK_STR, EncryptionDetail.InheritanceCheckOnSave); 3310 3310 } 3311 3311 } … … 3314 3314 public String getPlaceholder() { 3315 3315 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.PLACEHOLDER_STR)) { 3316 return ((Text) this.get Classic()).getPlaceholder();3316 return ((Text) this.getPrimary()).getPlaceholder(); 3317 3317 } else { 3318 3318 if (_placeholder == null || _placeholder.length() == 0) { … … 3328 3328 if (isSurrogate()) { 3329 3329 surrogatePropertyInheritance.put(DefaultFrameWriter.PLACEHOLDER_STR, false); 3330 Item classic = getClassic();3330 Item primary = getPrimary(); 3331 3331 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.PLACEHOLDER_STR)) { 3332 classic.classicPropertyEncryption.put(DefaultFrameWriter.PLACEHOLDER_STR, EncryptionDetail.InheritanceCheckOnSave);3332 primary.primaryPropertyEncryption.put(DefaultFrameWriter.PLACEHOLDER_STR, EncryptionDetail.InheritanceCheckOnSave); 3333 3333 } 3334 3334 } … … 3347 3347 public boolean isSingleLineOnly() { 3348 3348 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.SINGLE_LINE_ONLY_STR)) { 3349 return ((Text) this.get Classic()).isSingleLineOnly();3349 return ((Text) this.getPrimary()).isSingleLineOnly(); 3350 3350 } else { 3351 3351 return _singleLine; … … 3358 3358 if (isSurrogate()) { 3359 3359 surrogatePropertyInheritance.put(DefaultFrameWriter.SINGLE_LINE_ONLY_STR, false); 3360 Item classic = getClassic();3360 Item primary = getPrimary(); 3361 3361 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.SINGLE_LINE_ONLY_STR)) { 3362 classic.classicPropertyEncryption.put(DefaultFrameWriter.SINGLE_LINE_ONLY_STR, EncryptionDetail.InheritanceCheckOnSave);3362 primary.primaryPropertyEncryption.put(DefaultFrameWriter.SINGLE_LINE_ONLY_STR, EncryptionDetail.InheritanceCheckOnSave); 3363 3363 } 3364 3364 } … … 3367 3367 public int getTabIndex() { 3368 3368 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TAB_INDEX_STR)) { 3369 return ((Text) this.get Classic()).getTabIndex();3369 return ((Text) this.getPrimary()).getTabIndex(); 3370 3370 } else { 3371 3371 return this._tabIndex; … … 3378 3378 if (isSurrogate()) { 3379 3379 surrogatePropertyInheritance.put(DefaultFrameWriter.TAB_INDEX_STR, false); 3380 Item classic = getClassic();3380 Item primary = getPrimary(); 3381 3381 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TAB_INDEX_STR)) { 3382 classic.classicPropertyEncryption.put(DefaultFrameWriter.TAB_INDEX_STR, EncryptionDetail.InheritanceCheckOnSave);3382 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TAB_INDEX_STR, EncryptionDetail.InheritanceCheckOnSave); 3383 3383 } 3384 3384 }
Note:
See TracChangeset
for help on using the changeset viewer.