Changeset 1410 for trunk/src/org/expeditee/items
- Timestamp:
- 06/21/19 15:16:05 (5 years ago)
- Location:
- trunk/src/org/expeditee/items
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Item.java
r1408 r1410 418 418 419 419 public DotType getDotType() { 420 return _type; 420 Surrogate surrogate = Surrogate.of(this); 421 if (surrogate != null && 422 surrogate.isPropertyIsInherited(DefaultFrameWriter.DOT_TYPE + "")) { 423 return this.getClassic().getDotType(); 424 } else { 425 return _type; 426 } 421 427 } 422 428 … … 430 436 431 437 public boolean getFilled() { 432 return _filled; 438 Surrogate surrogate = Surrogate.of(this); 439 if (surrogate != null && 440 surrogate.isPropertyIsInherited(DefaultFrameWriter.FILLED + "")) { 441 return this.getClassic().getFilled(); 442 } else { 443 return _filled; 444 } 433 445 } 434 446 … … 457 469 */ 458 470 public double getGradientAngle() { 459 return _gradientAngle; 471 Surrogate surrogate = Surrogate.of(this); 472 if (surrogate != null && 473 surrogate.isPropertyIsInherited(DefaultFrameWriter.GRADIENT_ANGLE + "")) { 474 return this.getClassic().getGradientAngle(); 475 } else { 476 return _gradientAngle; 477 } 460 478 } 461 479 … … 513 531 514 532 public PermissionTriple getPermission() { 515 return _permissionTriple; 533 Surrogate surrogate = Surrogate.of(this); 534 if (surrogate != null && 535 surrogate.isPropertyIsInherited(DefaultFrameWriter.PERMISSION + "")) { 536 return this.getClassic().getPermission(); 537 } else { 538 return _permissionTriple; 539 } 516 540 } 517 541 … … 659 683 */ 660 684 public List<String> getAction() { 661 return _actions; 685 Surrogate surrogate = Surrogate.of(this); 686 if (surrogate != null && 687 surrogate.isPropertyIsInherited(DefaultFrameWriter.ACTION + "")) { 688 return this.getClassic().getAction(); 689 } else { 690 return _actions; 691 } 662 692 } 663 693 664 694 public List<String> getData() { 665 return _data.getData(); 695 Surrogate surrogate = Surrogate.of(this); 696 if (surrogate != null && 697 surrogate.isPropertyIsInherited(DefaultFrameWriter.DATA + "")) { 698 return this.getClassic().getData(); 699 } else { 700 return _data.getData(); 701 } 666 702 } 667 703 668 704 public List<String> getActionCursorEnter() { 669 return _actionCursorEnter; 705 Surrogate surrogate = Surrogate.of(this); 706 if (surrogate != null && 707 surrogate.isPropertyIsInherited(DefaultFrameWriter.ACTION_CURSOR_ENTER + "")) { 708 return this.getClassic().getActionCursorEnter(); 709 } else { 710 return _actionCursorEnter; 711 } 670 712 } 671 713 672 714 public List<String> getActionCursorLeave() { 673 return _actionCursorLeave; 715 Surrogate surrogate = Surrogate.of(this); 716 if (surrogate != null && 717 surrogate.isPropertyIsInherited(DefaultFrameWriter.ACTION_CURSOR_LEAVE + "")) { 718 return this.getClassic().getActionCursorLeave(); 719 } else { 720 return _actionCursorLeave; 721 } 674 722 } 675 723 676 724 public List<String> getActionEnterFrame() { 677 return _actionEnterFrame; 725 Surrogate surrogate = Surrogate.of(this); 726 if (surrogate != null && 727 surrogate.isPropertyIsInherited(DefaultFrameWriter.ACTION_ENTER_FRAME + "")) { 728 return this.getClassic().getActionEnterFrame(); 729 } else { 730 return _actionEnterFrame; 731 } 678 732 } 679 733 680 734 public List<String> getActionLeaveFrame() { 681 return _actionLeaveFrame; 735 Surrogate surrogate = Surrogate.of(this); 736 if (surrogate != null && 737 surrogate.isPropertyIsInherited(DefaultFrameWriter.ACTION_LEAVE_FRAME + "")) { 738 return this.getClassic().getActionLeaveFrame(); 739 } else { 740 return _actionLeaveFrame; 741 } 682 742 } 683 743 684 744 public boolean getActionMark() { 685 return _actionMark; 745 Surrogate surrogate = Surrogate.of(this); 746 if (surrogate != null && 747 surrogate.isPropertyIsInherited(DefaultFrameWriter.ACTION_MARK + "")) { 748 return this.getClassic().getActionMark(); 749 } else { 750 return _actionMark; 751 } 686 752 } 687 753 … … 703 769 }*/ 704 770 705 public String getArrow() 706 { 707 if (!hasVisibleArrow()) 708 return null; 709 710 String ratio = "" + getArrowheadRatio(); 711 if (ratio.length() - ratio.indexOf(".") > 2) 712 ratio = ratio.substring(0, ratio.indexOf(".") + 3); 713 714 return getArrowheadLength() + " " + ratio + " " + getArrowheadNibPerc(); 771 public String getArrow() { 772 Surrogate surrogate = Surrogate.of(this); 773 if (surrogate != null && 774 surrogate.isPropertyIsInherited(DefaultFrameWriter.ARROW + "")) { 775 return this.getClassic().getArrow(); 776 } else { 777 if (!hasVisibleArrow()) 778 return null; 779 780 String ratio = "" + getArrowheadRatio(); 781 if (ratio.length() - ratio.indexOf(".") > 2) 782 ratio = ratio.substring(0, ratio.indexOf(".") + 3); 783 784 return getArrowheadLength() + " " + ratio + " " + getArrowheadNibPerc(); 785 } 715 786 } 716 787 … … 735 806 } 736 807 737 public Colour getBackgroundColor() 738 { 739 return _backgroundColour; 740 } 741 742 public Colour getBorderColor() 743 { 744 return _colorBorder; 808 public Colour getBackgroundColor() { 809 Surrogate surrogate = Surrogate.of(this); 810 if (surrogate != null && 811 surrogate.isPropertyIsInherited(DefaultFrameWriter.BACKGROUND_COLOR + "")) { 812 return this.getClassic().getBackgroundColor(); 813 } else { 814 return _backgroundColour; 815 } 816 } 817 818 public Colour getBorderColor() { 819 Surrogate surrogate = Surrogate.of(this); 820 if (surrogate != null && 821 surrogate.isPropertyIsInherited(DefaultFrameWriter.TYPE_AND_ID + "")) { 822 return this.getClassic().getBorderColor(); 823 } else { 824 return _colorBorder; 825 } 745 826 } 746 827 … … 814 895 } 815 896 816 public Colour getColor() 817 { 818 return _foregroundColour; 897 public Colour getColor() { 898 Surrogate surrogate = Surrogate.of(this); 899 if (surrogate != null && 900 surrogate.isPropertyIsInherited(DefaultFrameWriter.COLOR + "")) { 901 return this.getClassic().getColor(); 902 } else { 903 return _foregroundColour; 904 } 819 905 } 820 906 … … 828 914 } 829 915 830 public String getConstraintIDs() 831 { 832 if (_constraints == null || _constraints.size() == 0) 833 return null; 834 835 String cons = ""; 836 837 for (Constraint c : _constraints) 838 cons += c.getID() + " "; 839 840 return cons.trim(); 916 public String getConstraintIDs() { 917 Surrogate surrogate = Surrogate.of(this); 918 if (surrogate != null && 919 surrogate.isPropertyIsInherited(DefaultFrameWriter.CONSTRAINT_IDS + "")) { 920 return this.getClassic().getConstraintIDs(); 921 } else { 922 if (_constraints == null || _constraints.size() == 0) 923 return null; 924 925 String cons = ""; 926 927 for (Constraint c : _constraints) 928 cons += c.getID() + " "; 929 930 return cons.trim(); 931 } 841 932 } 842 933 … … 862 953 } 863 954 864 public String getDateCreated() 865 { 866 return _creationDate; 867 } 868 869 public Colour getFillColor() 870 { 871 return _fillColour; 872 } 873 874 public String getFillPattern() 875 { 876 return _fillPattern; 955 public String getDateCreated() { 956 Surrogate surrogate = Surrogate.of(this); 957 if (surrogate != null && 958 surrogate.isPropertyIsInherited(DefaultFrameWriter.DATE_CREATED + "")) { 959 return this.getClassic().getDateCreated(); 960 } else { 961 return _creationDate; 962 } 963 } 964 965 public Colour getFillColor() { 966 Surrogate surrogate = Surrogate.of(this); 967 if (surrogate != null && 968 surrogate.isPropertyIsInherited(DefaultFrameWriter.FILL_COLOR + "")) { 969 return this.getClassic().getFillColor(); 970 } else { 971 return _fillColour; 972 } 973 } 974 975 public String getFillPattern() { 976 Surrogate surrogate = Surrogate.of(this); 977 if (surrogate != null && 978 surrogate.isPropertyIsInherited(DefaultFrameWriter.FILL_PATTERN + "")) { 979 return this.getClassic().getFillPattern(); 980 } else { 981 return _fillPattern; 982 } 877 983 } 878 984 … … 890 996 * @return The value of <code>_highlight</code>. 891 997 */ 892 public boolean getHighlight() 893 { 894 return _highlight; 998 public boolean getHighlight() { 999 Surrogate surrogate = Surrogate.of(this); 1000 if (surrogate != null && 1001 surrogate.isPropertyIsInherited(DefaultFrameWriter.HIGHLIGHT + "")) { 1002 return this.getClassic().getHighlight(); 1003 } else { 1004 return _highlight; 1005 } 895 1006 } 896 1007 … … 919 1030 * @return The list of Line IDs that this point is part of. 920 1031 */ 921 public String getLineIDs() 922 { 923 String lineID = null; 924 925 if (_lines.size() > 0) { 926 lineID = "" + _lines.get(0).getID(); 927 928 for (int i = 1; i < _lines.size(); i++) 929 lineID += " " + _lines.get(i).getID(); 930 } 931 932 return lineID; 933 } 934 935 public int[] getLinePattern() 936 { 937 return _linePattern; 1032 public String getLineIDs() { 1033 Surrogate surrogate = Surrogate.of(this); 1034 if (surrogate != null && 1035 surrogate.isPropertyIsInherited(DefaultFrameWriter.LINE_IDS + "")) { 1036 return this.getClassic().getLineIDs(); 1037 } else { 1038 String lineID = null; 1039 1040 if (_lines.size() > 0) { 1041 lineID = "" + _lines.get(0).getID(); 1042 1043 for (int i = 1; i < _lines.size(); i++) 1044 lineID += " " + _lines.get(i).getID(); 1045 } 1046 1047 return lineID; 1048 } 1049 } 1050 1051 public int[] getLinePattern() { 1052 Surrogate surrogate = Surrogate.of(this); 1053 if (surrogate != null && 1054 surrogate.isPropertyIsInherited(DefaultFrameWriter.LINE_PATTERN + "")) { 1055 return this.getClassic().getLinePattern(); 1056 } else { 1057 return _linePattern; 1058 } 938 1059 } 939 1060 … … 956 1077 * this Item does not link to anything. 957 1078 */ 958 public String getLink() 959 { 960 return _link; 961 } 962 963 public String getFormula() 964 { 965 return _formula; 1079 public String getLink() { 1080 Surrogate surrogate = Surrogate.of(this); 1081 if (surrogate != null && 1082 surrogate.isPropertyIsInherited(DefaultFrameWriter.LINK + "")) { 1083 return this.getClassic().getLink(); 1084 } else { 1085 return _link; 1086 } 1087 } 1088 1089 public String getFormula() { 1090 Surrogate surrogate = Surrogate.of(this); 1091 if (surrogate != null && 1092 surrogate.isPropertyIsInherited(DefaultFrameWriter.FORMULA + "")) { 1093 return this.getClassic().getFormula(); 1094 } else { 1095 return _formula; 1096 } 966 1097 } 967 1098 … … 987 1118 } 988 1119 989 public String getLinkFrameset() 990 { 991 return _link_frameset; 992 } 993 994 public boolean getLinkMark() 995 { 996 return _linkMark; 997 } 998 999 public String getLinkTemplate() 1000 { 1001 return _link_template; 1120 public String getLinkFrameset() { 1121 Surrogate surrogate = Surrogate.of(this); 1122 if (surrogate != null && 1123 surrogate.isPropertyIsInherited(DefaultFrameWriter.LINK_FRAMESET + "")) { 1124 return this.getClassic().getLinkFrameset(); 1125 } else { 1126 return _link_frameset; 1127 } 1128 } 1129 1130 public boolean getLinkMark() { 1131 Surrogate surrogate = Surrogate.of(this); 1132 if (surrogate != null && 1133 surrogate.isPropertyIsInherited(DefaultFrameWriter.LINK_MARK + "")) { 1134 return this.getClassic().getLinkMark(); 1135 } else { 1136 return _linkMark; 1137 } 1138 } 1139 1140 public String getLinkTemplate() { 1141 Surrogate surrogate = Surrogate.of(this); 1142 if (surrogate != null && 1143 surrogate.isPropertyIsInherited(DefaultFrameWriter.LINK_TEMPLATE + "")) { 1144 return this.getClassic().getLinkTemplate(); 1145 } else { 1146 return _link_template; 1147 } 1002 1148 } 1003 1149 … … 1012 1158 } 1013 1159 1014 public String getOwner() 1015 { 1016 return _owner; 1160 public String getOwner() { 1161 Surrogate surrogate = Surrogate.of(this); 1162 if (surrogate != null && 1163 surrogate.isPropertyIsInherited(DefaultFrameWriter.OWNER + "")) { 1164 return this.getClassic().getOwner(); 1165 } else { 1166 return _owner; 1167 } 1017 1168 } 1018 1169 … … 1129 1280 1130 1281 /** Gets the position of this item. */ 1131 public final Point getPosition() 1132 { 1133 return new Point(getX(), getY()); 1282 public final Point getPosition() { 1283 Surrogate surrogate = Surrogate.of(this); 1284 if (surrogate != null && 1285 surrogate.isPropertyIsInherited(DefaultFrameWriter.POSITION + "")) { 1286 return this.getClassic().getPosition(); 1287 } else { 1288 return new Point(getX(), getY()); 1289 } 1134 1290 } 1135 1291 … … 1156 1312 } 1157 1313 1158 public String getTypeAndID() 1159 { 1160 return "T " + getID(); 1161 } 1162 1163 public Integer getWidthToSave() 1164 { 1165 return getWidth(); 1314 public String getTypeAndID() { 1315 Surrogate surrogate = Surrogate.of(this); 1316 if (surrogate != null && 1317 surrogate.isPropertyIsInherited(DefaultFrameWriter.TYPE_AND_ID + "")) { 1318 return this.getClassic().getTypeAndID(); 1319 } else { 1320 return "T " + getID(); 1321 } 1322 } 1323 1324 public Integer getWidthToSave() { 1325 Surrogate surrogate = Surrogate.of(this); 1326 if (surrogate != null && 1327 surrogate.isPropertyIsInherited(DefaultFrameWriter.WIDTH_TO_SAVE + "")) { 1328 return this.getClassic().getWidthToSave(); 1329 } else { 1330 return getWidth(); 1331 } 1166 1332 } 1167 1333 1168 1334 public Integer getMinWidthToSave() { 1169 return getMinWidth(); 1335 Surrogate surrogate = Surrogate.of(this); 1336 if (surrogate != null && 1337 surrogate.isPropertyIsInherited(DefaultFrameWriter.MIN_WIDTH_TO_SAVE + "")) { 1338 return this.getClassic().getMinWidthToSave(); 1339 } else { 1340 return getMinWidth(); 1341 } 1170 1342 } 1171 1343 … … 1189 1361 * @return The X coordinate of this Item on the screen 1190 1362 */ 1191 public int getX() 1192 { 1193 return Math.round(_x); 1363 public int getX() { 1364 Surrogate surrogate = Surrogate.of(this); 1365 if (surrogate != null && 1366 surrogate.isPropertyIsInherited(DefaultFrameWriter.POSITION + "")) { 1367 return this.getClassic().getX(); 1368 } else { 1369 return Math.round(_x); 1370 } 1194 1371 } 1195 1372 … … 1199 1376 * @return The Y coordinate of this Item on the screen 1200 1377 */ 1201 public int getY() 1202 { 1203 return Math.round(_y); 1378 public int getY() { 1379 Surrogate surrogate = Surrogate.of(this); 1380 if (surrogate != null && 1381 surrogate.isPropertyIsInherited(DefaultFrameWriter.POSITION + "")) { 1382 return this.getClassic().getY(); 1383 } else { 1384 return Math.round(_y); 1385 } 1204 1386 } 1205 1387 … … 1357 1539 } 1358 1540 1359 public List<String> getTooltip() 1360 { 1361 return _tooltip.asStringList(); 1541 public List<String> getTooltip() { 1542 Surrogate surrogate = Surrogate.of(this); 1543 if (surrogate != null && 1544 surrogate.isPropertyIsInherited(DefaultFrameWriter.TOOLTIP + "")) { 1545 return this.getClassic().getTooltip(); 1546 } else { 1547 return _tooltip.asStringList(); 1548 } 1362 1549 } 1363 1550 … … 1836 2023 1837 2024 public Colour getGradientColor() { 1838 return _gradientColour; 2025 Surrogate surrogate = Surrogate.of(this); 2026 if (surrogate != null && 2027 surrogate.isPropertyIsInherited(DefaultFrameWriter.GRADIENT_COLOR + "")) { 2028 return this.getClassic().getGradientColor(); 2029 } else { 2030 return _gradientColour; 2031 } 1839 2032 } 1840 2033 … … 1924 2117 1925 2118 public boolean getLinkHistory() { 1926 return _linkHistory; 2119 Surrogate surrogate = Surrogate.of(this); 2120 if (surrogate != null && 2121 surrogate.isPropertyIsInherited(DefaultFrameWriter.LINK_HISTORY + "")) { 2122 return this.getClassic().getLinkHistory(); 2123 } else { 2124 return _linkHistory; 2125 } 1927 2126 } 1928 2127 … … 2251 2450 * set). 2252 2451 */ 2253 public float getThickness() 2254 { 2255 return _thickness; 2452 public float getThickness() { 2453 Surrogate surrogate = Surrogate.of(this); 2454 if (surrogate != null && 2455 surrogate.isPropertyIsInherited(DefaultFrameWriter.THICKNESS + "")) { 2456 return this.getClassic().getThickness(); 2457 } else { 2458 return _thickness; 2459 } 2256 2460 } 2257 2461 … … 3160 3364 3161 3365 public Integer getAnchorLeft() { 3162 return _anchoring.getLeftAnchor(); 3366 Surrogate surrogate = Surrogate.of(this); 3367 if (surrogate != null && 3368 surrogate.isPropertyIsInherited(DefaultFrameWriter.ANCHOR_LEFT + "")) { 3369 return this.getClassic().getAnchorLeft(); 3370 } else { 3371 return _anchoring.getLeftAnchor(); 3372 } 3163 3373 } 3164 3374 3165 3375 public Integer getAnchorRight() { 3166 return _anchoring.getRightAnchor(); 3376 Surrogate surrogate = Surrogate.of(this); 3377 if (surrogate != null && 3378 surrogate.isPropertyIsInherited(DefaultFrameWriter.ANCHOR_RIGHT + "")) { 3379 return this.getClassic().getAnchorRight(); 3380 } else { 3381 return _anchoring.getRightAnchor(); 3382 } 3167 3383 } 3168 3384 3169 3385 public Integer getAnchorTop() { 3170 return _anchoring.getTopAnchor(); 3386 Surrogate surrogate = Surrogate.of(this); 3387 if (surrogate != null && 3388 surrogate.isPropertyIsInherited(DefaultFrameWriter.ANCHOR_TOP + "")) { 3389 return this.getClassic().getAnchorTop(); 3390 } else { 3391 return _anchoring.getTopAnchor(); 3392 } 3171 3393 } 3172 3394 3173 3395 public Integer getAnchorBottom() { 3174 return _anchoring.getBottomAnchor(); 3396 Surrogate surrogate = Surrogate.of(this); 3397 if (surrogate != null && 3398 surrogate.isPropertyIsInherited(DefaultFrameWriter.ANCHOR_BOTTOM + "")) { 3399 return this.getClassic().getAnchorBottom(); 3400 } else { 3401 return _anchoring.getBottomAnchor(); 3402 } 3175 3403 } 3176 3404 3177 3405 public String getText() { 3178 return "@" + getClass().getSimpleName() + ":" + getID(); 3406 Surrogate surrogate = Surrogate.of(this); 3407 if (surrogate != null && 3408 surrogate.isPropertyIsInherited(DefaultFrameWriter.TEXT + "")) { 3409 return this.getClassic().getText(); 3410 } else { 3411 return "@" + getClass().getSimpleName() + ":" + getID(); 3412 } 3179 3413 } 3180 3414 … … 3412 3646 3413 3647 public int getMagnetizedItemLeft() { 3414 if(_magnetizedItemLeft != null) return _magnetizedItemLeft.getID(); 3415 else return -1; 3648 Surrogate surrogate = Surrogate.of(this); 3649 if (surrogate != null && 3650 surrogate.isPropertyIsInherited(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT + "")) { 3651 return this.getClassic().getMagnetizedItemLeft(); 3652 } else { 3653 if(_magnetizedItemLeft != null) return _magnetizedItemLeft.getID(); 3654 else return -1; 3655 } 3416 3656 } 3417 3657 … … 3425 3665 3426 3666 public int getMagnetizedItemRight() { 3427 if(_magnetizedItemRight != null) return _magnetizedItemRight.getID(); 3428 else return -1; 3667 Surrogate surrogate = Surrogate.of(this); 3668 if (surrogate != null && 3669 surrogate.isPropertyIsInherited(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT + "")) { 3670 return this.getClassic().getMagnetizedItemRight(); 3671 } else { 3672 if(_magnetizedItemRight != null) return _magnetizedItemRight.getID(); 3673 else return -1; 3674 } 3429 3675 } 3430 3676 … … 3438 3684 3439 3685 public int getMagnetizedItemTop() { 3440 if(_magnetizedItemTop != null) return _magnetizedItemTop.getID(); 3441 else return -1; 3686 Surrogate surrogate = Surrogate.of(this); 3687 if (surrogate != null && 3688 surrogate.isPropertyIsInherited(DefaultFrameWriter.MAGNETIZED_ITEM_TOP + "")) { 3689 return this.getClassic().getMagnetizedItemTop(); 3690 } else { 3691 if(_magnetizedItemTop != null) return _magnetizedItemTop.getID(); 3692 else return -1; 3693 } 3442 3694 } 3443 3695 … … 3451 3703 3452 3704 public int getMagnetizedItemBottom() { 3453 if(_magnetizedItemBottom != null) return _magnetizedItemBottom.getID(); 3454 else return -1; 3705 Surrogate surrogate = Surrogate.of(this); 3706 if (surrogate != null && 3707 surrogate.isPropertyIsInherited(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM + "")) { 3708 return this.getClassic().getMagnetizedItemBottom(); 3709 } else { 3710 if(_magnetizedItemBottom != null) return _magnetizedItemBottom.getID(); 3711 else return -1; 3712 } 3455 3713 } 3456 3714 … … 3464 3722 3465 3723 public String getEncryptionLabel() { 3466 return _encryptionLabel; 3724 Surrogate surrogate = Surrogate.of(this); 3725 if (surrogate != null && 3726 surrogate.isPropertyIsInherited(DefaultFrameWriter.ENCRYPTION_LABEL + "")) { 3727 return this.getClassic().getEncryptionLabel(); 3728 } else { 3729 return _encryptionLabel; 3730 } 3467 3731 } 3468 3732 -
trunk/src/org/expeditee/items/Text.java
r1392 r1410 41 41 import org.expeditee.core.bounds.AxisAlignedBoxBounds; 42 42 import org.expeditee.core.bounds.PolygonBounds; 43 import org.expeditee.encryption.items.surrogates.Surrogate; 43 44 import org.expeditee.gio.EcosystemManager; 44 45 import org.expeditee.gio.GraphicsManager; … … 51 52 import org.expeditee.gui.FreeItems; 52 53 import org.expeditee.gui.MessageBay; 54 import org.expeditee.io.DefaultFrameWriter; 53 55 import org.expeditee.items.MagneticConstraint.MagneticConstraints; 54 56 import org.expeditee.math.ExpediteeJEP; … … 499 501 */ 500 502 public Justification getJustification() { 501 if (_justification == null || _justification.equals(Justification.left)) { 502 return null; 503 } 504 505 return _justification; 503 Surrogate surrogate = Surrogate.of(this); 504 if (surrogate != null && 505 surrogate.isPropertyIsInherited(DefaultFrameWriter.JUSTIFICATION + "")) { 506 return ((Text) this.getClassic()).getJustification(); 507 } else { 508 if (_justification == null || _justification.equals(Justification.left)) { 509 return null; 510 } 511 512 return _justification; 513 } 506 514 } 507 515 … … 1295 1303 */ 1296 1304 public Font getFont() { 1297 return _font; 1305 Surrogate surrogate = Surrogate.of(this); 1306 if (surrogate != null && 1307 surrogate.isPropertyIsInherited(DefaultFrameWriter.FONT + "")) { 1308 return ((Text) this.getClassic()).getFont(); 1309 } else { 1310 return _font; 1311 } 1298 1312 } 1299 1313 … … 1501 1515 */ 1502 1516 public float getSpacing() { 1503 return _spacing; 1517 Surrogate surrogate = Surrogate.of(this); 1518 if (surrogate != null && 1519 surrogate.isPropertyIsInherited(DefaultFrameWriter.SPACING + "")) { 1520 return ((Text) this.getClassic()).getSpacing(); 1521 } else { 1522 return _spacing; 1523 } 1504 1524 } 1505 1525 … … 1525 1545 1526 1546 public int getWordSpacing() { 1527 return _word_spacing; 1547 Surrogate surrogate = Surrogate.of(this); 1548 if (surrogate != null && 1549 surrogate.isPropertyIsInherited(DefaultFrameWriter.WORD_SPACING + "")) { 1550 return ((Text) this.getClassic()).getWordSpacing(); 1551 } else { 1552 return _word_spacing; 1553 } 1528 1554 } 1529 1555 … … 1548 1574 */ 1549 1575 public float getLetterSpacing() { 1550 return _letter_spacing; 1576 Surrogate surrogate = Surrogate.of(this); 1577 if (surrogate != null && 1578 surrogate.isPropertyIsInherited(DefaultFrameWriter.LETTER_SPACING + "")) { 1579 return ((Text) this.getClassic()).getLetterSpacing(); 1580 } else { 1581 return _letter_spacing; 1582 } 1551 1583 } 1552 1584 … … 1556 1588 1557 1589 public float getInitialSpacing() { 1558 return _initial_spacing; 1590 Surrogate surrogate = Surrogate.of(this); 1591 if (surrogate != null && 1592 surrogate.isPropertyIsInherited(DefaultFrameWriter.INITIAL_SPACING + "")) { 1593 return ((Text) this.getClassic()).getInitialSpacing(); 1594 } else { 1595 return _initial_spacing; 1596 } 1559 1597 } 1560 1598 … … 3009 3047 3010 3048 public boolean getAutoWrap() { 3011 return _autoWrap; 3049 Surrogate surrogate = Surrogate.of(this); 3050 if (surrogate != null && 3051 surrogate.isPropertyIsInherited(DefaultFrameWriter.AUTO_WRAP_TO_SAVE + "")) { 3052 return ((Text) this.getClassic()).getAutoWrap(); 3053 } else { 3054 return _autoWrap; 3055 } 3012 3056 } 3013 3057 … … 3145 3189 3146 3190 public Integer getMask() { 3147 if (_mask == null) { 3148 return null; 3191 Surrogate surrogate = Surrogate.of(this); 3192 if (surrogate != null && 3193 surrogate.isPropertyIsInherited(DefaultFrameWriter.MASK + "")) { 3194 return ((Text) this.getClassic()).getMask(); 3149 3195 } else { 3150 return _mask; 3151 } 3196 if (_mask == null) { 3197 return null; 3198 } else { 3199 return _mask; 3200 } 3201 } 3202 3152 3203 } 3153 3204 … … 3157 3208 3158 3209 public String getPlaceholder() { 3159 if (_placeholder == null || _placeholder.length() == 0) { 3160 return null; 3161 } 3162 return _placeholder.toString(); 3210 Surrogate surrogate = Surrogate.of(this); 3211 if (surrogate != null && 3212 surrogate.isPropertyIsInherited(DefaultFrameWriter.PLACEHOLDER + "")) { 3213 return ((Text) this.getClassic()).getPlaceholder(); 3214 } else { 3215 if (_placeholder == null || _placeholder.length() == 0) { 3216 return null; 3217 } 3218 return _placeholder.toString(); 3219 } 3163 3220 } 3164 3221 … … 3178 3235 3179 3236 public boolean isSingleLineOnly() { 3180 return _singleLine; 3237 Surrogate surrogate = Surrogate.of(this); 3238 if (surrogate != null && 3239 surrogate.isPropertyIsInherited(DefaultFrameWriter.SINGLE_LINE_ONLY + "")) { 3240 return ((Text) this.getClassic()).isSingleLineOnly(); 3241 } else { 3242 return _singleLine; 3243 } 3181 3244 } 3182 3245 … … 3186 3249 3187 3250 public int getTabIndex() { 3188 return this._tabIndex; 3251 Surrogate surrogate = Surrogate.of(this); 3252 if (surrogate != null && 3253 surrogate.isPropertyIsInherited(DefaultFrameWriter.TAB_INDEX + "")) { 3254 return ((Text) this.getClassic()).getTabIndex(); 3255 } else { 3256 return this._tabIndex; 3257 } 3189 3258 } 3190 3259
Note:
See TracChangeset
for help on using the changeset viewer.