mardi 21 novembre 2017

dynamic adding and sorting check box in java GUI

I am now working on a Java GUI data visualization Project. The program should load a data file (20-300M), and paints curves according to the signals in the file. There are so many signals and in different data files and the occurence of these signals are also different.

e.g. I have two data files, names file1, file2. In file1, there are 3 signals that i want to paint (A, B, C), in file 2, there are only 2 signals (A, B).

In file1 Signal A occurs 10 times, B occurs 5 times, C occurs 4 times. In file2 Signal B occurs 20 times Signal A occurs 10 times. What i want to do is to generate check boxes (which are used to choose which Signal curve to Show on the Paint Panel) dynamically according to the signals, and sorting these check boxes according to their occurences.

That means, if i load file1, then check box of A should be on top then check box of B, at last check box of C. If i load file2 then check box of B should be on top then check box of A.

Is that possible to do that? I hope that my explaination makes sence. Thank you guys so much in advance!




Aucun commentaire:

Enregistrer un commentaire