Changeset 1410 for trunk/src/org/expeditee/items/Text.java
- Timestamp:
- 06/21/19 15:16:05 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.