Package net.sf.arianne.marboard.client.entity.shape

Examples of net.sf.arianne.marboard.client.entity.shape.Shape


   *
   * @param boardState state of the board
   * @param event MouseEvent
   */
  public void handleMouseEvent(BoardState boardState, MouseEvent event) {
    Shape shape = this.board.pickShape(event.getX(), event.getY());
    if (shape != null) {
      logger.info(shape.getRPObject());
    }
  }
View Full Code Here


      rpobject.put("thickness", boardState.getThickness());
      rpobject.put("x", startX);
      rpobject.put("y", startY);
      rpobject.put("x2", event.getX());
      rpobject.put("y2", event.getY());
      Shape line = new StraightLine(rpobject);
      board.drawTemporaryShape(line);
    }
  }
View Full Code Here

   * @param x x-coordinate
   * @param y y-coordinate
   * @return Shape or <code>null</code> if there is none
   */
  public Shape pickShape(int x, int y) {
    Shape foundShape = null;
    for (Shape shape : board) {
      if (shape.isAt(x, y)) {
        foundShape = shape;
      }
    }
View Full Code Here

      rpobject.put("thickness", boardState.getThickness());
      rpobject.put("x", Math.min(startX, event.getX()));
      rpobject.put("y", Math.min(startY, event.getY()));
      rpobject.put("x2", Math.max(startX, event.getX()));
      rpobject.put("y2", Math.max(startY, event.getY()));
      Shape line = new Oval(rpobject);
      board.drawTemporaryShape(line);
    }
  }
View Full Code Here

      rpobject.put("thickness", boardState.getThickness());
      rpobject.put("x", Math.min(startX, event.getX()));
      rpobject.put("y", Math.min(startY, event.getY()));
      rpobject.put("x2", Math.max(startX, event.getX()));
      rpobject.put("y2", Math.max(startY, event.getY()));
      Shape shape = new Rectangle(rpobject);
      board.drawTemporaryShape(shape);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.arianne.marboard.client.entity.shape.Shape

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.