/** * 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); }