Changeset 7167 for branches/maven/projects/slimplugin
 Timestamp:
 11/05/10 21:38:39 (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/maven/projects/slimplugin/src/main/java/loci/slim/ui/UserInterfacePanel.java
r7139 r7167 90 90 private static final String ALL_REGION = "Each Pixel"; 91 91 92 private static final String PB_RLD_ALGORITHM = "Paul BarberNR RLD";93 private static final String PB_LMA_ALGORITHM = "Paul BarberNR LMA";92 private static final String GRAY_RLD_ALGORITHM = "Gray NR RLD"; 93 private static final String GRAY_LMA_ALGORITHM = "Gray NR LMA"; 94 94 private static final String JAOLHO_LMA_ALGORITHM = "Jaolho LMA"; 95 private static final String SLIM_CURVE_RLD_ALGORITHM = "SLIM 96 private static final String SLIM_CURVE_LMA_ALGORITHM = "SLIM 97 98 private static final String SINGLE_ COMPONENT= "Single Exponential";99 private static final String DOUBLE_ COMPONENT= "Double Exponential";100 private static final String TRIPLE_ COMPONENT= "Triple Exponential";101 private static final String STRETCH _COMPONENT= "Stretched Exponential";95 private static final String SLIM_CURVE_RLD_ALGORITHM = "SLIMCurve RLD"; 96 private static final String SLIM_CURVE_LMA_ALGORITHM = "SLIMCurve LMA"; 97 98 private static final String SINGLE_EXPONENTIAL = "Single Exponential"; 99 private static final String DOUBLE_EXPONENTIAL = "Double Exponential"; 100 private static final String TRIPLE_EXPONENTIAL = "Triple Exponential"; 101 private static final String STRETCHED_EXPONENTIAL = "Stretched Exponential"; 102 102 103 103 private static final String DO_FIT = "Do Fit"; … … 108 108 109 109 private static final String REGION_ITEMS[] = { SUM_REGION, ROIS_REGION, PIXEL_REGION, ALL_REGION }; 110 private static final String ALGORITHM_ITEMS[] = { JAOLHO_LMA_ALGORITHM, SLIM_CURVE_RLD_ALGORITHM, SLIM_CURVE_LMA_ALGORITHM };111 private static final String FUNCTION_ITEMS[] = { SINGLE_ COMPONENT, DOUBLE_COMPONENT, TRIPLE_COMPONENT};110 private static final String ALGORITHM_ITEMS[] = { JAOLHO_LMA_ALGORITHM, GRAY_RLD_ALGORITHM, GRAY_LMA_ALGORITHM, SLIM_CURVE_RLD_ALGORITHM, SLIM_CURVE_LMA_ALGORITHM }; 111 private static final String FUNCTION_ITEMS[] = { SINGLE_EXPONENTIAL, DOUBLE_EXPONENTIAL, TRIPLE_EXPONENTIAL, STRETCHED_EXPONENTIAL }; 112 112 113 113 public IUserInterfacePanelListener m_listener; 114 115 int m_fittedComponents = 0; 114 116 115 117 // UI panel … … 134 136 135 137 // single exponent fit 136 JTextField m_a 1Param1;137 JCheckBox m_a 1Fix1;138 JTextField m_t 1Param1;139 JCheckBox m_t 1Fix1;138 JTextField m_aParam1; 139 JCheckBox m_aFix1; 140 JTextField m_tParam1; 141 JCheckBox m_tFix1; 140 142 JTextField m_cParam1; 141 143 JCheckBox m_cFix1; … … 175 177 JCheckBox m_startParam3; 176 178 179 // stretched exonent fit 180 JTextField m_aParam4; 181 JCheckBox m_aFix4; 182 JTextField m_tParam4; 183 JCheckBox m_tFix4; 184 JTextField m_hParam4; 185 JCheckBox m_hFix4; 186 JTextField m_cParam4; 187 JCheckBox m_cFix4; 188 JTextField m_chiSqParam4; 189 JCheckBox m_startParam4; 190 177 191 JButton m_quitButton; 178 192 JButton m_fitButton; … … 202 216 // Create cards and the panel that contains the cards 203 217 m_cardPanel = new JPanel(new CardLayout()); 204 m_cardPanel.add(createSingleExponentialPanel(lifetimeLabel), SINGLE_COMPONENT); 205 m_cardPanel.add(createDoubleExponentialPanel(lifetimeLabel), DOUBLE_COMPONENT); 206 m_cardPanel.add(createTripleExponentialPanel(lifetimeLabel), TRIPLE_COMPONENT); 218 m_cardPanel.add(createSingleExponentialPanel(lifetimeLabel), SINGLE_EXPONENTIAL); 219 m_cardPanel.add(createDoubleExponentialPanel(lifetimeLabel), DOUBLE_EXPONENTIAL); 220 m_cardPanel.add(createTripleExponentialPanel(lifetimeLabel), TRIPLE_EXPONENTIAL); 221 m_cardPanel.add(createStretchedExponentialPanel(lifetimeLabel), STRETCHED_EXPONENTIAL); 207 222 m_cardPanel.setBorder(border("Params")); 208 223 innerPanel.add(m_cardPanel); … … 231 246 String text = (String)e.getActionCommand(); 232 247 if (text.equals("Do Fit")){ 248 enableAll(false); 233 249 setFitButtonState(false); 234 250 if (null != m_listener) { … … 277 293 278 294 public void reset() { 295 enableAll(true); 279 296 setFitButtonState(true); 280 297 } … … 308 325 CardLayout cl = (CardLayout)(m_cardPanel.getLayout()); 309 326 cl.show(m_cardPanel, (String)e.getItem()); 327 reconcileStartParam(); 310 328 } 311 329 } … … 322 340 } 323 341 342 /* 343 * Creates a panel that has some settings that control the fit. 344 */ 324 345 private JPanel createControlPanel() { 325 346 JPanel controlPanel = new JPanel(); … … 366 387 } 367 388 389 /* 390 * Creates panel for the single exponential version of the fit parameters. 391 */ 368 392 private JPanel createSingleExponentialPanel(String lifetimeLabel) { 369 393 JPanel expPanel = new JPanel(); … … 371 395 expPanel.setLayout(new SpringLayout()); 372 396 373 JLabel a 1Label1 = new JLabel("A");374 a 1Label1.setHorizontalAlignment(SwingConstants.RIGHT);375 expPanel.add(a 1Label1);376 m_a 1Param1 = new JTextField(9);397 JLabel aLabel1 = new JLabel("A"); 398 aLabel1.setHorizontalAlignment(SwingConstants.RIGHT); 399 expPanel.add(aLabel1); 400 m_aParam1 = new JTextField(9); 377 401 //m_a1Param1.setEditable(false); 378 expPanel.add(m_a 1Param1);379 m_a 1Fix1 = new JCheckBox("Fix");402 expPanel.add(m_aParam1); 403 m_aFix1 = new JCheckBox("Fix"); 380 404 //m_a1Fix1.addItemListener(this); 381 expPanel.add(m_a 1Fix1);405 expPanel.add(m_aFix1); 382 406 383 407 JLabel t1Label1 = new JLabel(lifetimeLabel); 384 408 t1Label1.setHorizontalAlignment(SwingConstants.RIGHT); 385 409 expPanel.add(t1Label1); 386 m_t 1Param1 = new JTextField(9);410 m_tParam1 = new JTextField(9); 387 411 //m_t1Param1.setEditable(false); 388 expPanel.add(m_t 1Param1);389 m_t 1Fix1 = new JCheckBox("Fix");412 expPanel.add(m_tParam1); 413 m_tFix1 = new JCheckBox("Fix"); 390 414 //m_t1Fix1.addItemListener(this); 391 expPanel.add(m_t 1Fix1);415 expPanel.add(m_tFix1); 392 416 393 417 JLabel cLabel1 = new JLabel("C"); … … 425 449 426 450 m_startParam1 = new JCheckBox("Use as starting parameters for fit"); 427 m_startParam1.setSelected(true);428 m_startParam1.setEnabled(false);451 m_startParam1.setSelected(true); 452 m_startParam1.setEnabled(false); 429 453 430 454 panel.add("South", m_startParam1); … … 432 456 } 433 457 458 /* 459 * Creates panel for the double exponential version of the fit parameters. 460 */ 434 461 private JPanel createDoubleExponentialPanel(String lifetimeLabel) { 435 462 JPanel expPanel = new JPanel(); … … 513 540 514 541 m_startParam2 = new JCheckBox("Use as starting parameters for fit"); 515 m_startParam2.setSelected(true);516 m_startParam2.setEnabled(false);542 m_startParam2.setSelected(true); 543 m_startParam2.setEnabled(false); 517 544 panel.add("South", m_startParam2); 518 545 return panel; 519 546 } 520 547 548 /* 549 * Creates panel for the triple exponential version of the fit parameters. 550 */ 521 551 private JPanel createTripleExponentialPanel(String lifetimeLabel) { 522 552 JPanel expPanel = new JPanel(); … … 623 653 624 654 m_startParam3 = new JCheckBox("Use as starting parameters for fit"); 625 m_startParam2.setSelected(true);626 m_startParam2.setEnabled(false);655 m_startParam3.setSelected(true); 656 m_startParam3.setEnabled(false); 627 657 panel.add("South", m_startParam3); 628 658 return panel; 629 659 } 660 661 /* 662 * Creates panel for the stretched exponential version of the fit parameters. 663 */ 664 private JPanel createStretchedExponentialPanel(String lifetimeLabel) { 665 JPanel expPanel = new JPanel(); 666 expPanel.setBorder(new EmptyBorder(0, 0, 8, 8)); 667 expPanel.setLayout(new SpringLayout()); 668 669 JLabel a1Label4 = new JLabel("A"); 670 a1Label4.setHorizontalAlignment(SwingConstants.RIGHT); 671 expPanel.add(a1Label4); 672 m_aParam4 = new JTextField(9); 673 //m_a1Param1.setEditable(false); 674 expPanel.add(m_aParam4); 675 m_aFix4 = new JCheckBox("Fix"); 676 //m_a1Fix1.addItemListener(this); 677 expPanel.add(m_aFix4); 678 679 JLabel tLabel4 = new JLabel(lifetimeLabel); 680 tLabel4.setHorizontalAlignment(SwingConstants.RIGHT); 681 expPanel.add(tLabel4); 682 m_tParam4 = new JTextField(9); 683 //m_t1Param1.setEditable(false); 684 expPanel.add(m_tParam4); 685 m_tFix4 = new JCheckBox("Fix"); 686 //m_t1Fix1.addItemListener(this); 687 expPanel.add(m_tFix4); 688 689 JLabel hLabel4 = new JLabel("H"); 690 hLabel4.setHorizontalAlignment(SwingConstants.RIGHT); 691 expPanel.add(hLabel4); 692 m_hParam4 = new JTextField(9); 693 //m_hParam4.setEditable(false); 694 expPanel.add(m_hParam4); 695 m_hFix4 = new JCheckBox("Fix"); 696 //m_hFix4.addItemListener(this); 697 expPanel.add(m_hFix4); 698 699 JLabel cLabel1 = new JLabel("C"); 700 cLabel1.setHorizontalAlignment(SwingConstants.RIGHT); 701 expPanel.add(cLabel1); 702 m_cParam4 = new JTextField(9); 703 //m_cParam1.setEditable(false); 704 expPanel.add(m_cParam4); 705 m_cFix4 = new JCheckBox("Fix"); 706 //m_cFix1.addItemListener(this); 707 expPanel.add(m_cFix4); 708 709 JLabel chiSqLabel4 = new JLabel("" + CHI + SQUARE); 710 chiSqLabel4.setHorizontalAlignment(SwingConstants.RIGHT); 711 expPanel.add(chiSqLabel4); 712 m_chiSqParam4 = new JTextField(9); 713 m_chiSqParam4.setEditable(false); 714 expPanel.add(m_chiSqParam4); 715 JLabel nullLabel1 = new JLabel(""); 716 expPanel.add(nullLabel1); 717 718 // SLIMPlotter look & feel: 719 //Color fixColor = m_a1Param1.getBackground(); 720 //Color floatColor = a1Label1.getBackground(); 721 //m_a1Param1.setBackground(floatColor); 722 //m_t1Param1.setBackground(floatColor); 723 //m_cParam1.setBackground(floatColor); 724 //m_chiSqParam1.setBackground(floatColor); 725 726 // rows, cols, initX, initY, xPad, yPad 727 SpringUtilities.makeCompactGrid(expPanel, 5, 3, 4, 4, 4, 4); 728 729 JPanel panel = new JPanel(new BorderLayout()); 730 panel.add("North", expPanel); 731 732 m_startParam4 = new JCheckBox("Use as starting parameters for fit"); 733 m_startParam4.setSelected(true); 734 m_startParam4.setEnabled(false); 735 736 panel.add("South", m_startParam4); 737 return panel; 630 738 } 631 739 … … 642 750 private boolean getFitButtonState() { 643 751 return m_fitButton.getText().equals(DO_FIT); 752 } 753 754 /* 755 * Disables and enables UI during and after a fit. 756 * 757 * @param enable 758 */ 759 private void enableAll(boolean enable) { 760 m_regionComboBox.setEnabled(enable); 761 m_algorithmComboBox.setEnabled(enable); 762 m_functionComboBox.setEnabled(enable); 763 764 // fit settings 765 m_xField.setEditable(enable); 766 m_yField.setEditable(enable); 767 m_startField.setEditable(enable); 768 m_stopField.setEditable(enable); 769 m_thresholdField.setEditable(enable); 770 771 // single exponent fit 772 m_aParam1.setEditable(enable); 773 m_aFix1.setEnabled(enable); 774 m_tParam1.setEditable(enable); 775 m_tFix1.setEnabled(enable); 776 m_cParam1.setEditable(enable); 777 m_cFix1.setEnabled(enable); 778 779 // double exponent fit 780 m_a1Param2.setEditable(enable); 781 m_a1Fix2.setEnabled(enable); 782 m_a2Param2.setEditable(enable); 783 m_a2Fix2.setEnabled(enable); 784 m_t1Param2.setEditable(enable); 785 m_t1Fix2.setEnabled(enable); 786 m_t2Param2.setEditable(enable); 787 m_t2Fix2.setEnabled(enable); 788 m_cParam2.setEditable(enable); 789 m_cFix2.setEnabled(enable); 790 791 // triple exponent fit 792 m_a1Param3.setEditable(enable); 793 m_a1Fix3.setEnabled(enable); 794 m_a2Param3.setEditable(enable); 795 m_a2Fix3.setEnabled(enable); 796 m_a3Param3.setEditable(enable); 797 m_a3Fix3.setEnabled(enable); 798 m_t1Param3.setEditable(enable); 799 m_t1Fix3.setEnabled(enable); 800 m_t2Param3.setEditable(enable); 801 m_t2Fix3.setEnabled(enable); 802 m_t3Param3.setEditable(enable); 803 m_t3Fix3.setEnabled(enable); 804 m_cParam3.setEditable(enable); 805 m_cFix3.setEnabled(enable); 806 807 // stretched exonent fit 808 m_aParam4.setEditable(enable); 809 m_aFix4.setEnabled(enable); 810 m_tParam4.setEditable(enable); 811 m_tFix4.setEnabled(enable); 812 m_hParam4.setEditable(enable); 813 m_hFix4.setEnabled(enable); 814 m_cParam4.setEditable(enable); 815 m_cFix4.setEnabled(enable); 816 817 if (enable) { 818 reconcileStartParam(); 819 } 644 820 } 645 821 … … 668 844 algorithm = FitAlgorithm.JAOLHO; 669 845 } 846 else if (selected.equals(GRAY_RLD_ALGORITHM)) { 847 algorithm = FitAlgorithm.BARBER2_RLD; 848 } 849 else if (selected.equals(GRAY_LMA_ALGORITHM)) { 850 algorithm = FitAlgorithm.BARBER2_LMA; 851 } 670 852 else if (selected.equals(SLIM_CURVE_RLD_ALGORITHM)) { 671 853 algorithm = FitAlgorithm.SLIMCURVE_RLD; … … 680 862 FitFunction function = null; 681 863 String selected = (String) m_functionComboBox.getSelectedItem(); 682 if (selected.equals(SINGLE_ COMPONENT)) {864 if (selected.equals(SINGLE_EXPONENTIAL)) { 683 865 function = FitFunction.SINGLE_EXPONENTIAL; 684 866 } 685 else if (selected.equals(DOUBLE_ COMPONENT)) {867 else if (selected.equals(DOUBLE_EXPONENTIAL)) { 686 868 function = FitFunction.DOUBLE_EXPONENTIAL; 687 869 } 688 else if (selected.equals(TRIPLE_ COMPONENT)) {870 else if (selected.equals(TRIPLE_EXPONENTIAL)) { 689 871 function = FitFunction.TRIPLE_EXPONENTIAL; 872 } 873 else if (selected.equals(STRETCHED_EXPONENTIAL)) { 874 function = FitFunction.STRETCHED_EXPONENTIAL; 690 875 } 691 876 return function; … … 735 920 int components = 0; 736 921 String function = (String) m_functionComboBox.getSelectedItem(); 737 if (function.equals(SINGLE_COMPONENT)) { 738 components = 1; 739 } 740 else if (function.equals(DOUBLE_COMPONENT)) { 741 components = 2; 742 } 743 else if (function.equals(TRIPLE_COMPONENT)) { 922 if (function.equals(SINGLE_EXPONENTIAL)) { 744 923 components = 3; 745 924 } 925 else if (function.equals(DOUBLE_EXPONENTIAL)) { 926 components = 5; 927 } 928 else if (function.equals(TRIPLE_EXPONENTIAL)) { 929 components = 7; 930 } 931 else if (function.equals(STRETCHED_EXPONENTIAL)) { 932 components = 4; 933 } 746 934 return components; 935 } 936 937 public void setFittedComponents(int components) { 938 m_fittedComponents = components; 747 939 } 748 940 … … 750 942 double parameters[] = null; 751 943 String function = (String) m_functionComboBox.getSelectedItem(); 752 if (function.equals(SINGLE_ COMPONENT)) {944 if (function.equals(SINGLE_EXPONENTIAL)) { 753 945 parameters = new double[3]; 754 parameters[0] = Double.valueOf(m_a 1Param1.getText());755 parameters[1] = Double.valueOf(m_t 1Param1.getText());946 parameters[0] = Double.valueOf(m_aParam1.getText()); 947 parameters[1] = Double.valueOf(m_tParam1.getText()); 756 948 parameters[2] = Double.valueOf(m_cParam1.getText()); 757 949 } 758 else if (function.equals(DOUBLE_ COMPONENT)) {950 else if (function.equals(DOUBLE_EXPONENTIAL)) { 759 951 parameters = new double[5]; 760 952 parameters[0] = Double.valueOf(m_a1Param2.getText()); … … 764 956 parameters[4] = Double.valueOf(m_cParam2.getText()); 765 957 } 766 else if (function.equals(TRIPLE_ COMPONENT)) {958 else if (function.equals(TRIPLE_EXPONENTIAL)) { 767 959 parameters = new double[7]; 768 960 parameters[0] = Double.valueOf(m_a1Param3.getText()); … … 774 966 parameters[6] = Double.valueOf(m_cParam3.getText()); 775 967 } 968 else if (function.equals(STRETCHED_EXPONENTIAL)) { 969 parameters = new double[4]; 970 parameters[0] = Double.valueOf(m_aParam4.getText()); 971 parameters[1] = Double.valueOf(m_tParam4.getText()); 972 parameters[2] = Double.valueOf(m_hParam4.getText()); 973 parameters[3] = Double.valueOf(m_cParam4.getText()); 974 } 776 975 return parameters; 777 976 } … … 779 978 public void setParameters(double params[]) { 780 979 String function = (String) m_functionComboBox.getSelectedItem(); 781 if (function.equals(SINGLE_ COMPONENT)) {782 m_a 1Param1.setText("" + (float) params[0]);783 m_t 1Param1.setText("" + (float) params[1]);980 if (function.equals(SINGLE_EXPONENTIAL)) { 981 m_aParam1.setText("" + (float) params[0]); 982 m_tParam1.setText("" + (float) params[1]); 784 983 m_cParam1.setText( "" + (float) params[2]); 785 984 } 786 else if (function.equals(DOUBLE_ COMPONENT)) {985 else if (function.equals(DOUBLE_EXPONENTIAL)) { 787 986 m_a1Param2.setText("" + (float) params[0]); 788 987 m_t1Param2.setText("" + (float) params[1]); … … 791 990 m_cParam2.setText( "" + (float) params[4]); 792 991 } 793 else if (function.equals(TRIPLE_ COMPONENT)) {992 else if (function.equals(TRIPLE_EXPONENTIAL)) { 794 993 m_a1Param3.setText("" + (float) params[0]); 795 994 m_t1Param3.setText("" + (float) params[1]); … … 800 999 m_cParam3.setText( "" + (float) params[6]); 801 1000 } 1001 else if (function.equals(STRETCHED_EXPONENTIAL)) { 1002 m_aParam4.setText("" + (float) params[0]); 1003 m_tParam4.setText("" + (float) params[1]); 1004 m_hParam4.setText("" + (float) params[2]); 1005 m_cParam4.setText("" + (float) params[3]); 1006 } 802 1007 } 803 1008 … … 805 1010 switch (function) { 806 1011 case 0: 807 m_a 1Param1.setText("" + (float) params[0]);808 m_t 1Param1.setText("" + (float) params[1]);1012 m_aParam1.setText("" + (float) params[0]); 1013 m_tParam1.setText("" + (float) params[1]); 809 1014 m_cParam1.setText( "" + (float) params[2]); 810 1015 break; … … 825 1030 m_cParam3.setText( "" + (float) params[6]); 826 1031 break; 1032 case 3: 1033 m_aParam4.setText("" + (float) params[0]); 1034 m_tParam4.setText("" + (float) params[1]); 1035 m_hParam4.setText("" + (float) params[2]); 1036 m_cParam4.setText("" + (float) params[3]); 1037 break; 827 1038 } 828 1039 } … … 831 1042 boolean free[] = null; 832 1043 String function = (String) m_functionComboBox.getSelectedItem(); 833 if (function.equals(SINGLE_ COMPONENT)) {1044 if (function.equals(SINGLE_EXPONENTIAL)) { 834 1045 free = new boolean[3]; 835 free[0] = !m_a 1Fix1.isSelected();836 free[1] = !m_t 1Fix1.isSelected();1046 free[0] = !m_aFix1.isSelected(); 1047 free[1] = !m_tFix1.isSelected(); 837 1048 free[2] = !m_cFix1.isSelected(); 838 1049 } 839 else if (function.equals(DOUBLE_ COMPONENT)) {1050 else if (function.equals(DOUBLE_EXPONENTIAL)) { 840 1051 free = new boolean[5]; 841 1052 free[0] = !m_a1Fix2.isSelected(); … … 845 1056 free[4] = !m_cFix2.isSelected(); 846 1057 } 847 else if (function.equals(TRIPLE_ COMPONENT)) {1058 else if (function.equals(TRIPLE_EXPONENTIAL)) { 848 1059 free = new boolean[7]; 849 1060 free[0] = !m_a1Fix3.isSelected(); … … 856 1067 857 1068 } 1069 else if (function.equals(STRETCHED_EXPONENTIAL)) { 1070 free = new boolean[4]; 1071 free[0] = !m_aFix4.isSelected(); 1072 free[1] = !m_tFix4.isSelected(); 1073 free[2] = !m_hFix4.isSelected(); 1074 free[3] = !m_cFix4.isSelected(); 1075 } 858 1076 return free; 859 1077 } … … 861 1079 public void setChiSquare(double chiSquare) { 862 1080 String function = (String) m_functionComboBox.getSelectedItem(); 863 if (function.equals(SINGLE_ COMPONENT)) {1081 if (function.equals(SINGLE_EXPONENTIAL)) { 864 1082 m_chiSqParam1.setText("" + (float) chiSquare); 865 1083 } 866 else if (function.equals(DOUBLE_ COMPONENT)) {1084 else if (function.equals(DOUBLE_EXPONENTIAL)) { 867 1085 m_chiSqParam2.setText("" + (float) chiSquare); 868 1086 } 869 else if (function.equals(TRIPLE_ COMPONENT)) {1087 else if (function.equals(TRIPLE_EXPONENTIAL)) { 870 1088 m_chiSqParam3.setText("" + (float) chiSquare); 871 } 1089 } 1090 else if (function.equals(STRETCHED_EXPONENTIAL)) { 1091 m_chiSqParam4.setText("" + (float) chiSquare); 1092 } 1093 } 1094 1095 public boolean refineFit() { 1096 JCheckBox checkBox = null; 1097 String function = (String) m_functionComboBox.getSelectedItem(); 1098 if (function.equals(SINGLE_EXPONENTIAL)) { 1099 checkBox = m_startParam1; 1100 } 1101 else if (function.equals(DOUBLE_EXPONENTIAL)) { 1102 checkBox = m_startParam2; 1103 } 1104 else if (function.equals(TRIPLE_EXPONENTIAL)) { 1105 checkBox = m_startParam3; 1106 } 1107 else if (function.equals(STRETCHED_EXPONENTIAL)) { 1108 checkBox = m_startParam4; //TODO use an array of checkboxes, etc. 1109 } 1110 return !checkBox.isSelected(); 872 1111 } 873 1112 … … 882 1121 return value; 883 1122 } 1123 1124 void reconcileStartParam() { 1125 boolean enable = (m_fittedComponents == getComponents()); 1126 m_startParam1.setEnabled(enable); 1127 m_startParam2.setEnabled(enable); 1128 m_startParam3.setEnabled(enable); 1129 m_startParam4.setEnabled(enable); 1130 } 884 1131 }
Note: See TracChangeset
for help on using the changeset viewer.