Return-Path: X-Original-To: apmail-pivot-user-archive@www.apache.org Delivered-To: apmail-pivot-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71C3667BA for ; Tue, 7 Jun 2011 18:41:52 +0000 (UTC) Received: (qmail 53740 invoked by uid 500); 7 Jun 2011 18:41:52 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 53715 invoked by uid 500); 7 Jun 2011 18:41:52 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 53707 invoked by uid 99); 7 Jun 2011 18:41:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 18:41:52 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cbartlett.x@gmail.com designates 209.85.215.182 as permitted sender) Received: from [209.85.215.182] (HELO mail-ey0-f182.google.com) (209.85.215.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 18:41:46 +0000 Received: by eyg7 with SMTP id 7so2693425eyg.13 for ; Tue, 07 Jun 2011 11:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=Ia+5G8u+LGDIB8zEApeZ426D8XFfy2nCgjj+zItmmIQ=; b=hRFdFSZHeOUYcKJLiP1o4nUhkyCcrdFB4THsZB0AxIWkGVQyUMMt8EjfMYpUjMsKCt wvGaGHVHNJCWB9ooA8xAOC+531sVMzgw2O0eQ92aCxL50Apc8iMyQym+BuN8LrMwli39 zAU8RaKR6MVSqpPc9bpQ+XMJ6HmL0XXG0nnrI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Gi+7oNj5DXYcABYV+WNNo0TSJhmxYywZgqSo3aIBFsRhOb7bFmdZ6HGyuiLdZisJ08 z6QJg9T1dUoeizZXZb2khjDetaEs2uxHEtoGim8eBiAuIL+xfR8ZreuHsjDNEpy+JPYJ iVcF83QEdxA+iEJeBSBdERkKuix3aLyYtVca4= MIME-Version: 1.0 Received: by 10.14.119.9 with SMTP id m9mr2454183eeh.143.1307472086075; Tue, 07 Jun 2011 11:41:26 -0700 (PDT) Received: by 10.14.119.12 with HTTP; Tue, 7 Jun 2011 11:41:26 -0700 (PDT) In-Reply-To: <4DEE6E64.5010502@sysedata.no> References: <4DEE6E64.5010502@sysedata.no> Date: Wed, 8 Jun 2011 01:41:26 +0700 Message-ID: Subject: Re: Drag and Drop in TreeView - need to convert y coordinate? From: Chris Bartlett To: user@pivot.apache.org Content-Type: multipart/alternative; boundary=90e6ba1819b23e8b7704a52391e1 X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba1819b23e8b7704a52391e1 Content-Type: text/plain; charset=ISO-8859-1 http://apache-pivot-users.399431.n3.nabble.com/Drag-and-Drop-using-a-TreeView-as-the-DropTarget-td2657008.html On 8 June 2011 01:31, Edvin Syse wrote: > My TreeView has a DragSource and DropTarget used to allow moving nodes > around. In DropTarget#drop, I try to get the node the user dropped on like > this: > > Sequence.Tree.get(getTreeData(), getNodeAt(y)) > > .. but it seems y is relative to the window, and getNodeAt() expects > coordinates relative to the component (TreeView). Is there method to convert > the coordinates, or should I use another approach? > > -- Edvin > --90e6ba1819b23e8b7704a52391e1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable http://apache-pivot-users.3= 99431.n3.nabble.com/Drag-and-Drop-using-a-TreeView-as-the-DropTarget-td2657= 008.html

On 8 June 2011 01:31, Edvin Syse <edvin@sysedata.no>= wrote:
My TreeView has a DragSource and DropTarget used to allow moving nodes arou= nd. In DropTarget#drop, I try to get the node the user dropped on like this= :

Sequence.Tree.get(getTreeData(), getNodeAt(y))

.. but it seems y is relative to the window, and getNodeAt() expects coordi= nates relative to the component (TreeView). Is there method to convert the = coordinates, or should I use another approach?

-- Edvin

--90e6ba1819b23e8b7704a52391e1--