Changeset 4465
- Timestamp:
- 2003-06-03T16:25:09+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r4366 r4465 319 319 if(object instanceof CustomClassifier) { 320 320 CustomClassifier classifier = (CustomClassifier) object; 321 classifier.process(record); 321 if(!classifier.valueIsAdjusting()) { 322 classifier.process(record); 323 } 322 324 } 323 325 } … … 874 876 // Custom classifier 875 877 else { 876 if(custom_classifier.display(true)) { 877 assignClassifier(custom_classifier); 878 } 879 custom_classifier.destroy(); // Remove gui prompt or else. 880 custom_classifier = null; 878 // Spawn a new thread to handle this, as custom_classifiers can be processor heavy. 879 CustomClassifierTask task = new CustomClassifierTask(custom_classifier); 880 task.start(); 881 881 } 882 882 } … … 944 944 } 945 945 } 946 947 private class CustomClassifierTask 948 extends Thread { 949 950 private CustomClassifier custom_classifier; 951 952 CustomClassifierTask(CustomClassifier custom_classifier) { 953 this.custom_classifier = custom_classifier; 954 } 955 956 public void run() { 957 if(custom_classifier.display(true)) { 958 assignClassifier(custom_classifier); 959 } 960 custom_classifier.destroy(); // Remove gui prompt or else. 961 custom_classifier = null; 962 } 963 } 964 946 965 /** This class listens for actions upon the remove button in the controls, and if detected calls the removeClassifier() method. 947 966 */
Note:
See TracChangeset
for help on using the changeset viewer.