/**
   * Calls the given treeNode.
   *
   * @param treeNode the <tt>TreeNode</tt> to call
   */
  private void call(TreeNode treeNode, JButton button, boolean isVideo, boolean isDesktopSharing) {
    if (!(treeNode instanceof ContactNode)) return;

    UIContact contactDescriptor = ((ContactNode) treeNode).getContactDescriptor();

    Point location = new Point(button.getX(), button.getY() + button.getHeight());

    SwingUtilities.convertPointToScreen(location, treeContactList);

    location.y = location.y + treeContactList.getPathBounds(treeContactList.getSelectionPath()).y;
    location.x += 8;
    location.y -= 8;

    CallManager.call(contactDescriptor, isVideo, isDesktopSharing, treeContactList, location);
  }
  public void layoutComponents() {
    setLayout(new BorderLayout());
    add(main, BorderLayout.CENTER);

    if (popperIsVisible) {
      if (getPopperButtonLocation() == RIGHT) {
        popper.setPreferredSize(new Dimension(14, main.getHeight()));
        add(popper, BorderLayout.EAST);
      } else if (getPopperButtonLocation() == BOTTOM) {
        popper.setPreferredSize(new Dimension(main.getWidth(), 14));
        add(popper, BorderLayout.SOUTH);

        setPopperArrowDirection(DOWN);
        setPopupLocation(popper.getX(), popper.getY() + popper.getHeight() + 5);
      }
    }

    Utilities.updateView(this);
  }
Example #3
0
  private void resizeCantor(int width, int height) {
    int cantorEWidth = (width - 200) / 3;
    int cantorJtaHeight = 18;
    int cantorYList = 300;

    int cantorBWidth = 100;
    int cantorBHeight = 25;
    cantorPay.setBounds(10, 10, 150, cantorJtaHeight);
    cantorCurrL1.setBounds(10, 10, 150, 18);
    cantorScrollPane.setBounds(
        cantorCurrL1.getX() + cantorCurrL1.getWidth() + 40, cantorYList - 270, 500, 230);
    cantorBuyLabel.setBounds(
        cantorScrollPane.getX(), cantorScrollPane.getY() - 20, cantorEWidth, 18);
    cantorCurrBox1.setBounds(10, cantorCurrL1.getY() + 20, 100, 20);
    cantorCurrL2.setBounds(10, cantorCurrBox1.getY() + 20, cantorEWidth, 18);
    cantorCurrBox2.setBounds(cantorCurrBox1.getX(), cantorCurrL2.getY() + 20, 100, 20);
    cantorPrice.setBounds(cantorCurrBox2.getX(), cantorCurrBox2.getY() + 30, 150, cantorJtaHeight);
    cantorAmountJta.setBounds(cantorPrice.getX(), cantorPrice.getY() + 20, 100, cantorJtaHeight);
    cantorResButton.setBounds(
        cantorAmountJta.getX(), cantorAmountJta.getY() + 22, cantorBWidth, cantorBHeight);
    cantorCostLabel.setBounds(
        cantorResButton.getX(), cantorResButton.getY() + 28, 150, cantorJtaHeight);
    cantorCostJta.setBounds(
        cantorCostLabel.getX(), cantorCostLabel.getY() + 22, 100, cantorJtaHeight);
    cantorClientL.setBounds(10, cantorCostJta.getY() + 80, cantorEWidth, 18);
    cantorPESJta.setBounds(cantorClientL.getX(), cantorClientL.getY() + 22, 100, cantorJtaHeight);
    cantorPESButton.setBounds(
        cantorPESJta.getX(), cantorPESJta.getY() + 22, cantorBWidth, cantorBHeight);
    cantorScrollClientPane.setBounds(
        cantorScrollPane.getX(),
        cantorScrollPane.getY() + cantorScrollPane.getHeight() + 30,
        550,
        230);
    cantorDoIt.setBounds(
        cantorCostJta.getX(), cantorCostJta.getY() + 300, cantorBWidth + 50, cantorBHeight);
  }