Changeset 1379 for trunk/src/org/expeditee/items
- Timestamp:
- 05/27/19 11:38:10 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Text.java
r1377 r1379 139 139 140 140 private Integer _minWidth = -Integer.MAX_VALUE; 141 142 private boolean _singleLine = false; 141 143 142 144 private Justification _justification = Justification.left; … … 1817 1819 Font paintFont = getPaintFont(); 1818 1820 if (this._text != null && this._text.length() > 0) { 1819 this._textLayouts=1821 List<TextLayout> proposedTextLayout = 1820 1822 EcosystemManager.getTextLayoutManager().layoutString( 1821 1823 _text.toString(), … … 1827 1829 getJustification() == Justification.full 1828 1830 ); 1831 if (proposedTextLayout.size() > 1 && isSingleLineOnly()) { 1832 paintFont = paintFont.clone(); 1833 1834 while(proposedTextLayout.size() > 1) { 1835 paintFont.setSize(paintFont.getSize() - 1); 1836 proposedTextLayout = 1837 EcosystemManager.getTextLayoutManager().layoutString( 1838 _text.toString(), 1839 paintFont, 1840 new Point(getX(), getY()), lines != null ? lines.toArray(new org.expeditee.core.Line[1]) : null, 1841 (int) width, 1842 (int) getSpacing(), 1843 true, 1844 getJustification() == Justification.full 1845 ); 1846 } 1847 } 1848 this._textLayouts = proposedTextLayout; 1829 1849 1830 1850 if (this.getMask() != null) { … … 3154 3174 } 3155 3175 } 3176 3177 public boolean isSingleLineOnly() { 3178 return _singleLine; 3179 } 3180 3181 public void setSingleLineOnly(boolean _singleLine) { 3182 this._singleLine = _singleLine; 3183 } 3156 3184 }
Note:
See TracChangeset
for help on using the changeset viewer.