Changeset 776
- Timestamp:
- 01/29/14 10:07:30 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Text.java
r720 r776 55 55 public static String LINE_SEPARATOR = System.getProperty("line.separator"); 56 56 57 public static char[] BULLETS = { '\u2219', '\u2218', '\u2217' }; 57 // public static char[] BULLETS = { '\u2219', '\u2218', '\u2217' }; 58 public static char[] BULLETS = { '\u25AA', '\u25AB', '\u2217' }; 58 59 59 60 private static char DEFAULT_BULLET = BULLETS[2]; … … 131 132 // text is broken up into lines 132 133 private StringBuffer _text = new StringBuffer(); 133 private boolean _rebuildText = false;134 134 135 135 private List<TextLayout> _textLayouts = new LinkedList<TextLayout>(); … … 207 207 208 208 _maxWidth = width; 209 // delay rebuilding until the next time we redraw 210 // this makes sure other items will have loaded, so we will be able to rebuild correctly 211 _rebuildText = true; 212 // rebuild(true); 209 rebuild(true); 213 210 invalidateAll(); 214 211 } … … 408 405 _text.append(text); 409 406 410 // rebuild at next redraw 411 // this makes sure the text item draws correctly upon loading a frame, 412 // and also keeps this method efficient 413 _rebuildText = true; 407 rebuild(true); 414 408 } 415 409 … … 1474 1468 width = Float.MAX_VALUE; 1475 1469 if (limitWidth) { 1476 width = getAbsoluteWidth(); 1470 if(_maxWidth == null) { 1471 width = FrameGraphics.getMaxFrameSize().width - getX(); 1472 } else { 1473 width = getAbsoluteWidth(); 1474 } 1477 1475 // else if (getMaxWidth() > 0) 1478 1476 // width = Math.max(50, getMaxWidth() - getX() … … 1669 1667 1670 1668 rebuild(true); 1671 } else if (_ rebuildText || _textLayouts.size() < 1) {1669 } else if (_textLayouts.size() < 1) { 1672 1670 clipFrameMargin(); 1673 1671 rebuild(true); 1674 _rebuildText = false;1675 1672 // return; 1676 1673 } … … 2061 2058 Text template = this.copy(); 2062 2059 template.setID(-1); 2060 // reset width of global templates so the widths of the items on the settings frames don't cause issues 2061 // this is in response to the fact that FrameCreator.addItem() sets rightMargin when it adds items 2062 template.setWidth(null); 2063 2063 /* 2064 2064 * The template must have text otherwise the bounds height will be
Note:
See TracChangeset
for help on using the changeset viewer.