Package com.puzzlebazar.shared.util

Examples of com.puzzlebazar.shared.util.Vec2i


      boolean valid,
      boolean visited,
      boolean[][] validCells,
      boolean[][] visitedCells) {

    Vec2i loc = new Vec2i();
    for (int i = 0; i < validCells.length; ++i) {
      loc.x = i;
      for (int j = 0; j < validCells[i].length; ++j) {
        loc.y = j;
        if ((validCells[i][j] ^ !valid) && (visitedCells[i][j] ^ !visited)) {
View Full Code Here


   * @param thickness The desired thickness of the inner edges.
   * @param styleNames A list of string containing all the desired style names. (The default edge style is added automatically.)
   * @return A list of all newly created widgets.
   */
  public List<Widget> createInnerEdges(int thickness, String... styleNames) {
    Vec2i loc = new Vec2i();
    List<Widget> result = new ArrayList<Widget>();
    for (int y = 0; y < height; ++y) {
      loc.y = y;
      for (int x = 0; x < width; ++x) {
        loc.x = x;
View Full Code Here

   * @param thickness The desired thickness of the inner edges.
   * @param styleNames A list of string containing all the desired style names. (The default edge style is added automatically.)
   * @return A list of all newly created widgets.
   */
  public List<Widget> createOuterEdges(int thickness, String... styleNames) {
    Vec2i loc = new Vec2i();
    List<Widget> result = new ArrayList<Widget>();
    for (int y = 0; y <= height; y += height) {
      loc.y = y;
      for (int x = 0; x < width; ++x) {
        loc.x = x;
View Full Code Here

    if (edgeHitInfo != null) {
      fireEvent(new EdgeMouseDownEvent(edgeHitInfo.isVertical(), edgeHitInfo.getEdge()));
      return;
    }

    Vec2i cell = cellHit(x, y);
    if (cell != null) {
      fireEvent(new CellMouseDownEvent(cell));
    }
  }
View Full Code Here

    if (edgeHitInfo != null) {
      fireEvent(new EdgeMouseUpEvent(edgeHitInfo.isVertical(), edgeHitInfo.getEdge()));
      return;
    }

    Vec2i cell = cellHit(x, y);
    if (cell != null) {
      fireEvent(new CellMouseUpEvent(cell));
    }
  }
View Full Code Here

      }
      fireEvent(new EdgeMouseMoveEvent(edgeHitInfo.isVertical(), edgeHitInfo.getEdge()));
      return;
    }

    Vec2i cell = cellHit(x, y);
    if (cell != null) {
      if (current != OVER_CELL ||
          !currentLoc.equals(cell)) {
        fireOutEvent();
        current = OVER_CELL;
View Full Code Here

   */
  private Vec2i cellHit(int x, int y) {
    if (squareGridConverter == null || squareGridValidator == null) {
      return null;
    }
    Vec2i cell = squareGridConverter.pixelToCell(x, y);
    if (squareGridValidator.isValidCell(cell)) {
      return cell;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.puzzlebazar.shared.util.Vec2i

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.