Package nu.fw.jeti.plugins.drawing.geometry

Examples of nu.fw.jeti.plugins.drawing.geometry.Vector


   */
  public void paste() {
    if (!staticClipboard.isEmpty()) {
      Point2D.Double p = currentPicture
          .getTheMostUpperLeftPointAmongGaveList(staticClipboard);
      Vector v = new Vector(-p.x, -p.y);
      history.addPasteDoneByMe(staticClipboard, v,
          getMyJID().toString(), pictures, receivers,  thread);
    }
  }
View Full Code Here


   * of the point. If there is none shapes selected, none are shown as
   * selected.
   */
  public void mouseReleased(Point2D.Double point, int scaleX, int scaleY) {
    if (isMoving) {
      chat.moveShapes(new Vector(end, point));
      end = point;
      Vector transVector = new Vector(start, end);
      chat.moveShapes(transVector.getReverseVector());
      chat.sendShapesTranslation(transVector);
    } else {
      end = point;
      if (start.x == end.x && start.y == end.y) {
        // we want to select only one shape
View Full Code Here

  /**
   * The user chooses the area of the selection.
   */
  public void mouseDragged(Point2D.Double point) {
    if (isMoving) {
      chat.moveShapes(new Vector(end, point));
      end = point;
    } else {
      end = point;
      if (board.getCurrentShape() != null) {
        (board.getCurrentShape()).setCoordinates(
View Full Code Here

    endAppendingToXML(xml, TYPE_TAG);
  }

  private Vector stringToVector(String s) {
    String[] result = s.split("\\s");
    return new Vector(Double.parseDouble(result[0]),
        Double.parseDouble(result[1]));
  }
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.drawing.geometry.Vector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.