Examples of CellPosition


Examples of com.narirelays.ems.utils.Interpreters.Excel.CellPosition

                                   if(isNewEvaluator){
                                    CommonTreeNodeStream nodes = new CommonTreeNodeStream(paraTree);
                                    ExcelFormulaJavaTree evaluator = new ExcelFormulaJavaTree(nodes,excel,evaluateStack,currentSheet,true);
                                    Object exprValue = evaluator.expr();
                                    if(exprValue instanceof CellPosition){
                                      CellPosition cp = (CellPosition)exprValue;
                                      for(int rowi=cp.sRowNum;rowi<=cp.eRowNum;rowi++){
                                        for(int coli=cp.sColNum;coli<=cp.eColNum;coli++){
                                          paraValues.add(excel.evaluate(evaluateStack,cp.sheetNum,rowi,coli));
                                        }
                                       
View Full Code Here

Examples of fr.soleil.bean.samplesbean.model.CellPosition

                List<CellPosition> orderedPositions = new ArrayList<CellPosition>(positions);
                Collections.sort(orderedPositions);

                for (Iterator<CellPosition> iterator2 = orderedPositions.iterator(); iterator2
                        .hasNext();) {
                    CellPosition position = iterator2.next();
                    SubCell subCell = positionChildrenMap.get(position);
                    currentNode.add(new DefaultMutableTreeTableNode(subCell));
                }
            }
        }
View Full Code Here

Examples of fr.soleil.bean.samplesbean.model.CellPosition

        CellPosition[] positions = CellPosition.values();

        ActionManager actionManager = ActionManager.getInstance();

        for (int i = 0; i < positions.length; i++) {
            CellPosition cellPosition = positions[i];
            String cellName = cellPosition.name();
            JMenuItem add_menuItem = new JMenuItem(cellName);
            Action addSampleAction = new AddSampleAction(cellPosition, treePath);
            actionManager.addAction(addSampleAction);
            add_menuItem.setAction(addSampleAction);
            addMenu.add(add_menuItem);
        }

        popupMenu.add(addMenu);
        // ----------------------------------------------------------------------
        // ---------------------------------
        //
        // Initiate the deleteMenu for delete samples.
        //
        // ----------------------------------------------------------------------
        // ---------------------------------
        JMenu deleteMenu = new JMenu("Delete Samples");
        deleteMenu.setIcon(icons.getIcon("samples.remove"));

        for (int i = 0; i < positions.length; i++) {
            CellPosition cellPosition = positions[i];
            String cellName = cellPosition.name();
            JMenuItem del_menuItem = new JMenuItem(cellName);
            Action deleteSampleAction = new DeleteSampleAction(cellPosition, treePath);
            actionManager.addAction(deleteSampleAction);
            del_menuItem.setAction(deleteSampleAction);
            deleteMenu.add(del_menuItem);
        }
        popupMenu.add(deleteMenu);

        // ----------------------------------------------------------------------
        // ---------------------------------
        //
        // Initiate the moveMenu for change the position of the sample.
        //
        // ----------------------------------------------------------------------
        // ---------------------------------
        JMenu moveMenu = new JMenu("Move Sample");
        moveMenu.setIcon(icons.getIcon("samples.move"));

        for (int i = 0; i < positions.length; i++) {
            CellPosition cellPosition = positions[i];
            String cellName = cellPosition.name();
            JMenuItem mov_menuItem = new JMenuItem(cellName);
            Action moveSampleAction = new MoveSampleAction(cellPosition, treePath);
            actionManager.addAction(moveSampleAction);
            mov_menuItem.setAction(moveSampleAction);
            moveMenu.add(mov_menuItem);
View Full Code Here

Examples of fr.soleil.bean.samplesbean.model.CellPosition

  public void actionPerformed(ActionEvent e) {
    super.actionPerformed(e);
    if (userObject instanceof SubCell) {
      SubCell subCell = (SubCell) userObject;
      if (subCell != null) {
        CellPosition oldPosition = subCell.getPosition();
        Sample sample = subCell.getSample();
        Cell parent = subCell.getParent();
        parent.removeChildrenForMove(oldPosition);
        parent.addChildren(cellPosition, sample);
      }
View Full Code Here

Examples of fr.soleil.bean.samplesbean.model.CellPosition

            positions);
        Collections.sort(orderedPositions);

        for (Iterator<CellPosition> iterator2 = orderedPositions
            .iterator(); iterator2.hasNext();) {
          CellPosition position = iterator2.next();
          SubCell subCell = positionChildrenMap.get(position);
          currentNode.add(new DefaultMutableTreeTableNode(subCell));
        }
      }
    }
View Full Code Here

Examples of fr.soleil.bean.samplesbean.model.CellPosition

    CellPosition[] positions = CellPosition.values();

    ActionManager actionManager = ActionManager.getInstance();

    for (int i = 0; i < positions.length; i++) {
      CellPosition cellPosition = positions[i];
      String cellName = cellPosition.name();
      JMenuItem add_menuItem = new JMenuItem(cellName);
      Action addSampleAction = new AddSampleAction(cellPosition, treePath);
      actionManager.addAction(addSampleAction);
      add_menuItem.setAction(addSampleAction);
      addMenu.add(add_menuItem);
    }

    popupMenu.add(addMenu);
    // ----------------------------------------------------------------------
    // ---------------------------------
    //
    // Initiate the deleteMenu for delete samples.
    //
    // ----------------------------------------------------------------------
    // ---------------------------------
    JMenu deleteMenu = new JMenu("Delete Samples");
    deleteMenu.setIcon(icons.getIcon("samples.remove"));

    for (int i = 0; i < positions.length; i++) {
      CellPosition cellPosition = positions[i];
      String cellName = cellPosition.name();
      JMenuItem del_menuItem = new JMenuItem(cellName);
      Action deleteSampleAction = new DeleteSampleAction(cellPosition,
          treePath);
      actionManager.addAction(deleteSampleAction);
      del_menuItem.setAction(deleteSampleAction);
      deleteMenu.add(del_menuItem);
    }
    popupMenu.add(deleteMenu);

    // ----------------------------------------------------------------------
    // ---------------------------------
    //
    // Initiate the moveMenu for change the position of the sample.
    //
    // ----------------------------------------------------------------------
    // ---------------------------------
    JMenu moveMenu = new JMenu("Move Sample");
    moveMenu.setIcon(icons.getIcon("samples.move"));

    for (int i = 0; i < positions.length; i++) {
      CellPosition cellPosition = positions[i];
      String cellName = cellPosition.name();
      JMenuItem mov_menuItem = new JMenuItem(cellName);
      Action moveSampleAction = new MoveSampleAction(cellPosition,
          treePath);
      actionManager.addAction(moveSampleAction);
      mov_menuItem.setAction(moveSampleAction);
View Full Code Here

Examples of simplesheet.model.selection.CellPosition

        }
    }

    @Override
    public TableCell getValueAt(CellPosition pos) {
        CellPosition point = getOrigin(pos);
        TableCell cell = cells[point.row][point.col];
        if(cell == null) {
            return EMPTY_CELL;
        }
        return cell;
View Full Code Here

Examples of simplesheet.model.selection.CellPosition

    public int getColumnCount() {
        return cols.length;
    }

    public void initCell(CellPosition pos, TableCell cell) {
        CellPosition point = getOrigin(pos);
        cells[point.row][point.col] = cell;
        fireSheetCellUpdated(point);
    }
View Full Code Here

Examples of simplesheet.model.selection.CellPosition

     * @param width
     * @param height
     * @return
     */
    public boolean combine(CellPosition pos, int height, int width) {
        CellPosition origin = getOrigin(pos);
        if (origin == null
                || origin.col + width > getColumnCount()
                || origin.row + height > getRowCount()
                || width == 0
                || height == 0
View Full Code Here

Examples of simplesheet.model.selection.CellPosition

     *
     * @param col
     * @param row
     */
    public boolean split(CellPosition pos) {
        CellPosition origin = getOrigin(pos);
        if (origin == null) {
            assert false : "index of bounds";
            return false;
        }
        Dimension size = getSize(origin);
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.