pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@actian.com>
Subject RE: How to block UI input to a disabled/busy TreeNode
Date Thu, 09 Aug 2012 00:12:38 GMT
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:Roger.Whitcomb@actian.com] 
Sent: Wednesday, August 08, 2012 4:53 PM
To: user@pivot.apache.org
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:tripanonyr@gmail.com] 
Sent: Wednesday, August 08, 2012 4:29 PM
To: user@pivot.apache.org
Subject: Re: How to block UI input to a disabled/busy TreeNode

On Wed, Aug 8, 2012 at 7:16 PM, Roger L. Whitcomb <Roger.Whitcomb@actian.com> 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
Mime
View raw message