Changeset 1414 for trunk


Ignore:
Timestamp:
06/26/19 16:02:00 (5 years ago)
Author:
bln4
Message:

More amendments to the way surrogates are handled. Including renaming classic to primary.

Location:
trunk/src/org/expeditee
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/encryption/Actions.java

    r1408 r1414  
    3131public class Actions implements CryptographyConstants {
    3232       
    33         public static void TestSurrogate(Item classic) {
     33        public static void TestSurrogate(Item primary) {
    3434                System.out.println("Test surrogates: ");
    3535        }
  • trunk/src/org/expeditee/encryption/io/EncryptedExpReader.java

    r1413 r1414  
    1414import java.util.Base64;
    1515import java.util.List;
     16import java.util.function.BiConsumer;
    1617import java.util.function.Predicate;
    1718
     
    3031import org.expeditee.gui.FrameIO;
    3132import org.expeditee.io.Conversion;
     33import org.expeditee.io.DefaultFrameWriter;
    3234import org.expeditee.io.ExpReader;
    3335import org.expeditee.items.Item;
     
    122124        }
    123125       
    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       
    125163        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 {
    126181                String next = null;
    127182                Item currentItem = null;
    128183               
    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);
    130185                while (_reader.ready() && !endOfSection.test(next = _reader.readLine())) {
    131186                        if (!isValidLine(next)) {
     
    134189                       
    135190                        String tag = getTagEnc(next);
    136                         if (next.startsWith("S ")) {
     191                        if (next.startsWith(DefaultFrameWriter.TYPE_AND_ID_STR + " ")) {
    137192                                currentItem = newItem(next);
    138193                                _linePoints.put(currentItem.getID(), currentItem);
    139                                 newFrame.addItem(currentItem);
     194                                if (!isSurrogate) {
     195                                        storeResult.accept(currentItem, next);
     196                                }
    140197                                currentItem.setEncryptionDetailForTag(tag + "", EncryptionDetail.UnencryptedOnSave);
    141198                        } 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                                }
    144202                        } else if (currentItem != null && actionShouldBeDelayed(tag.charAt(0))) {
    145203                                delayedActions.add(new DelayedAction(currentItem, next));
     
    151209                }
    152210               
    153                 if (next.equals(EncryptedExpWriter.SURROGATE_TERMINATOR)) {
    154                         next = readTheItems(newFrame, delayedActions);
    155                 }
    156                
    157211                return next;
    158212        }
     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//      }
    159241       
    160242        @Override
  • trunk/src/org/expeditee/encryption/io/EncryptedExpWriter.java

    r1413 r1414  
    4444        private static final String labelProfile = "Profile";
    4545        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 + "...";
    4748
    4849        public EncryptedExpWriter(String encryptionLabel) {
     
    132133               
    133134                if (toWrite.isSurrogate()) {
    134                         writeLine("SurrogateFor " + toWrite.getClassic().getID());
     135                        writeLine("SurrogateFor " + toWrite.getPrimary().getID());
    135136                }
    136137               
     
    177178                }
    178179               
     180                // write out the surrogates
    179181                List<Item> surrogates = frame.getSurrogateItemsToSave();
    180182                if (!surrogates.isEmpty()) {
     
    242244       
    243245        private void writeSurrogateTerminator() throws IOException {
    244                 writeLine(SURROGATE_TERMINATOR + nl);
     246                writeLine(TERMINATOR_WITH_CONTINUATION + nl);
    245247        }
    246248       
  • trunk/src/org/expeditee/gui/Frame.java

    r1413 r1414  
    141141        private List<Item> _body = new ArrayList<Item>();
    142142        private List<Item> _bodyHiddenDueToPermissions = new ArrayList<Item>();
     143        private List<Item> _surrogates = new ArrayList<Item>();
    143144
    144145        // for drawing purposes
     
    981982                change();
    982983        }
     984       
     985        public void addToSurrogates(Item surrogate) {
     986                this._surrogates.add(surrogate);
     987        }
    983988
    984989        public void refreshSize()
  • trunk/src/org/expeditee/io/DefaultFrameReader.java

    r1413 r1414  
    181181                        _DelayedItemTags.add('/');
    182182                       
    183                         _ItemTagsExt.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, Item.class.getMethod("setEncryptionLabelOnLoad", pString));
     183                        _ItemTagsExt.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, Item.class.getMethod("setEncryptionLabel", pString));
    184184                       
    185185                        _ItemTagsExt.put(DefaultFrameWriter.PLACEHOLDER_STR, Text.class.getMethod("setPlaceholder", pString));
  • trunk/src/org/expeditee/items/Item.java

    r1413 r1414  
    320320        private Item surrogateFor = null;
    321321        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>();
    323323        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);
    325325        protected Map<String, Boolean> surrogatePropertyInheritance = new HashMap<String, Boolean>(surrogatePropertyInheritanceDefault);
    326326       
     
    332332                                surrogatePropertyInheritanceDefault.put(tag + "", true);
    333333                        }
    334                         classicPropertyEncryptionDefault.put(tag + "", EncryptionDetail.UnencryptedOnSave);
     334                        primaryPropertyEncryptionDefault.put(tag + "", EncryptionDetail.UnencryptedOnSave);
    335335                }
    336336               
    337337                for(String tag: DefaultFrameWriter.getItemTagsExt().keySet()) {
    338338                        surrogatePropertyInheritanceDefault.put(tag, true);
    339                         classicPropertyEncryptionDefault.put(tag, EncryptionDetail.UnencryptedOnSave);
     339                        primaryPropertyEncryptionDefault.put(tag, EncryptionDetail.UnencryptedOnSave);
    340340                }
    341341        }
     
    436436                if (isSurrogate()) {
    437437                        surrogatePropertyInheritance.put(DefaultFrameWriter.DOT_TYPE_STR, false);
    438                         Item classic = getClassic();
     438                        Item primary = getPrimary();
    439439                        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);
    441441                        }
    442442                }
     
    445445        public DotType getDotType() {
    446446                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DOT_TYPE_STR)) {
    447                         return this.getClassic().getDotType();
     447                        return this.getPrimary().getDotType();
    448448                } else {
    449449                        return _type;
     
    459459                if (isSurrogate()) {
    460460                        surrogatePropertyInheritance.put(DefaultFrameWriter.FILLED_STR, false);
    461                         Item classic = getClassic();
     461                        Item primary = getPrimary();
    462462                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) {
    463                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, EncryptionDetail.InheritanceCheckOnSave);
     463                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, EncryptionDetail.InheritanceCheckOnSave);
    464464                        }
    465465                }
     
    468468        public boolean getFilled() {
    469469                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILLED_STR)) {
    470                         return this.getClassic().getFilled();
     470                        return this.getPrimary().getFilled();
    471471                } else {
    472472                        return _filled;
     
    492492                if (isSurrogate()) {
    493493                        surrogatePropertyInheritance.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, false);
    494                         Item classic = getClassic();
     494                        Item primary = getPrimary();
    495495                        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);
    497497                        }
    498498                }
     
    506506        public double getGradientAngle() {
    507507                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.GRADIENT_ANGLE_STR)) {
    508                         return this.getClassic().getGradientAngle();
     508                        return this.getPrimary().getGradientAngle();
    509509                } else {
    510510                        return _gradientAngle;
     
    565565                if (isSurrogate()) {
    566566                        surrogatePropertyInheritance.put(DefaultFrameWriter.PERMISSION_STR, false);
    567                         Item classic = getClassic();
     567                        Item primary = getPrimary();
    568568                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) {
    569                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, EncryptionDetail.InheritanceCheckOnSave);
     569                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, EncryptionDetail.InheritanceCheckOnSave);
    570570                        }
    571571                }
     
    574574        public PermissionTriple getPermission() {
    575575                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.PERMISSION_STR)) {
    576                         return this.getClassic().getPermission();
     576                        return this.getPrimary().getPermission();
    577577                } else {
    578578                        return _permissionTriple;
     
    724724        public List<String> getAction() {
    725725                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_STR)) {
    726                         return this.getClassic().getAction();
     726                        return this.getPrimary().getAction();
    727727                } else {
    728728                        return _actions;
     
    732732        public List<String> getData() {
    733733                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DATA_STR)) {
    734                         return this.getClassic().getData();
     734                        return this.getPrimary().getData();
    735735                } else {
    736736                        return  _data.getData();
     
    740740        public List<String> getActionCursorEnter() {
    741741                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR)) {
    742                         return this.getClassic().getActionCursorEnter();
     742                        return this.getPrimary().getActionCursorEnter();
    743743                } else {
    744744                        return  _actionCursorEnter;
     
    748748        public List<String> getActionCursorLeave() {
    749749                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR)) {
    750                         return this.getClassic().getActionCursorLeave();
     750                        return this.getPrimary().getActionCursorLeave();
    751751                } else {
    752752                        return  _actionCursorLeave;
     
    756756        public List<String> getActionEnterFrame() {
    757757                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_ENTER_FRAME_STR)) {
    758                         return this.getClassic().getActionEnterFrame();
     758                        return this.getPrimary().getActionEnterFrame();
    759759                } else {
    760760                        return  _actionEnterFrame;
     
    764764        public List<String> getActionLeaveFrame() {
    765765                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR)) {
    766                         return this.getClassic().getActionLeaveFrame();
     766                        return this.getPrimary().getActionLeaveFrame();
    767767                } else {
    768768                        return  _actionLeaveFrame;
     
    772772        public boolean getActionMark() {
    773773                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_MARK_STR)) {
    774                         return this.getClassic().getActionMark();
     774                        return this.getPrimary().getActionMark();
    775775                } else {
    776776                        return  _actionMark;
     
    797797        public String getArrow() {
    798798                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ARROW_STR)) {
    799                         return this.getClassic().getArrow();
     799                        return this.getPrimary().getArrow();
    800800                } else {
    801801                        if (!hasVisibleArrow())
     
    832832        public Colour getBackgroundColor() {
    833833                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.BACKGROUND_COLOR_STR)) {
    834                         return this.getClassic().getBackgroundColor();
     834                        return this.getPrimary().getBackgroundColor();
    835835                } else {
    836836                        return  _backgroundColour;
     
    840840        public Colour getBorderColor() {
    841841                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.BORDER_COLOR_STR)) {
    842                         return this.getClassic().getBorderColor();
     842                        return this.getPrimary().getBorderColor();
    843843                } else {
    844844                        return  _colorBorder;
     
    917917        public Colour getColor() {
    918918                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.COLOR_STR)) {
    919                         return this.getClassic().getColor();
     919                        return this.getPrimary().getColor();
    920920                } else {
    921921                        return  _foregroundColour;
     
    934934        public String getConstraintIDs() {
    935935                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.CONSTRAINT_IDS_STR)) {
    936                         return this.getClassic().getConstraintIDs();
     936                        return this.getPrimary().getConstraintIDs();
    937937                } else {
    938938                        if (_constraints == null || _constraints.size() == 0)
     
    971971        public String getDateCreated() {
    972972                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DATE_CREATED_STR)) {
    973                         return this.getClassic().getDateCreated();
     973                        return this.getPrimary().getDateCreated();
    974974                } else {
    975975                        return  _creationDate;
     
    979979        public Colour getFillColor() {
    980980                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILL_COLOR_STR)) {
    981                         return this.getClassic().getFillColor();
     981                        return this.getPrimary().getFillColor();
    982982                } else {
    983983                        return  _fillColour;
     
    987987        public String getFillPattern() {
    988988                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILL_PATTERN_STR)) {
    989                         return this.getClassic().getFillPattern();
     989                        return this.getPrimary().getFillPattern();
    990990                } else {
    991991                        return  _fillPattern;
     
    10081008        public boolean getHighlight() {
    10091009                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.HIGHLIGHT_STR)) {
    1010                         return this.getClassic().getHighlight();
     1010                        return this.getPrimary().getHighlight();
    10111011                } else {
    10121012                        return  _highlight;
     
    10401040        public String getLineIDs() {
    10411041                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINE_IDS_STR)) {
    1042                         return this.getClassic().getLineIDs();
     1042                        return this.getPrimary().getLineIDs();
    10431043                } else {
    10441044                        String lineID = null;
     
    10571057        public int[] getLinePattern() {
    10581058                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINE_PATTERN_STR)) {
    1059                         return this.getClassic().getLinePattern();
     1059                        return this.getPrimary().getLinePattern();
    10601060                } else {
    10611061                        return  _linePattern;
     
    10831083        public String getLink() {
    10841084                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_STR)) {
    1085                         return this.getClassic().getLink();
     1085                        return this.getPrimary().getLink();
    10861086                } else {
    10871087                        return  _link;
     
    10911091        public String getFormula() {
    10921092                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FORMULA_STR)) {
    1093                         return this.getClassic().getFormula();
     1093                        return this.getPrimary().getFormula();
    10941094                } else {
    10951095                        return  _formula;
     
    11121112                if (isSurrogate()) {
    11131113                        surrogatePropertyInheritance.put(DefaultFrameWriter.FORMULA_STR, false);
    1114                         Item classic = getClassic();
     1114                        Item primary = getPrimary();
    11151115                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FORMULA_STR)) {
    1116                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, EncryptionDetail.InheritanceCheckOnSave);
     1116                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, EncryptionDetail.InheritanceCheckOnSave);
    11171117                        }
    11181118                }
     
    11271127        public String getLinkFrameset() {
    11281128                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_FRAMESET_STR)) {
    1129                         return this.getClassic().getLinkFrameset();
     1129                        return this.getPrimary().getLinkFrameset();
    11301130                } else {
    11311131                        return  _link_frameset;
     
    11351135        public boolean getLinkMark() {
    11361136                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_MARK_STR)) {
    1137                         return this.getClassic().getLinkMark();
     1137                        return this.getPrimary().getLinkMark();
    11381138                } else {
    11391139                        return  _linkMark;
     
    11431143        public String getLinkTemplate() {
    11441144                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_TEMPLATE_STR)) {
    1145                         return this.getClassic().getLinkTemplate();
     1145                        return this.getPrimary().getLinkTemplate();
    11461146                } else {
    11471147                        return  _link_template;
     
    11561156        public String getOwner() {
    11571157                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.OWNER_STR)) {
    1158                         return this.getClassic().getOwner();
     1158                        return this.getPrimary().getOwner();
    11591159                } else {
    11601160                        return  _owner;
     
    12761276        public final Point getPosition() {
    12771277                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) {
    1278                         return this.getClassic().getPosition();
     1278                        return this.getPrimary().getPosition();
    12791279                } else {
    12801280                        return new Point(getX(), getY());
     
    13061306        public String getTypeAndID() {
    13071307                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TYPE_AND_ID_STR)) {
    1308                         return this.getClassic().getTypeAndID();
     1308                        return this.getPrimary().getTypeAndID();
    13091309                } else {
    13101310                        return "T " + getID();
     
    13141314        public Integer getWidthToSave() {
    13151315                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.WIDTH_TO_SAVE_STR)) {
    1316                         return this.getClassic().getWidthToSave();
     1316                        return this.getPrimary().getWidthToSave();
    13171317                } else {
    13181318                        return getWidth();
     
    13221322        public Integer getMinWidthToSave() {
    13231323                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR)) {
    1324                         return this.getClassic().getMinWidthToSave();
     1324                        return this.getPrimary().getMinWidthToSave();
    13251325                } else {
    13261326                        return getMinWidth();
     
    13491349        public int getX() {
    13501350                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) {
    1351                         return this.getClassic().getX();
     1351                        return this.getPrimary().getX();
    13521352                } else {
    13531353                        return Math.round(_x);
     
    13621362        public int getY() {
    13631363                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) {
    1364                         return this.getClassic().getY();
     1364                        return this.getPrimary().getY();
    13651365                } else {
    13661366                        return Math.round(_y);
     
    15211521                if (isSurrogate()) {
    15221522                        surrogatePropertyInheritance.put(DefaultFrameWriter.TOOLTIP_STR, false);
    1523                         Item classic = getClassic();
     1523                        Item primary = getPrimary();
    15241524                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TOOLTIP_STR)) {
    1525                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, EncryptionDetail.InheritanceCheckOnSave);
     1525                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, EncryptionDetail.InheritanceCheckOnSave);
    15261526                        }
    15271527                }
     
    15301530        public List<String> getTooltip() {
    15311531                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TOOLTIP_STR)) {
    1532                         return this.getClassic().getTooltip();
     1532                        return this.getPrimary().getTooltip();
    15331533                } else {
    15341534                        return _tooltip.asStringList();
     
    18251825                if (isSurrogate()) {
    18261826                        surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_STR, false);
    1827                         Item classic = getClassic();
     1827                        Item primary = getPrimary();
    18281828                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_STR)) {
    1829                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, EncryptionDetail.InheritanceCheckOnSave);
     1829                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, EncryptionDetail.InheritanceCheckOnSave);
    18301830                        }
    18311831                }
     
    18451845                if (isSurrogate()) {
    18461846                        surrogatePropertyInheritance.put(DefaultFrameWriter.DATA_STR, false);
    1847                         Item classic = getClassic();
     1847                        Item primary = getPrimary();
    18481848                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DATA_STR)) {
    1849                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.DATA_STR, EncryptionDetail.InheritanceCheckOnSave);
     1849                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATA_STR, EncryptionDetail.InheritanceCheckOnSave);
    18501850                        }
    18511851                }
     
    18611861                if (isSurrogate()) {
    18621862                        surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, false);
    1863                         Item classic = getClassic();
     1863                        Item primary = getPrimary();
    18641864                        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);
    18661866                        }
    18671867                }
     
    18731873                if (isSurrogate()) {
    18741874                        surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, false);
    1875                         Item classic = getClassic();
     1875                        Item primary = getPrimary();
    18761876                        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);
    18781878                        }
    18791879                }
     
    18851885                if (isSurrogate()) {
    18861886                        surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, false);
    1887                         Item classic = getClassic();
     1887                        Item primary = getPrimary();
    18881888                        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);
    18901890                        }
    18911891                }
     
    18971897                if (isSurrogate()) {
    18981898                        surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, false);
    1899                         Item classic = getClassic();
     1899                        Item primary = getPrimary();
    19001900                        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);
    19021902                        }
    19031903                }
     
    19121912                if (isSurrogate()) {
    19131913                        surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_MARK_STR, false);
    1914                         Item classic = getClassic();
     1914                        Item primary = getPrimary();
    19151915                        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);
    19171917                        }
    19181918                }
     
    19451945                if (isSurrogate()) {
    19461946                        surrogatePropertyInheritance.put(DefaultFrameWriter.ARROW_STR, false);
    1947                         Item classic = getClassic();
     1947                        Item primary = getPrimary();
    19481948                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ARROW_STR)) {
    1949                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, EncryptionDetail.InheritanceCheckOnSave);
     1949                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, EncryptionDetail.InheritanceCheckOnSave);
    19501950                        }
    19511951                }
     
    19831983                if (isSurrogate()) {
    19841984                        surrogatePropertyInheritance.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, false);
    1985                         Item classic = getClassic();
     1985                        Item primary = getPrimary();
    19861986                        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);
    19881988                        }
    19891989                }
     
    19981998                if (isSurrogate()) {
    19991999                        surrogatePropertyInheritance.put(DefaultFrameWriter.BORDER_COLOR_STR, false);
    2000                         Item classic = getClassic();
     2000                        Item primary = getPrimary();
    20012001                        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);
    20032003                        }
    20042004                }
     
    20372037                if (isSurrogate()) {
    20382038                        surrogatePropertyInheritance.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, false);
    2039                         Item classic = getClassic();
     2039                        Item primary = getPrimary();
    20402040                        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);
    20422042                        }
    20432043                }
     
    20662066                if (isSurrogate()) {
    20672067                        surrogatePropertyInheritance.put(DefaultFrameWriter.DATE_CREATED_STR, false);
    2068                         Item classic = getClassic();
     2068                        Item primary = getPrimary();
    20692069                        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);
    20712071                        }
    20722072                }
     
    20892089                if (isSurrogate()) {
    20902090                        surrogatePropertyInheritance.put(DefaultFrameWriter.FILL_COLOR_STR, false);
    2091                         Item classic = getClassic();
     2091                        Item primary = getPrimary();
    20922092                        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);
    20942094                        }
    20952095                }
     
    21102110                if (isSurrogate()) {
    21112111                        surrogatePropertyInheritance.put(DefaultFrameWriter.GRADIENT_COLOR_STR, false);
    2112                         Item classic = getClassic();
     2112                        Item primary = getPrimary();
    21132113                        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);
    21152115                        }
    21162116                }
     
    21192119        public Colour getGradientColor() {
    21202120                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.GRADIENT_COLOR_STR)) {
    2121                         return this.getClassic().getGradientColor();
     2121                        return this.getPrimary().getGradientColor();
    21222122                } else {
    21232123                        return _gradientColour;
     
    21322132                if (isSurrogate()) {
    21332133                        surrogatePropertyInheritance.put(DefaultFrameWriter.FILL_PATTERN_STR, false);
    2134                         Item classic = getClassic();
     2134                        Item primary = getPrimary();
    21352135                        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);
    21372137                        }
    21382138                }
     
    21542154                if (isSurrogate()) {
    21552155                        surrogatePropertyInheritance.put(DefaultFrameWriter.HIGHLIGHT_STR, false);
    2156                         Item classic = getClassic();
     2156                        Item primary = getPrimary();
    21572157                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.HIGHLIGHT_STR)) {
    2158                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);
     2158                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);
    21592159                        }
    21602160                }
     
    21732173                if (isSurrogate()) {
    21742174                        surrogatePropertyInheritance.put(DefaultFrameWriter.TYPE_AND_ID_STR, false);
    2175                         Item classic = getClassic();
     2175                        Item primary = getPrimary();
    21762176                        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);
    21782178                        }
    21792179                }
     
    21892189                if (isSurrogate()) {
    21902190                        surrogatePropertyInheritance.put(DefaultFrameWriter.LINE_IDS_STR, false);
    2191                         Item classic = getClassic();
     2191                        Item primary = getPrimary();
    21922192                        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);
    21942194                        }
    21952195                }
     
    22042204                if (isSurrogate()) {
    22052205                        surrogatePropertyInheritance.put(DefaultFrameWriter.LINE_PATTERN_STR, false);
    2206                         Item classic = getClassic();
     2206                        Item primary = getPrimary();
    22072207                        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);
    22092209                        }
    22102210                }
     
    22442244                if (isSurrogate()) {
    22452245                        surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_STR, false);
    2246                         Item classic = getClassic();
     2246                        Item primary = getPrimary();
    22472247                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_STR)) {
    2248                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_STR, EncryptionDetail.InheritanceCheckOnSave);
     2248                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_STR, EncryptionDetail.InheritanceCheckOnSave);
    22492249                        }
    22502250                }
     
    22562256                if (isSurrogate()) {
    22572257                        surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_HISTORY_STR, false);
    2258                         Item classic = getClassic();
     2258                        Item primary = getPrimary();
    22592259                        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);
    22612261                        }
    22622262                }
     
    22652265        public boolean getLinkHistory() {
    22662266                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_HISTORY_STR)) {
    2267                         return this.getClassic().getLinkHistory();
     2267                        return this.getPrimary().getLinkHistory();
    22682268                } else {
    22692269                        return _linkHistory;
     
    22822282                if (isSurrogate()) {
    22832283                        surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_FRAMESET_STR, false);
    2284                         Item classic = getClassic();
     2284                        Item primary = getPrimary();
    22852285                        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);
    22872287                        }
    22882288                }
     
    22972297                if (isSurrogate()) {
    22982298                        surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_MARK_STR, false);
    2299                         Item classic = getClassic();
     2299                        Item primary = getPrimary();
    23002300                        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);
    23022302                        }
    23032303                }
     
    23142314                if (isSurrogate()) {
    23152315                        surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_TEMPLATE_STR, false);
    2316                         Item classic = getClassic();
     2316                        Item primary = getPrimary();
    23172317                        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);
    23192319                        }
    23202320                }
     
    23482348                if (isSurrogate()) {
    23492349                        surrogatePropertyInheritance.put(DefaultFrameWriter.OWNER_STR, false);
    2350                         Item classic = getClassic();
     2350                        Item primary = getPrimary();
    23512351                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.OWNER_STR)) {
    2352                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, EncryptionDetail.InheritanceCheckOnSave);
     2352                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, EncryptionDetail.InheritanceCheckOnSave);
    23532353                        }
    23542354                }
     
    25392539                if (isSurrogate()) {
    25402540                        surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false);
    2541                         Item classic = getClassic();
     2541                        Item primary = getPrimary();
    25422542                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) {
    2543                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
     2543                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
    25442544                        }
    25452545                }
     
    25832583                if (isSurrogate()) {
    25842584                        surrogatePropertyInheritance.put(DefaultFrameWriter.THICKNESS_STR, false);
    2585                         Item classic = getClassic();
     2585                        Item primary = getPrimary();
    25862586                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.THICKNESS_STR)) {
    2587                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, EncryptionDetail.InheritanceCheckOnSave);
     2587                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, EncryptionDetail.InheritanceCheckOnSave);
    25882588                        }
    25892589                }
     
    26412641        public float getThickness()     {
    26422642                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.THICKNESS_STR)) {
    2643                         return this.getClassic().getThickness();
     2643                        return this.getPrimary().getThickness();
    26442644                } else {
    26452645                        return _thickness;
     
    26952695                if (isSurrogate()) {
    26962696                        surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false);
    2697                         Item classic = getClassic();
     2697                        Item primary = getPrimary();
    26982698                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) {
    2699                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
     2699                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
    27002700                        }
    27012701                }
     
    27132713                if (isSurrogate()) {
    27142714                        surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false);
    2715                         Item classic = getClassic();
     2715                        Item primary = getPrimary();
    27162716                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) {
    2717                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
     2717                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);
    27182718                        }
    27192719                }
     
    35253525                if (isSurrogate()) {
    35263526                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_LEFT_STR, false);
    3527                         Item classic = getClassic();
     3527                        Item primary = getPrimary();
    35283528                        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);
    35303530                        }
    35313531                }
     
    35413541                if (isSurrogate()) {
    35423542                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, false);
    3543                         Item classic = getClassic();
     3543                        Item primary = getPrimary();
    35443544                        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);
    35463546                        }
    35473547                }
     
    35573557                if (isSurrogate()) {
    35583558                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_TOP_STR, false);
    3559                         Item classic = getClassic();
     3559                        Item primary = getPrimary();
    35603560                        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);
    35623562                        }
    35633563                }
     
    35743574                if (isSurrogate()) {
    35753575                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, false);
    3576                         Item classic = getClassic();
     3576                        Item primary = getPrimary();
    35773577                        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);
    35793579                        }
    35803580                }
     
    35963596        public Integer getAnchorLeft() {
    35973597                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_LEFT_STR)) {
    3598                         return this.getClassic().getAnchorLeft();
     3598                        return this.getPrimary().getAnchorLeft();
    35993599                } else {
    36003600                        return _anchoring.getLeftAnchor();
     
    36043604        public Integer getAnchorRight() {
    36053605                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_RIGHT_STR)) {
    3606                         return this.getClassic().getAnchorRight();
     3606                        return this.getPrimary().getAnchorRight();
    36073607                } else {
    36083608                        return _anchoring.getRightAnchor();
     
    36123612        public Integer getAnchorTop() {
    36133613                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_TOP_STR)) {
    3614                         return this.getClassic().getAnchorTop();
     3614                        return this.getPrimary().getAnchorTop();
    36153615                } else {
    36163616                        return _anchoring.getTopAnchor();
     
    36203620        public Integer getAnchorBottom() {
    36213621                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) {
    3622                         return this.getClassic().getAnchorBottom();
     3622                        return this.getPrimary().getAnchorBottom();
    36233623                } else {
    36243624                        return _anchoring.getBottomAnchor();
     
    36283628        public String getText() {
    36293629                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TEXT_STR)) {
    3630                         return this.getClassic().getText();
     3630                        return this.getPrimary().getText();
    36313631                } else {
    36323632                        return "@" + getClass().getSimpleName() + ":" + getID();
     
    38683868        public int getMagnetizedItemLeft() {
    38693869                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR)) {
    3870                         return this.getClassic().getMagnetizedItemLeft();
     3870                        return this.getPrimary().getMagnetizedItemLeft();
    38713871                } else {
    38723872                        if(_magnetizedItemLeft != null) return _magnetizedItemLeft.getID();
     
    38843884                if (isSurrogate()) {
    38853885                        surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, false);
    3886                         Item classic = getClassic();
     3886                        Item primary = getPrimary();
    38873887                        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);
    38893889                        }
    38903890                }
     
    38933893        public int getMagnetizedItemRight() {
    38943894                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR)) {
    3895                         return this.getClassic().getMagnetizedItemRight();
     3895                        return this.getPrimary().getMagnetizedItemRight();
    38963896                } else {
    38973897                        if(_magnetizedItemRight != null) return _magnetizedItemRight.getID();
     
    39093909                if (isSurrogate()) {
    39103910                        surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, false);
    3911                         Item classic = getClassic();
     3911                        Item primary = getPrimary();
    39123912                        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);
    39143914                        }
    39153915                }
     
    39183918        public int getMagnetizedItemTop() {
    39193919                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR)) {
    3920                         return this.getClassic().getMagnetizedItemTop();
     3920                        return this.getPrimary().getMagnetizedItemTop();
    39213921                } else {
    39223922                        if(_magnetizedItemTop != null) return _magnetizedItemTop.getID();
     
    39343934                if (isSurrogate()) {
    39353935                        surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, false);
    3936                         Item classic = getClassic();
     3936                        Item primary = getPrimary();
    39373937                        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);
    39393939                        }
    39403940                }
     
    39433943        public int getMagnetizedItemBottom() {
    39443944                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR)) {
    3945                         return this.getClassic().getMagnetizedItemBottom();
     3945                        return this.getPrimary().getMagnetizedItemBottom();
    39463946                } else {
    39473947                        if(_magnetizedItemBottom != null) return _magnetizedItemBottom.getID();
     
    39593959                if (isSurrogate()) {
    39603960                        surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, false);
    3961                         Item classic = getClassic();
     3961                        Item primary = getPrimary();
    39623962                        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);
    39643964                        }
    39653965                }
     
    39683968        public String getEncryptionLabel() {
    39693969                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ENCRYPTION_LABEL_STR)) {
    3970                         return this.getClassic().getEncryptionLabel();
     3970                        return this.getPrimary().getEncryptionLabel();
    39713971                } else {
    39723972                        return _encryptionLabel;
     
    39763976        public void setEncryptionLabel(String label) {
    39773977                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);
    40413982        }
    40423983
     
    40964037        }
    40974038               
    4098         private void setAsSurrogateFor(Item classic) {
    4099                 this.surrogateFor = classic;
     4039        private void setAsSurrogateFor(Item primary) {
     4040                this.surrogateFor = primary;
    41004041        }
    41014042
     
    41034044                this.surrogateItems.add(surrogate);
    41044045                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                }
    41054065        }
    41064066       
     
    41094069        }
    41104070       
    4111         public Item getClassic() {
     4071        public Item getPrimary() {
    41124072                return this.surrogateFor;
    41134073        }
    41144074       
    41154075        public EncryptionDetail getEncryptionDetailForTag(String tag) {
    4116                 EncryptionDetail encryptionDetail = classicPropertyEncryption.get(tag);
     4076                EncryptionDetail encryptionDetail = primaryPropertyEncryption.get(tag);
    41174077               
    41184078                if (encryptionDetail == null) {
     
    41244084       
    41254085        public void setEncryptionDetailForTag(String tag, EncryptionDetail encryptionDetail) {
    4126                 classicPropertyEncryption.put(tag, encryptionDetail);
     4086                primaryPropertyEncryption.put(tag, encryptionDetail);
    41274087        }
    41284088       
     
    41334093
    41344094        /**
    4135          * If when setting a property, we find that the classic has a undeciphered value, when we must containue using that undeciphered value
     4095         * If when setting a property, we find that the primary has a undeciphered value, when we must containue using that undeciphered value
    41364096         * when eventually saving.
    41374097         * @return
    41384098         */
    41394099        protected boolean subjectToInheritanceCheckOnSave(String tag) {
    4140                 if (getClassic() == null) return false;
    4141                 return getClassic().classicPropertyEncryption.get(tag) != EncryptionDetail.UseUndecipheredValueOnSave;
     4100                if (getPrimary() == null) return false;
     4101                return getPrimary().primaryPropertyEncryption.get(tag) != EncryptionDetail.UseUndecipheredValueOnSave;
    41424102        }
    41434103}
  • trunk/src/org/expeditee/items/Text.java

    r1413 r1414  
    407407                if (isSurrogate()) {
    408408                        surrogatePropertyInheritance.put(DefaultFrameWriter.WIDTH_TO_SAVE_STR, false);
    409                         Item classic = getClassic();
     409                        Item primary = getPrimary();
    410410                        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);
    412412                        }
    413413                }
     
    430430                if (isSurrogate()) {
    431431                        surrogatePropertyInheritance.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR, false);
    432                         Item classic = getClassic();
     432                        Item primary = getPrimary();
    433433                        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);
    435435                        }
    436436                }
     
    451451        public Integer getWidth() {
    452452                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.WIDTH_TO_SAVE_STR)) {
    453                         return this.getClassic().getWidth();
     453                        return this.getPrimary().getWidth();
    454454                } else {
    455455                        return _width;
     
    467467        public Integer getMinWidth() {
    468468                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR)) {
    469                         return this.getClassic().getMinWidth();
     469                        return this.getPrimary().getMinWidth();
    470470                } else {
    471471                        return _minWidth;
     
    483483        public Colour getHighlightColor() {
    484484                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.HIGHLIGHT_STR)) {
    485                         return this.getClassic().getHighlightColor();
     485                        return this.getPrimary().getHighlightColor();
    486486                } else {
    487487                        return _highlightColour;
     
    511511                if (isSurrogate()) {
    512512                        surrogatePropertyInheritance.put(DefaultFrameWriter.JUSTIFICATION_STR, false);
    513                         Item classic = getClassic();
     513                        Item primary = getPrimary();
    514514                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.JUSTIFICATION_STR)) {
    515                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.JUSTIFICATION_STR, EncryptionDetail.InheritanceCheckOnSave);
     515                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.JUSTIFICATION_STR, EncryptionDetail.InheritanceCheckOnSave);
    516516                        }
    517517                }
     
    528528        public Justification getJustification() {
    529529                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.JUSTIFICATION_STR)) {
    530                         return ((Text) this.getClassic()).getJustification();
     530                        return ((Text) this.getPrimary()).getJustification();
    531531                } else {
    532532                        if (_justification == null || _justification.equals(Justification.left)) {
     
    692692                if (isSurrogate()) {
    693693                        surrogatePropertyInheritance.put(DefaultFrameWriter.TEXT_STR, false);
    694                         Item classic = getClassic();
     694                        Item primary = getPrimary();
    695695                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TEXT_STR)) {
    696                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.TEXT_STR, EncryptionDetail.InheritanceCheckOnSave);
     696                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.TEXT_STR, EncryptionDetail.InheritanceCheckOnSave);
    697697                        }
    698698                }
     
    13301330                if (isSurrogate()) {
    13311331                        surrogatePropertyInheritance.put(DefaultFrameWriter.FONT_STR, false);
    1332                         Item classic = getClassic();
     1332                        Item primary = getPrimary();
    13331333                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FONT_STR)) {
    1334                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.FONT_STR, EncryptionDetail.InheritanceCheckOnSave);
     1334                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.FONT_STR, EncryptionDetail.InheritanceCheckOnSave);
    13351335                        }
    13361336                }
     
    13441344        public Font getFont() {
    13451345                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FONT_STR)) {
    1346                         return ((Text) this.getClassic()).getFont();
     1346                        return ((Text) this.getPrimary()).getFont();
    13471347                } else {
    13481348                        return _font;
     
    15081508        public String getText() {
    15091509                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TEXT_STR)) {
    1510                         return this.getClassic().getText();
     1510                        return this.getPrimary().getText();
    15111511                } else {
    15121512                        return _text.toString();
     
    15521552                if (isSurrogate()) {
    15531553                        surrogatePropertyInheritance.put(DefaultFrameWriter.SPACING_STR, false);
    1554                         Item classic = getClassic();
     1554                        Item primary = getPrimary();
    15551555                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.SPACING_STR)) {
    1556                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);
     1556                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);
    15571557                        }
    15581558                }
     
    15661566        public float getSpacing() {
    15671567                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.SPACING_STR)) {
    1568                         return ((Text) this.getClassic()).getSpacing();
     1568                        return ((Text) this.getPrimary()).getSpacing();
    15691569                } else {
    15701570                        return _spacing;
     
    15931593                if (isSurrogate()) {
    15941594                        surrogatePropertyInheritance.put(DefaultFrameWriter.WORD_SPACING_STR, false);
    1595                         Item classic = getClassic();
     1595                        Item primary = getPrimary();
    15961596                        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);
    15981598                        }
    15991599                }
     
    16021602        public int getWordSpacing() {
    16031603                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.WORD_SPACING_STR)) {
    1604                         return ((Text) this.getClassic()).getWordSpacing();
     1604                        return ((Text) this.getPrimary()).getWordSpacing();
    16051605                } else {
    16061606                        return _word_spacing;
     
    16241624                if (isSurrogate()) {
    16251625                        surrogatePropertyInheritance.put(DefaultFrameWriter.LETTER_SPACING_STR, false);
    1626                         Item classic = getClassic();
     1626                        Item primary = getPrimary();
    16271627                        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);
    16291629                        }
    16301630                }
     
    16371637        public float getLetterSpacing() {
    16381638                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LETTER_SPACING_STR)) {
    1639                         return ((Text) this.getClassic()).getLetterSpacing();
     1639                        return ((Text) this.getPrimary()).getLetterSpacing();
    16401640                } else {
    16411641                        return _letter_spacing;
     
    16481648                if (isSurrogate()) {
    16491649                        surrogatePropertyInheritance.put(DefaultFrameWriter.INITIAL_SPACING_STR, false);
    1650                         Item classic = getClassic();
     1650                        Item primary = getPrimary();
    16511651                        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);
    16531653                        }
    16541654                }
     
    16571657        public float getInitialSpacing() {
    16581658                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.INITIAL_SPACING_STR)) {
    1659                         return ((Text) this.getClassic()).getInitialSpacing();
     1659                        return ((Text) this.getPrimary()).getInitialSpacing();
    16601660                } else {
    16611661                        return _initial_spacing;
     
    28642864                if (isSurrogate()) {
    28652865                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_LEFT_STR, false);
    2866                         Item classic = getClassic();
     2866                        Item primary = getPrimary();
    28672867                        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);
    28692869                        }
    28702870                }
     
    28982898                if (isSurrogate()) {
    28992899                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, false);
    2900                         Item classic = getClassic();
     2900                        Item primary = getPrimary();
    29012901                        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);
    29032903                        }
    29042904                }
     
    29392939                if (isSurrogate()) {
    29402940                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_TOP_STR, false);
    2941                         Item classic = getClassic();
     2941                        Item primary = getPrimary();
    29422942                        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);
    29442944                        }
    29452945                }
     
    29852985                if (isSurrogate()) {
    29862986                        surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, false);
    2987                         Item classic = getClassic();
     2987                        Item primary = getPrimary();
    29882988                        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);
    29902990                        }
    29912991                }
     
    31463146        public boolean getAutoWrap() {
    31473147                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR)) {
    3148                         return ((Text) this.getClassic()).getAutoWrap();
     3148                        return ((Text) this.getPrimary()).getAutoWrap();
    31493149                } else {
    31503150                        return _autoWrap;
     
    31663166                if (isSurrogate()) {
    31673167                        surrogatePropertyInheritance.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR, false);
    3168                         Item classic = getClassic();
     3168                        Item primary = getPrimary();
    31693169                        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);
    31713171                        }
    31723172                }
     
    32943294        public Integer getMask() {
    32953295                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MASK_STR)) {
    3296                         return ((Text) this.getClassic()).getMask();
     3296                        return ((Text) this.getPrimary()).getMask();
    32973297                } else {
    32983298                        return _mask;
     
    33053305                if (isSurrogate()) {
    33063306                        surrogatePropertyInheritance.put(DefaultFrameWriter.MASK_STR, false);
    3307                         Item classic = getClassic();
     3307                        Item primary = getPrimary();
    33083308                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MASK_STR)) {
    3309                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.MASK_STR, EncryptionDetail.InheritanceCheckOnSave);
     3309                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.MASK_STR, EncryptionDetail.InheritanceCheckOnSave);
    33103310                        }
    33113311                }
     
    33143314        public String getPlaceholder() {
    33153315                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.PLACEHOLDER_STR)) {
    3316                         return ((Text) this.getClassic()).getPlaceholder();
     3316                        return ((Text) this.getPrimary()).getPlaceholder();
    33173317                } else {
    33183318                        if (_placeholder == null || _placeholder.length() == 0) {
     
    33283328                if (isSurrogate()) {
    33293329                        surrogatePropertyInheritance.put(DefaultFrameWriter.PLACEHOLDER_STR, false);
    3330                         Item classic = getClassic();
     3330                        Item primary = getPrimary();
    33313331                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.PLACEHOLDER_STR)) {
    3332                                 classic.classicPropertyEncryption.put(DefaultFrameWriter.PLACEHOLDER_STR, EncryptionDetail.InheritanceCheckOnSave);
     3332                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.PLACEHOLDER_STR, EncryptionDetail.InheritanceCheckOnSave);
    33333333                        }
    33343334                }
     
    33473347        public boolean isSingleLineOnly() {
    33483348                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.SINGLE_LINE_ONLY_STR)) {
    3349                         return ((Text) this.getClassic()).isSingleLineOnly();
     3349                        return ((Text) this.getPrimary()).isSingleLineOnly();
    33503350                } else {
    33513351                        return _singleLine;
     
    33583358                if (isSurrogate()) {
    33593359                        surrogatePropertyInheritance.put(DefaultFrameWriter.SINGLE_LINE_ONLY_STR, false);
    3360                         Item classic = getClassic();
     3360                        Item primary = getPrimary();
    33613361                        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);
    33633363                        }
    33643364                }
     
    33673367        public int getTabIndex() {
    33683368                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TAB_INDEX_STR)) {
    3369                         return ((Text) this.getClassic()).getTabIndex();
     3369                        return ((Text) this.getPrimary()).getTabIndex();
    33703370                } else {
    33713371                        return this._tabIndex;
     
    33783378                if (isSurrogate()) {
    33793379                        surrogatePropertyInheritance.put(DefaultFrameWriter.TAB_INDEX_STR, false);
    3380                         Item classic = getClassic();
     3380                        Item primary = getPrimary();
    33813381                        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);
    33833383                        }
    33843384                }
Note: See TracChangeset for help on using the changeset viewer.