Changeset 906 for trunk/src/org/expeditee/items/Text.java
- Timestamp:
- 04/15/14 12:56:30 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Text.java
r905 r906 24 24 import java.awt.geom.Rectangle2D; 25 25 import java.io.File; 26 import java.io.IOException; 26 27 27 import java.text.AttributedString; 28 28 import java.util.Collection; … … 41 41 import org.expeditee.gui.FrameUtils; 42 42 import org.expeditee.gui.FreeItems; 43 import org.expeditee.items.MagneticConstraint.MagneticConstraints; 43 44 import org.expeditee.math.ExpediteeJEP; 44 45 import org.expeditee.settings.experimental.ExperimentalFeatures; … … 691 692 */ 692 693 public Point2D.Float insertText(String text, float mouseX, float mouseY) { 693 return insertText(text, mouseX, mouseY, -1); 694 final Point2D.Float newPos = insertText(text, mouseX, mouseY, -1); 695 return newPos; 694 696 } 695 697 … … 1409 1411 return; 1410 1412 1413 int preChangeWidth = 0; 1414 if (_poly != null) 1415 preChangeWidth = _poly.getBounds().width; 1416 1411 1417 _poly = new Polygon(); 1412 1418 … … 1457 1463 1458 1464 _poly.translate(getX(), getY()); 1465 1466 if(preChangeWidth != 0 && preChangeWidth != _poly.getBounds().width) 1467 if(_poly.getBounds().width > preChangeWidth) MagneticConstraints.getInstance().textGrown(this, _poly.getBounds().width - preChangeWidth); 1468 else MagneticConstraints.getInstance().textShrunk(this, preChangeWidth - _poly.getBounds().width); 1459 1469 } 1460 1470
Note:
See TracChangeset
for help on using the changeset viewer.