Java flow control and application flow

I have a Java application that downloads information (Entities) from our server. I use a download stream to load data.

The flow of the download process is as follows:

  • Login - User object uploaded
  • Based on User Entity, upload the List and Object Manager list in the community
  • Based on the Community drop down list, load and show 'Org Tree' in JTree
  • Based on your Node selection, load category objects and show in the drop-down list
  • Based on the category selection, load the sub-category objects and display them in the drop-down menu
  • Based on the selection of a subcategory, load a large dataset and save it

Downloading takes place in a stream, so the graphical interface is not "frozen". It also allows me to update the progress indicator.

I need help managing this process. The main problem is when I load entity data, I have to find a way to wait for the thread to complete before trying to get the object and proceed to the next step in the application thread.

So far, I have used the modal dialog to control the flow. I start the thread, print the modal, and then remove the modality when the thread is complete. Modal / thread - Observer / Observable, the thread changes the set when it is finished, and the dialog is located. The display of modality effectively stops the application flow so that it can wait for the download to complete.

. - . , , .

, , . "" , , .

: - /, , , , ?

, "" - , , , , , .

.

+5
3

"" , . , . "" - node, - treenode, GUI node.

node, "" - node . , node.

: . Download-Dialog of Firefox.

:).

0
source

All Articles