Ignore:
Timestamp:
06/21/19 15:16:05 (5 years ago)
Author:
bln4
Message:

Fixed bug with surrogate inheritance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/io/DefaultFrameWriter.java

    r1408 r1410  
    4242                FrameWriter {
    4343
     44        public static final String TAB_INDEX = "_ti";
     45        public static final String SINGLE_LINE_ONLY = "_sl";
     46        public static final String PLACEHOLDER = "_ph";
     47        public static final String ENCRYPTION_LABEL = "_el";
     48        public static final char MAGNETIZED_ITEM_BOTTOM = '/';
     49        public static final char MAGNETIZED_ITEM_TOP = '^';
     50        public static final char MAGNETIZED_ITEM_RIGHT = ']';
     51        public static final char MAGNETIZED_ITEM_LEFT = '[';
     52        public static final char PERMISSION = 'p';
     53        public static final char LINK_HISTORY = 'B';
     54        public static final char TOOLTIP = 'A';
     55        public static final char CONSTRAINT_IDS = 'c';
     56        public static final char LINE_IDS = 'l';
     57        public static final char THICKNESS = 'h';
     58        public static final char AUTO_WRAP_TO_SAVE = 'r';
     59        public static final char JUSTIFICATION = 'k';
     60        public static final char MIN_WIDTH_TO_SAVE = 'M';
     61        public static final char WIDTH_TO_SAVE = 'w';
     62        public static final char INITIAL_SPACING = 'm';
     63        public static final char LETTER_SPACING = 'b';
     64        public static final char WORD_SPACING = 'a';
     65        public static final char FORMULA = 'J';
     66        public static final char MASK = 'O';
     67        public static final char SPACING = 't';
     68        public static final char FONT = 'f';
     69        public static final char FILLED = 'z';
     70        public static final char DOT_TYPE = 'v';
     71        public static final char ARROW = 'j';
     72        public static final char LINE_PATTERN = 'g';
     73        public static final char LINK_TEMPLATE = 'y';
     74        public static final char LINK_FRAMESET = 'q';
     75        public static final char LINK_MARK = 'n';
     76        public static final char OWNER = 'o';
     77        public static final char FILL_PATTERN = 'i';
     78        public static final char ANCHOR_BOTTOM = 'I';
     79        public static final char ANCHOR_TOP = 'N';
     80        public static final char ANCHOR_RIGHT = 'H';
     81        public static final char ANCHOR_LEFT = 'R';
     82        public static final char GRADIENT_ANGLE = 'Q';
     83        public static final char GRADIENT_COLOR = 'E';
     84        public static final char FILL_COLOR = 'e';
     85        public static final char HIGHLIGHT = 'u';
     86        public static final char DATA = 'D';
     87        public static final char ACTION_LEAVE_FRAME = 'Y';
     88        public static final char ACTION_ENTER_FRAME = 'W';
     89        public static final char ACTION_CURSOR_LEAVE = 'V';
     90        public static final char ACTION_CURSOR_ENTER = 'U';
     91        public static final char ACTION_MARK = 'x';
     92        public static final char ACTION = 'X';
     93        public static final char LINK = 'F';
     94        public static final char TEXT = 'T';
     95        public static final char POSITION = 'P';
     96        public static final char BORDER_COLOR = 'K';
     97        public static final char BACKGROUND_COLOR = 'G';
     98        public static final char COLOR = 'd';
     99        public static final char DATE_CREATED = 's';
     100        public static final char TYPE_AND_ID = 'S';
     101
    44102        protected String _filename = null;
    45103
     
    86144                       
    87145                        // Note: As of 26/11/18 there are no unused letter item tags.  Use other characters.
    88                         _ItemTags.put('S', Item.class.getMethod("getTypeAndID"));
    89                         _ItemTags.put('s', Item.class.getMethod("getDateCreated"));
    90                         _ItemTags.put('d', Item.class.getMethod("getColor"));
    91                         _ItemTags.put('G', Item.class.getMethod("getBackgroundColor"));
    92                         _ItemTags.put('K', Item.class.getMethod("getBorderColor"));
    93 
    94                         _ItemTags.put('P', Item.class.getMethod("getPosition"));
    95                         _ItemTags.put('T', Text.class.getMethod("getText"));
    96                         _ItemTags.put('F', Item.class.getMethod("getLink"));
    97                         _ItemTags.put('X', Item.class.getMethod("getAction"));
    98                         _ItemTags.put('x', Item.class.getMethod("getActionMark"));
    99                         _ItemTags.put('U', Item.class.getMethod("getActionCursorEnter"));
    100                         _ItemTags.put('V', Item.class.getMethod("getActionCursorLeave"));
    101                         _ItemTags.put('W', Item.class.getMethod("getActionEnterFrame"));
    102                         _ItemTags.put('Y', Item.class.getMethod("getActionLeaveFrame"));
    103                         _ItemTags.put('D', Item.class.getMethod("getData"));
    104                         _ItemTags.put('u', Item.class.getMethod("getHighlight"));
    105                         _ItemTags.put('e', Item.class.getMethod("getFillColor"));
    106                         _ItemTags.put('E', Item.class.getMethod("getGradientColor"));
    107                         _ItemTags.put('Q', Item.class.getMethod("getGradientAngle"));
    108                        
    109                         _ItemTags.put('R', Item.class.getMethod("getAnchorLeft"));
    110                         _ItemTags.put('H', Item.class.getMethod("getAnchorRight"));
    111                         _ItemTags.put('N', Item.class.getMethod("getAnchorTop"));
    112                         _ItemTags.put('I', Item.class.getMethod("getAnchorBottom"));
    113 
    114                         _ItemTags.put('i', Item.class.getMethod("getFillPattern"));
    115                         _ItemTags.put('o', Item.class.getMethod("getOwner"));
    116                         _ItemTags.put('n', Item.class.getMethod("getLinkMark"));
    117                         _ItemTags.put('q', Item.class.getMethod("getLinkFrameset"));
    118                         _ItemTags.put('y', Item.class.getMethod("getLinkTemplate"));
    119                         _ItemTags.put('g', Item.class.getMethod("getLinePattern"));
    120 
    121                         _ItemTags.put('j', Item.class.getMethod("getArrow"));
    122                        
    123                         _ItemTags.put('v', Item.class.getMethod("getDotType"));
    124                         _ItemTags.put('z', Item.class.getMethod("getFilled"));
    125 
    126                         _ItemTags.put('f', Text.class.getMethod("getFont"));
    127                         _ItemTags.put('t', Text.class.getMethod("getSpacing"));
    128                        
    129                         _ItemTags.put('O', Text.class.getMethod("getMask"));
     146                        _ItemTags.put(DefaultFrameWriter.TYPE_AND_ID, Item.class.getMethod("getTypeAndID"));
     147                        _ItemTags.put(DefaultFrameWriter.DATE_CREATED, Item.class.getMethod("getDateCreated"));
     148                        _ItemTags.put(DefaultFrameWriter.COLOR, Item.class.getMethod("getColor"));
     149                        _ItemTags.put(DefaultFrameWriter.BACKGROUND_COLOR, Item.class.getMethod("getBackgroundColor"));
     150                        _ItemTags.put(DefaultFrameWriter.BORDER_COLOR, Item.class.getMethod("getBorderColor"));
     151
     152                        _ItemTags.put(DefaultFrameWriter.POSITION, Item.class.getMethod("getPosition"));
     153                        _ItemTags.put(DefaultFrameWriter.TEXT, Text.class.getMethod("getText"));
     154                        _ItemTags.put(DefaultFrameWriter.LINK, Item.class.getMethod("getLink"));
     155                        _ItemTags.put(DefaultFrameWriter.ACTION, Item.class.getMethod("getAction"));
     156                        _ItemTags.put(DefaultFrameWriter.ACTION_MARK, Item.class.getMethod("getActionMark"));
     157                        _ItemTags.put(DefaultFrameWriter.ACTION_CURSOR_ENTER, Item.class.getMethod("getActionCursorEnter"));
     158                        _ItemTags.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE, Item.class.getMethod("getActionCursorLeave"));
     159                        _ItemTags.put(DefaultFrameWriter.ACTION_ENTER_FRAME, Item.class.getMethod("getActionEnterFrame"));
     160                        _ItemTags.put(DefaultFrameWriter.ACTION_LEAVE_FRAME, Item.class.getMethod("getActionLeaveFrame"));
     161                        _ItemTags.put(DefaultFrameWriter.DATA, Item.class.getMethod("getData"));
     162                        _ItemTags.put(DefaultFrameWriter.HIGHLIGHT, Item.class.getMethod("getHighlight"));
     163                        _ItemTags.put(DefaultFrameWriter.FILL_COLOR, Item.class.getMethod("getFillColor"));
     164                        _ItemTags.put(DefaultFrameWriter.GRADIENT_COLOR, Item.class.getMethod("getGradientColor"));
     165                        _ItemTags.put(DefaultFrameWriter.GRADIENT_ANGLE, Item.class.getMethod("getGradientAngle"));
     166                       
     167                        _ItemTags.put(DefaultFrameWriter.ANCHOR_LEFT, Item.class.getMethod("getAnchorLeft"));
     168                        _ItemTags.put(DefaultFrameWriter.ANCHOR_RIGHT, Item.class.getMethod("getAnchorRight"));
     169                        _ItemTags.put(DefaultFrameWriter.ANCHOR_TOP, Item.class.getMethod("getAnchorTop"));
     170                        _ItemTags.put(DefaultFrameWriter.ANCHOR_BOTTOM, Item.class.getMethod("getAnchorBottom"));
     171
     172                        _ItemTags.put(DefaultFrameWriter.FILL_PATTERN, Item.class.getMethod("getFillPattern"));
     173                        _ItemTags.put(DefaultFrameWriter.OWNER, Item.class.getMethod("getOwner"));
     174                        _ItemTags.put(DefaultFrameWriter.LINK_MARK, Item.class.getMethod("getLinkMark"));
     175                        _ItemTags.put(DefaultFrameWriter.LINK_FRAMESET, Item.class.getMethod("getLinkFrameset"));
     176                        _ItemTags.put(DefaultFrameWriter.LINK_TEMPLATE, Item.class.getMethod("getLinkTemplate"));
     177                        _ItemTags.put(DefaultFrameWriter.LINE_PATTERN, Item.class.getMethod("getLinePattern"));
     178
     179                        _ItemTags.put(DefaultFrameWriter.ARROW, Item.class.getMethod("getArrow"));
     180                       
     181                        _ItemTags.put(DefaultFrameWriter.DOT_TYPE, Item.class.getMethod("getDotType"));
     182                        _ItemTags.put(DefaultFrameWriter.FILLED, Item.class.getMethod("getFilled"));
     183
     184                        _ItemTags.put(DefaultFrameWriter.FONT, Text.class.getMethod("getFont"));
     185                        _ItemTags.put(DefaultFrameWriter.SPACING, Text.class.getMethod("getSpacing"));
     186                       
     187                        _ItemTags.put(DefaultFrameWriter.MASK, Text.class.getMethod("getMask"));
    130188
    131189                        // TODO set a boolean flag to indicate that the text is a formula
    132190                        // Store the formula in the text property NOT the answer
    133                         _ItemTags.put('J', Item.class.getMethod("getFormula"));
    134 
    135                         _ItemTags.put('a', Text.class.getMethod("getWordSpacing"));
    136                         _ItemTags.put('b', Text.class.getMethod("getLetterSpacing"));
    137                         _ItemTags.put('m', Text.class.getMethod("getInitialSpacing"));
    138                         _ItemTags.put('w', Text.class.getMethod("getWidthToSave"));
    139                         _ItemTags.put('M', Text.class.getMethod("getMinWidthToSave"));
    140                         _ItemTags.put('k', Text.class.getMethod("getJustification"));
    141                         _ItemTags.put('r', Text.class.getMethod("getAutoWrapToSave"));
    142 
    143                         _ItemTags.put('h', Item.class.getMethod("getThickness"));
    144                         _ItemTags.put('l', Item.class.getMethod("getLineIDs"));
    145                         _ItemTags.put('c', Item.class.getMethod("getConstraintIDs"));
    146                        
    147                         _ItemTags.put('A', Item.class.getMethod("getTooltip"));
    148                         _ItemTags.put('B', Item.class.getMethod("getLinkHistory"));
    149                        
    150                         _ItemTags.put('p', Item.class.getMethod("getPermission"));
    151 
    152                         _ItemTags.put('[', Item.class.getMethod("getMagnetizedItemLeft"));
    153                         _ItemTags.put(']', Item.class.getMethod("getMagnetizedItemRight"));
    154                         _ItemTags.put('^', Item.class.getMethod("getMagnetizedItemTop"));
    155                         _ItemTags.put('/', Item.class.getMethod("getMagnetizedItemBottom"));
    156                        
    157                         _ItemTagsExt.put("_el", Item.class.getMethod("getEncryptionLabel"));
    158                        
    159                         _ItemTagsExt.put("_ph", Text.class.getMethod("getPlaceholder"));
    160                         _ItemTagsExt.put("_sl", Text.class.getMethod("isSingleLineOnly"));
    161                         _ItemTagsExt.put("_ti", Text.class.getMethod("getTabIndex"));
     191                        _ItemTags.put(DefaultFrameWriter.FORMULA, Item.class.getMethod("getFormula"));
     192
     193                        _ItemTags.put(DefaultFrameWriter.WORD_SPACING, Text.class.getMethod("getWordSpacing"));
     194                        _ItemTags.put(DefaultFrameWriter.LETTER_SPACING, Text.class.getMethod("getLetterSpacing"));
     195                        _ItemTags.put(DefaultFrameWriter.INITIAL_SPACING, Text.class.getMethod("getInitialSpacing"));
     196                        _ItemTags.put(DefaultFrameWriter.WIDTH_TO_SAVE, Text.class.getMethod("getWidthToSave"));
     197                        _ItemTags.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE, Text.class.getMethod("getMinWidthToSave"));
     198                        _ItemTags.put(DefaultFrameWriter.JUSTIFICATION, Text.class.getMethod("getJustification"));
     199                        _ItemTags.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE, Text.class.getMethod("getAutoWrapToSave"));
     200
     201                        _ItemTags.put(DefaultFrameWriter.THICKNESS, Item.class.getMethod("getThickness"));
     202                        _ItemTags.put(DefaultFrameWriter.LINE_IDS, Item.class.getMethod("getLineIDs"));
     203                        _ItemTags.put(DefaultFrameWriter.CONSTRAINT_IDS, Item.class.getMethod("getConstraintIDs"));
     204                       
     205                        _ItemTags.put(DefaultFrameWriter.TOOLTIP, Item.class.getMethod("getTooltip"));
     206                        _ItemTags.put(DefaultFrameWriter.LINK_HISTORY, Item.class.getMethod("getLinkHistory"));
     207                       
     208                        _ItemTags.put(DefaultFrameWriter.PERMISSION, Item.class.getMethod("getPermission"));
     209
     210                        _ItemTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT, Item.class.getMethod("getMagnetizedItemLeft"));
     211                        _ItemTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT, Item.class.getMethod("getMagnetizedItemRight"));
     212                        _ItemTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP, Item.class.getMethod("getMagnetizedItemTop"));
     213                        _ItemTags.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM, Item.class.getMethod("getMagnetizedItemBottom"));
     214                       
     215                        _ItemTagsExt.put(DefaultFrameWriter.ENCRYPTION_LABEL, Item.class.getMethod("getEncryptionLabel"));
     216                       
     217                        _ItemTagsExt.put(DefaultFrameWriter.PLACEHOLDER, Text.class.getMethod("getPlaceholder"));
     218                        _ItemTagsExt.put(DefaultFrameWriter.SINGLE_LINE_ONLY, Text.class.getMethod("isSingleLineOnly"));
     219                        _ItemTagsExt.put(DefaultFrameWriter.TAB_INDEX, Text.class.getMethod("getTabIndex"));
    162220                } catch (Exception e) {
    163221                        e.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.