Examples of Cell


Examples of com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell

          boolean flipVertically = ((id & FLAG_FLIP_VERTICALLY) != 0);
          boolean flipDiagonally = ((id & FLAG_FLIP_DIAGONALLY) != 0);

          TiledMapTile tile = tilesets.getTile(id & ~MASK_CLEAR);
          if (tile != null) {
            Cell cell = createTileLayerCell(flipHorizontally, flipVertically, flipDiagonally);
            cell.setTile(tile);
            layer.setCell(x, height - 1 - y, cell);
          }
        }
      }
View Full Code Here

Examples of com.barrybecker4.puzzle.sudoku.model.board.Cell

     */
    private void checkAndSetUniqueValues() {

        for (int row = 0; row < board.getEdgeLength(); row++) {
            for (int col = 0; col < board.getEdgeLength(); col++) {
                Cell cell = board.getCell(row, col);
                Candidates cands = cell.getCandidates();
                if (cands!=null && cands.size() == 1) {
                    int unique = cands.getFirst();
                    cell.setValue(unique);
                }
            }
        }
    }
View Full Code Here

Examples of com.barrybecker4.simulation.habitat.model.Cell

    }

    private void updateGridCellCounts() {
        for (Population pop : this) {
            for (Creature c : pop.getCreatures()) {
                Cell cell = grid.getCellForPosition(c.getLocation());
                cell.addCreature(c);
            }
        }
    }
View Full Code Here

Examples of com.barrybecker4.simulation.liquid.model.Cell

        double xChange = timeStep * vel.x;
        double yChange = timeStep * vel.y;
        particle.set( particle.x + xChange, particle.y + yChange );
        particle.incAge( timeStep );

        Cell newHomeCell = findNewHomeCell(particle, i, j);

        assert ( particle.x >= 1 && particle.y >= 1
                && particle.x < grid.getXDimension() - 1
                && particle.y < grid.getYDimension() - 1) :
                "particle.x=" + particle.x + "particle.y=" + particle.y ;

        // adjust # particles as they cross cell boundaries
        newHomeCell.incParticles(); // increment new cell
        grid.getCell(i, j).decParticles()// decrement last cell
        particle.setCell( newHomeCell );

        assert ( grid.getCell(i, j).getNumParticles() >= 0):
                "The number of particles in grid[" + i + "][" + j + "] is " + grid.getCell(i, j).getNumParticles();
        assert ( newHomeCell.getNumParticles() >= 0 );
        return vel.length();
    }
View Full Code Here

Examples of com.esotericsoftware.tablelayout.Cell

    super.layout();

    List<Cell> cells = getCells();
    for (int i = 0, n = cells.size(); i < n; i++) {
      Cell c = cells.get(i);
      if (c.getIgnore()) continue;
      Actor actor = (Actor)c.getWidget();
      actor.x = c.getWidgetX();
      int widgetHeight = c.getWidgetHeight();
      actor.y = table.height - c.getWidgetY() - widgetHeight;
      actor.width = c.getWidgetWidth();
      actor.height = widgetHeight;
      if (actor instanceof Layout) {
        Layout layout = (Layout)actor;
        layout.invalidate();
        layout.layout();
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.grid.GridSelectionModel.Cell

    int clen = cm.getColumnCount();
    int rlen = store.getCount();
    if (step < 0) {
      if (col < 0) {
        if (GXT.isFocusManagerEnabled()) {
          return new Cell(row, 0);
        }
        row--;
        first = false;
      }
      while (row >= 0) {
        if (!first) {
          col = clen - 1;
        }
        first = false;
        while (col >= 0) {
          if (callback.isSelectable(row, col, acceptNavs)) {
            return new Cell(row, col);
          }
          col--;
        }
        row--;
      }
    } else {
      if (col == clen && GXT.isFocusManagerEnabled()) {
        return new Cell(row, col - 1);
      }
      if (col >= clen) {
        row++;
        first = false;
      }
      while (row < rlen) {
        if (!first) {
          col = 0;
        }
        first = false;
        while (col < clen) {
          if (callback.isSelectable(row, col, acceptNavs)) {
            return new Cell(row, col);
          }
          col++;
        }
        row++;
      }
View Full Code Here

Examples of com.google.gdata.data.spreadsheet.Cell

            CellFeed cellFeed = service.query(cellQuery, CellFeed.class);
            List<CellEntry> cellEntries = cellFeed.getEntries();
           
            List<List<Object>> rowsOfCells = new ArrayList<List<Object>>(rowCount);
            for (CellEntry cellEntry : cellEntries) {
                Cell cell = cellEntry.getCell();
                if (cell != null) {
                    int row = cell.getRow() - startRow;
                    int col = cell.getCol() - 1;
                   
                    while (row >= rowsOfCells.size()) {
                        rowsOfCells.add(new ArrayList<Object>());
                    }
                    List<Object> rowOfCells = rowsOfCells.get(row);
                   
                    while (col >= rowOfCells.size()) {
                        rowOfCells.add(null);
                    }
                    rowOfCells.set(col, cell.getValue());
                }
            }
            return rowsOfCells;
        }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.uibinder.model.widgets.GridInfo.Cell

        "      </g:customCell>",
        "    </g:row>",
        "    <g:row wbp:name='refRow'/>",
        "  </g:Grid>",
        "</ui:UiBinder>");
    Cell cell = getObjectByName("cell");
    Row refRow = getObjectByName("refRow");
    //
    canvas.beginDrag(cell).dragTo(refRow, 0.5, 1).endDrag();
    assertXML(
        "<ui:UiBinder>",
View Full Code Here

Examples of com.google.gwt.cell.client.Cell

public class ColumnWithNameClientTest extends ClientTestCase {

    /** Test constructor and getName() method. */
    @SuppressWarnings("rawtypes")
    public void testConstructor() {
        Cell cell = new TextCell();

        ColumnWithName column = new TestColumn(cell);
        assertNotNull(column);
        assertEquals(null, column.getName());
        assertSame(cell, column.getCell());
View Full Code Here

Examples of com.google.gwt.gen2.table.event.client.TableEvent.Cell

        }
      }
    });
    dataTable.addCellHighlightHandler(new CellHighlightHandler() {
      public void onCellHighlight(CellHighlightEvent event) {
        Cell cell = event.getValue();
        highlightedCellLabel.setText("Highlighted cell: (" + cell.getRowIndex()
            + "," + cell.getCellIndex() + ")");
      }
    });
    dataTable.addCellUnhighlightHandler(new CellUnhighlightHandler() {
      public void onCellUnhighlight(CellUnhighlightEvent event) {
        Cell cell = event.getValue();
        unhighlightedCellLabel.setText("Last unhighlighted cell: ("
            + cell.getRowIndex() + "," + cell.getCellIndex() + ")");
      }
    });
    dataTable.addRowHighlightHandler(new RowHighlightHandler() {
      public void onRowHighlight(RowHighlightEvent event) {
        Row cell = event.getValue();
        highlightedRowLabel.setText("Highlighted row: (" + cell.getRowIndex()
            + ")");
      }
    });
    dataTable.addRowUnhighlightHandler(new RowUnhighlightHandler() {
      public void onRowUnhighlight(RowUnhighlightEvent event) {
        Row cell = event.getValue();
        unhighlightedRowLabel.setText("Last unhighlighted row: ("
            + cell.getRowIndex() + ")");
      }
    });
    dataTable.addRowSelectionHandler(new RowSelectionHandler() {
      public void onRowSelection(RowSelectionEvent event) {
        // Show the previously selected rows
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.