Last change
on this file since 83 was 83, checked in by Wouter Pasman, 7 years ago |
#28 added first version of uncertainty panel. Not yet attached to save
|
File size:
1.1 KB
|
Rev | Line | |
---|
[83] | 1 | package genius.gui.tree;
|
---|
| 2 |
|
---|
| 3 | import javax.swing.SpinnerModel;
|
---|
| 4 | import javax.swing.SpinnerNumberModel;
|
---|
| 5 |
|
---|
| 6 | import genius.gui.panels.BooleanModel;
|
---|
| 7 |
|
---|
| 8 | /**
|
---|
| 9 | * Holds the uncertainty settings (while editing a profile)
|
---|
| 10 | */
|
---|
| 11 | public class UncertaintySettingsModel {
|
---|
| 12 | private BooleanModel isEnabled = new BooleanModel(false);
|
---|
| 13 | private SpinnerModel comparisons;
|
---|
| 14 | private SpinnerModel errors;
|
---|
| 15 | private BooleanModel isExperimental = new BooleanModel(false);
|
---|
| 16 | private long totalBids;
|
---|
| 17 |
|
---|
| 18 | /**
|
---|
| 19 | * @oaran nbids the number of bids in the space.
|
---|
| 20 | */
|
---|
| 21 | public UncertaintySettingsModel(long nbids) {
|
---|
| 22 | totalBids = nbids;
|
---|
| 23 | comparisons = new SpinnerNumberModel(0, 0, nbids, 1);
|
---|
| 24 | errors = new SpinnerNumberModel(0, 0, nbids, 1.);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | public SpinnerModel getComparisons() {
|
---|
| 28 | return comparisons;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | public SpinnerModel getErrors() {
|
---|
| 32 | return errors;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | public BooleanModel getIsExperimental() {
|
---|
| 36 | return isExperimental;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | public BooleanModel getIsEnabled() {
|
---|
| 40 | return isEnabled;
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | /**
|
---|
| 44 | *
|
---|
| 45 | * @return total number of bids in the domain as received in constructor
|
---|
| 46 | */
|
---|
| 47 | public long getTotalBids() {
|
---|
| 48 | return totalBids;
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.