Okay, I think the thing to do is this:
myApp.startup(...) {
...
Theme.getTheme().set(TreeView.class, MyTreeSkin.class);
...
Then you don't need a MyTreeview class at all, and when you instantiate a
TreeView it will automatically get the MyTreeSkin as its skin....
See if that works.
~Roger
-----Original Message-----
From: Roger L. Whitcomb [mailto:[email protected]]
Sent: Wednesday, August 08, 2012 4:53 PM
To: [email protected]
Subject: RE: How to block UI input to a disabled/busy TreeNode
Yeah. Let me think about this. What I suggested works for some simpler
components that don't install their skins already (xxx extends Button for
instance, because Button is a fairly abstract class) but will not work for
TreeView. But I know others have done similar things, I'm just blanking out at
the moment on how to do it. *shame* I'll keep looking.
~Roger
-----Original Message-----
From: Josh R [mailto:[email protected]]
Sent: Wednesday, August 08, 2012 4:29 PM
To: [email protected]
Subject: Re: How to block UI input to a disabled/busy TreeNode
On Wed, Aug 8, 2012 at 7:16 PM, Roger L. Whitcomb <[email protected]>
wrote:
> Doh! Try this instead:
> public MyTree() {
> setTreeData(new ArrayList<Object>());
> setSkin(new MyTreeSkin());
> }
>
nope. same exception:
java.lang.IllegalStateException: Skin is already installed.
at org.apache.pivot.wtk.Component.setSkin(Component.java:764)
at org.apache.pivot.wtk.TreeView.setSkin(TreeView.java:941)
at com.foobar.proto.main_proto$MyTree.<init>(main_proto.java:91)
at com.foobar.proto.main_proto.create_hosts_tree(main_proto.java:664)
at com.foobar.proto.main_proto.startup(main_proto.java:836)
> ~Roger
thanks