Package fr.soleil.bean.samplesbean.model

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


        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

  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

            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

    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

TOP

Related Classes of fr.soleil.bean.samplesbean.model.CellPosition

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.