pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: TreeView Drop between nodes?
Date Wed, 08 Jun 2011 06:29:15 GMT
I was in the middle of writing a reply to you last night when there was a
power outage, but it seems you did exactly as I was going to suggest anyway!

On 8 June 2011 06:10, Edvin Syse <edvin@sysedata.no> wrote:

> How do I install a custom skin just for this TreeView? :)
Pivot only supports a single Skin for each Component.  If you want a
particular instance of a Component to have a different skin, you can extend
the Component and then register your custom skin against it in the Theme.

So you might create a MyTreeView which extends org.apache.pivot.wtk.TreeView
and a MyTerraTreeViewSkin which extends

Then you can add them to the Theme

See this thread

As Greg mentioned, it might be easier to write a custom Decorator and apply
it to the DropTarget (TreeView) when the dragEnter method is called.
org.apache.pivot.wtk.Manifest, int, org.apache.pivot.wtk.DropAction)

The Decorator might receive x & y coordinate updates from the DropTarget via
the dragMove method, or could listen to the ComponentMouseListener events
for the TreeView.
org.apache.pivot.wtk.Manifest, int, int, int,

It could use these coordinates along with the bounds of the nodes to
determine where to render the line.


View raw message