Block jTree while executing procedure

Asked

Viewed 42 times

0

Good afternoon guys, I would like to know how I could block(not clickable) all of us in the tree while I perform a procedure, after that I would unlock the..

I found the class Jcheckboxtree and I am using, but I could not with setEnabled..

Following is a link to a question that references this one containing the code..

JCHECKBOXTREE CLASS CODE

Thank you...

  • Search for Swingworker, you’ll probably need to use this class.

  • But already using Swingworker, when I click to synchronize it activates the Swingworker and when it finishes it finishes, during this process I would like to block so that it is not possible to click on the tree, but still clickable. even though it has no effect on synchronization.

  • Then add the code you made. In the other question there is nothing swingworker.

  • Ah tah that was an example

  • Add only one [mcve], so it is possible to simulate and test the code, as in the other question.

  • Check if it helps, it’s my royal class, in which I use the jtree.....

  • It’s just that plus the class of the other question?

  • Ah tah, not that I used as a test, this is the real implementation..

  • Watch this video, how it works, while I’m synchronizing the checks get clicked... https://www.youtube.com/watch?v=ZqxMh2mZz-Q&feature=youtu.be

  • But the question code then is not reproducible. In order to make a good answer, as in the other case, you need to test the code as it is working. Without a [mcve] it’s almost impossible to suggest anything. If the functional code doesn’t fit here, post it on some website and add the link to the conference in question.

  • I’m new still do not understand the site well, and the class is within a large project...

  • There are several classes to work with

  • I will try to do based on the example of the other question. Any adaptation to your real code will be on your own, it can be?

  • Yes, thank you very much..

  • I was able to do it, but... I didn’t know if it was the right way.. I used a static variable Boolean and tested it in jtree class mouse event..

  • I honestly don’t know how to help you, you are using a custom jtree, which implies that to do this lock, you need to understand exactly how the jtree works that has been customized. But someone might come along to help you, with more understanding about this component, just wait :)

  • Thank you, no problem.. I really appreciate the help I’ve had...

Show 12 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.