Examples of Grid


Examples of Tetris.Structures.Grid

    holdLabel.setHorizontalAlignment(SwingConstants.CENTER);
    holdLabel.setFont(Program.displayFont(Font.BOLD, 15));
    holdLabel.setBounds(25, 20, 100, 40);
    this.add(holdLabel);
   
    holdGrid = new Grid(true);
    holdGrid.setBounds(25, 70, 100, 100);
    this.add(holdGrid);
   
    holdBlock = null;
   
    gameGrid = new Grid(false);
    gameGrid.setBounds(150, 10, 305, 600);
    this.add(gameGrid);
   
    gameBlock = new Block(gameGrid);
   
    inQueueGrid = new Grid[QUEUE_SIZE];
    inQueueBlock = new Block[QUEUE_SIZE];
   
    JLabel
    nextLabel = new JLabel("Next");
    nextLabel.setForeground(Program.foreground);
    nextLabel.setHorizontalAlignment(SwingConstants.CENTER);
    nextLabel.setFont(Program.displayFont(Font.BOLD, 15));
    nextLabel.setBounds(480, 20, 100, 40);
    this.add(nextLabel);
   
    for (int i = 0; i < QUEUE_SIZE; ++i) {
      inQueueGrid[i] = new Grid(true);
      inQueueGrid[i].setBounds(480, 70 + 110 * i, 100, 100);
      this.add(inQueueGrid[i]);
     
      inQueueBlock[i] = new Block((inQueueGrid[i]));
    }
View Full Code Here

Examples of appeng.me.Grid

      if ( te instanceof IGridHost )
      {
        GridNode node = (GridNode) ((IGridHost) te).getGridNode( ForgeDirection.getOrientation( side ) );
        if ( node != null )
        {
          Grid g = node.getInternalGrid();
          IGridNode center = g.getPivot();
          outputMsg( player, "This Node: " + node.toString() );
          outputMsg( player, "Center Node: " + center.toString() );
         
          IPathingGrid pg = g.getCache( IPathingGrid.class );
          if ( pg.getControllerState() == ControllerState.CONTROLLER_ONLINE )
          {
            int length = 0;
           
            HashSet<IGridNode> next = new HashSet<IGridNode>();
            next.add( node );
           
            int maxLength = 10000;
           
            outer: while ( ! next.isEmpty() )
            {
              HashSet<IGridNode> current = next;
              next = new HashSet<IGridNode>();
             
              for ( IGridNode n : current )
              {
                if ( n.getMachine() instanceof TileController )
                  break outer;
               
                for ( IGridConnection c : n.getConnections() )
                  next.add( c.getOtherSide( n ) );
              }
             
              length++;
             
              if ( length > maxLength )
                break;
            }
           
            outputMsg( player, "Cable Distance: " + length );
          }
         
          if ( center.getMachine() instanceof PartP2PTunnel )
          {
            outputMsg( player, "Freq: " + ((PartP2PTunnel) center.getMachine()).freq );
          }

          TickManagerCache tmc = g.getCache( ITickManager.class );
          for (Class c : g.getMachineClasses())
          {
            int o = 0;
            long nanos = 0;
            for (IGridNode oj : g.getMachines( c ))
            {
              o++;
              nanos += tmc.getAvgNanoTime( oj );
            }
View Full Code Here

Examples of ar.com.AmberSoft.iEvenTask.client.utils.Grid

      Context.getInstance().addDetailExecution("Visibles es nulo");
    }
    Context.getInstance().addDetailExecution("ObjectiveWindow 23");
    Map paramsGrid = new HashMap();
    paramsGrid.put(ParamsConst.ID_OBJETIVO, actual.get(ParamsConst.ID));
    grid = new Grid(this, ServiceNameConst.LIST_TASK_BY_OBJECTIVE, getGridConfig(), 10, paramsGrid);
    grid.setSize(WINDOW_WIDTH, 150);
    this.cumplimiento.setVisible(Boolean.TRUE);
    this.cumplimiento.setValue((Number) actual.get(ParamsConst.CUMPLIMIENTO));
    panel.add(grid);
    Context.getInstance().addDetailExecution("ObjectiveWindow 24");
View Full Code Here

Examples of chunmap.raster.grid.Grid

    double biLiChi = map.getView().getScale();
    String directoryName = parameters + "_" + biLiChi;
    String path = createDirectory(directoryName).getPath();

    // create grid
    Grid grid = new Grid();
    grid.setParameters(parameters);
    grid.setScale(biLiChi);
    grid.setSubEnvelop(map.getView().getViewEnvelop());

    createAllTile(grid, path);

    return grid;
  }
View Full Code Here

Examples of cn.com.annotations.Grid

    private Group getDefaultGroup() throws AppException {
        final List<Element> elements = new ArrayList<Element>(20);
        final List<Grid> grids = new ArrayList<Grid>(3);
        final List<Field> fields = TypeContentRefecter.getAllFields(this.clazz);
        Element element = null;
        Grid grid = null;
        Object value = null;
        for (Field field : fields) {
            element = field.getAnnotation(Element.class);
            grid = field.getAnnotation(Grid.class);
            if (element != null) {
View Full Code Here

Examples of co.paralleluniverse.galaxy.Grid

                props.setProperty("galaxy.port", Integer.toString(7050 + peerNum));
                props.setProperty("galaxy.slave_port", Integer.toString(8050 + peerNum));
                props.setProperty("galaxy.multicast.address", "225.0.0.1");
                props.setProperty("galaxy.multicast.port", Integer.toString(7050));

                final Grid grid = Grid.getInstance(pathToResource(configpeerxml), props);
                grid.goOnline();
                final SettableFuture<Short> future = SettableFuture.create();
                grid.cluster().addNodeChangeListener(new NodeChangeListener() {
                    @Override
                    public void nodeAdded(short id) {
                        if (id > grid.cluster().getMyNodeId()) {
                            System.out.println("Larger peer added !!");
                            future.set(id);
                        }
                    }

                    @Override
                    public void nodeSwitched(short id) {
                    }

                    @Override
                    public void nodeRemoved(short id) {
                    }
                });
                for (Short node : grid.cluster().getNodes()) {
                    if (node > grid.cluster().getMyNodeId()) {
                        System.out.println("Larger peer have already up !!");
                        return node;
                    }
                }
                return future.get();
View Full Code Here

Examples of co.paralleluniverse.galaxy.quasar.Grid

    private RemoteChannelReceiver(SendPort<Message> channel, boolean isGlobal) {
        this.channel = channel;
        this.topic = isGlobal ? UUID.randomUUID().toString() : topicGen.incrementAndGet();
        try {
            new Grid(co.paralleluniverse.galaxy.Grid.getInstance()).cluster().addNodeChangeListener(new NodeChangeListener() {
                @Override
                public void nodeAdded(short id) {
                }

                @Override
View Full Code Here

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

    /**
     * figure out the biggest scale based in on which dimension is bumped up to first
     */
    private void determinScaling(int width, int height) {

        Grid grid = env_.getGrid();
        double proposedXScale = width / grid.getXDimension();
        double proposedYScale = height / grid.getYDimension();
        setScale(Math.min(proposedXScale, proposedYScale));
    }
View Full Code Here

Examples of com.extjs.gxt.ui.client.widget.grid.Grid

  column.setAlignment(HorizontalAlignment.RIGHT);
  columns.add(column);
  ColumnModel cm = new ColumnModel(columns);
  ListStore<SimpleDto> store = new ListStore<SimpleDto>();
  store.add(createInforModelList(0.0, 0.0, 0.0, 0.0));
  Grid grid = new Grid<SimpleDto>(store, cm);
  grid.setColumnLines(true);
  grid.setStripeRows(true);
  grid.setHideHeaders(true);

  return grid;
    }
View Full Code Here

Examples of com.google.gwt.gen2.table.override.client.Grid

  public void testAccept() {
    // Initialize the cell editor
    InlineCellEditor<String> editor = createCellEditor();

    // Create the edit info
    Grid grid = new Grid(1, 1);
    CellEditInfo cellEditInfo = new CellEditInfo(grid, 0, 0);

    // Create the callback
    TestCallback<String> callback = new TestCallback<String>(cellEditInfo);
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.