Package nu.fw.jeti.plugins.drawing.shapes

Examples of nu.fw.jeti.plugins.drawing.shapes.Shape


    transVector = vector;
  }

  public void execute(PicturesContent shapesBoard) {
    for (long shapeId : shapeIdList) {
      Shape s = allShapes.get(shapeId);
      if (s != null) {
        s.changeCoordinates(transVector);
      }
    }
    shapesBoard.pictureChanged();
  }
View Full Code Here


    List<Long> newShapesIdList = new ArrayList<Long>();
    int displayCounter = counter + shapeList.size();

    for (int i = 0; i < shapeList.size(); i++) {
      // they should be in the good order: from the oldest to the newest
      Shape oldS = shapeList.get(i);
      Shape newShape = Plugin.createShape(oldS.getName(), Shape
          .generateId(), oldS.getAuthor(), oldS.getCoordinates(),
          oldS.getColor(), counter, oldS.isFilled());
      newShape.changeCoordinates(vector);
      Creation c = new Creation(newShape, allShapes, time,
          actionsAuthor, counter);
      creationActionsList.add(c);
      newShapesIdList.add(newShape.getShapeId());
      counter++;
    }
   
    displayAction = new Display(newShapesIdList, allShapes, time,
        actionsAuthor, displayCounter);
View Full Code Here

  public void execute(PicturesContent shapesBoard) {
    List<Shape> list = new ArrayList<Shape>();

    for (long shapeId : shapeIdList) {
      Shape s = allShapes.get(shapeId);
      if (s != null) {
        list.add(s);
      }
    }
    if (!list.isEmpty()) {
View Full Code Here

    }
  }
 
  public void execute(PicturesContent shapesBoard) {
    long shapeId = shapeIdList.get(0);
    Shape s = allShapes.get(shapeId);
    s.setCoordinates(coord);
    s.setColor(color);
  }
View Full Code Here

  public List<PictureMessage> getPictureMessageList(List<JID> receivers,
      String thread) {
    List<PictureMessage> list = new ArrayList<PictureMessage>();

    long shapeId = shapeIdList.get(0);
    Shape s = allShapes.get(shapeId);
    for (JID jid : receivers) {
      list.add(new CreationMessage(jid, shapeId, s.getName(),
          coord, color, s.isFilled(), s.getAuthor(), thread,
          s.getDisplayHeight(), time, actionsAuthor, counter));
    }
   
    return list;
  }
View Full Code Here

//    setOldColorList();

    if (color != null) {
      // there is only one color we set
      for (long shapeId : shapeIdList) {
        Shape s = allShapes.get(shapeId);
        if (s != null) {
          s.setColor(color);
        }
      }
      return;
    }
    if (newColorList != null) {
      for (long shapeId : shapeIdList) {
        Shape s = allShapes.get(shapeId);
        if (s != null) {
          Color c = newColorList.get(shapeId);
          s.setColor(c);
        }
      }
    }
   
    shapesBoard.pictureChanged();
View Full Code Here

    return list;
  }
 
  private void setOldColorList() {
    for (Long id : shapeIdList) {
      Shape s = allShapes.get(id);
      if (s != null) {
        oldColorList.put(id, s.getColor());     
     
    }
  }
View Full Code Here

  /**
   * The polyline is drawn, memorized in the history and sent to
   * the other users.
   */
  public void mouseReleased(Double point, int scaleX, int scaleY) { 
    Shape shape = new Polyline(points, color, chat.getMyJID());
    chat.draw(shape);
    points.clear();
    board.setCurrentShape(null);
  }
View Full Code Here

  /**
   * Stops drawing the polyline, memorizes the shapes in the history, draws
   * it and sends it to other users.
   */
  public void mouseReleased(Double point, int scaleX, int scaleY) { 
    Shape shape = new Polygon(points, color, chat.getMyJID(), isFilled);
    chat.draw(shape);
    points.clear();
    board.setCurrentShape(null);
  }
View Full Code Here

    Point2D.Double upperLeft = PointsOperations.upperLeftPoint(start, point);
    Point2D.Double bottomRight = PointsOperations.bottomRightPoint(start, point);
    double width = bottomRight.x - upperLeft.x;
    double height = bottomRight.y - upperLeft.y;
   
    Shape shape = new Ellipse(upperLeft.x, upperLeft.y,
        width, height, color, chat.getMyJID(), isFilled);
    chat.draw(shape);
    board.setCurrentShape(null);
  }
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.drawing.shapes.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.