Examples of CellCache


Examples of org.jdesktop.wonderland.client.cell.CellCache

    public static void registerCellCache(CellCache clientCellCache, WonderlandSession session) {
        if (cellCaches==null) {
            cellCaches = new HashMap();
        }
       
        CellCache previous = cellCaches.put(session, clientCellCache);
       
        if (previous!=null)
            throw new RuntimeException("registerCellCache can only be called once");
    }
View Full Code Here

Examples of org.jdesktop.wonderland.client.cell.CellCache

     * Get the  cells from the cache and update the nodes in tree
     */
    private void refreshCells(WonderlandSession session) {
        // Fetch the client-side Cell cache, log an error if not found and
        // return
        CellCache cache = ClientContext.getCellCache(session);
        if (cache == null) {
            LOGGER.warning("Unable to find Cell cache for session " + session);
            return;
        }

        // Clear out any existing Cells from the tree. We do this by creating a
        // new tree model
        treeRoot = new SortedTreeNode(cache.getEnvironmentCell(),
                                      BUNDLE.getString("World_Root"));
        DefaultTreeModel treeModel = new DefaultTreeModel(treeRoot);
        cellHierarchyTree.setModel(treeModel);
        cellNodes.clear();
        cellNodes.put(cache.getEnvironmentCell(), treeRoot);

        // Loop through all of the root cells and add into the world
        Collection<Cell> rootCells = cache.getRootCells();
        for (Cell rootCell : rootCells) {
            createJTreeNode(rootCell);
        }
        cellHierarchyTree.repaint();
    }
View Full Code Here

Examples of org.jdesktop.wonderland.client.cell.CellCache

            CellID cellID = new CellID(cellIDInt);

            // Fetch the client-side Cell cache and find the Cell with the
            // dropped CellID
            WonderlandSession session = LoginManager.getPrimary().getPrimarySession();
            CellCache cache = ClientContext.getCellCache(session);
            if (cache == null) {
                LOGGER.warning("Unable to find Cell cache for session " + session);
                return;
            }
            Cell draggedCell = cache.getCell(cellID);
            if (draggedCell == null) {
                LOGGER.warning("Unable to find dragged Cell with ID " + cellID);
                return;
            }
View Full Code Here

Examples of org.jdesktop.wonderland.client.cell.CellCache

        logger.fine("got a message... " + message);

  if (message instanceof ClientConnectResponseMessage) {
      ClientConnectResponseMessage msg = (ClientConnectResponseMessage) message;

      CellCache cellCache = ClientContext.getCellCache(session);

      if (cellCache == null) {
    logger.warning("Can't find cellCache for session " + session);
    return;
      }

      ArrayList<String> nameTagList = new ArrayList();

      PresenceInfo[] presenceInfoList = msg.getPresenceInfoList();

      for (int i = 0; i < presenceInfoList.length; i++) {
    PresenceInfo presenceInfo = presenceInfoList[i];

    logger.fine("Client connected: " + presenceInfo);

    logger.fine("Got ClientConnectResponse:  adding pi " + presenceInfo);
    pm.presenceInfoAdded(presenceInfo);

    String username = presenceInfo.getUserID().getUsername();

    if (presenceInfo.getCellID() == null) {
        logger.warning("CellID is null for " + presenceInfo);
        continue;
    }

    Cell cell = cellCache.getCell(presenceInfo.getCellID());

    if (cell == null) {
        logger.warning("Unable to find cell for " + presenceInfo.getCellID());
        continue;
    }
View Full Code Here

Examples of org.jdesktop.wonderland.client.cell.CellCache

    public void cleanup() {
        sessionManager.removeLifecycleListener(this);
    }

    public void sessionCreated(WonderlandSession session) {
        CellCache cache = ClientContext.getCellCache(session);
        cache.addCellCacheListener(this);
    }
View Full Code Here

Examples of org.zkoss.test.zss.CellCache

//    pasteAllExpectBorderAndVerify(11, 5, 16, 5, 16, 6); //paste at cells that contains value
  }
 
  @Test
  public void paste_transpose() {
    CellCache F12 = getCellCache(11, 5);
    CellCache F13 = getCellCache(12, 5);
    spreadsheet.setSelection(11, 5, 12, 5);
    click(".zstbtn-copy");
   
    focus(11, 10);
    click(".zstbtn-paste .zstbtn-arrow");
    click(".zsmenuitem-pasteTranspose");
   
    CellCache K12 = getCellCache(11, 10);
    CellCache K13 = getCellCache(11, 11);
    Assert.assertEquals(F12.getText(), K12.getText());
    Assert.assertEquals(F13.getText(), K13.getText());
  }
View Full Code Here

Examples of org.zkoss.test.zss.CellCache

    Assert.assertEquals("90", getCell(9, 11).getText());
  }

  @Test
  public void paste_special_transpose() {
    CellCache F12 = getCellCache(11, 5);
    CellCache F13 = getCellCache(12, 5);
    spreadsheet.setSelection(11, 5, 12, 5);
    click(".zstbtn-copy");
   
    mouseDirector.openCellContextMenu(11, 10);
    click(".z-menupopup:visible .zsmenuitem-pasteSpecial");
   
    jq("$transpose input").getWebElement().click();
    click("$_pasteSpecialDialog $okBtn");
   
    CellCache K12 = getCellCache(11, 10);
    CellCache K13 = getCellCache(11, 11);
    Assert.assertEquals(F12.getText(), K12.getText());
    Assert.assertEquals(F13.getText(), K13.getText());
  }
View Full Code Here

Examples of org.zkoss.test.zss.CellCache

    Assert.assertEquals(cache, builder.offset(12, 10).build());
  }
 
  @Test
  public void drag_fill() {
    CellCache J12 = getCellCache(11, 9);
    mouseDirector.dragFill(11, 9, 11, 11);
   
    Assert.assertEquals(J12.getText(), getCell(11, 10).getText());
    Assert.assertEquals(J12.getFillColor(), getCell(11, 10).getFillColor());
  }
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.