Changeset 50 for trunk/src/org/expeditee/items/Text.java
- Timestamp:
- 05/16/08 10:25:28 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Text.java
r41 r50 905 905 Rectangle textOutline = text.getLogicalHighlightShape(0, 906 906 text.getCharacterCount()).getBounds(); 907 textOutline.translate(getX(), textY); 907 textOutline.width += 2; 908 textOutline.height += 2; 909 910 textOutline.translate(getX() -1, textY - 1); 908 911 if (p.intersects(textOutline)) 909 912 return true; … … 1451 1454 @Override 1452 1455 public Item merge(Item merger, int mouseX, int mouseY) { 1453 if (merger instanceof Dot) { 1454 Dot d = (Dot) merger; 1456 1457 if (merger.isLineEnd()) { 1458 if (merger instanceof Text) 1459 insertText(((Text)merger).getTextNoList(), mouseX, mouseY); 1460 1461 //this.setPosition(merger.getPosition()); 1455 1462 List<Line> lines = new LinkedList<Line>(); 1456 lines.addAll(d.getLines()); 1457 for (Line line : lines) 1458 line.replaceEnd(d, this); 1459 1460 d.removeAllLines(); 1463 lines.addAll(merger.getLines()); 1464 for (Line line : lines){ 1465 line.replaceEnd(merger, this); 1466 } 1467 merger.delete(); 1468 this.setOffset(0,0); 1461 1469 return null; 1462 1470 } … … 1569 1577 setVisible(false); 1570 1578 } 1579 1580 @Override 1581 public void anchor() { 1582 super.anchor(); 1583 // ensure all text items have their selection cleared 1584 clearSelection(); 1585 setAlpha(0); 1586 } 1571 1587 }
Note:
See TracChangeset
for help on using the changeset viewer.