Changeset 1048
- Timestamp:
- 06/29/09 11:45:06 (4 years ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
mpdb-client/src/edu/rpi/metpetdb/client/ui/widgets/paging/columns/MultipleColumn.java (modified) (2 diffs)
-
mpdb-common/src/edu/rpi/metpetdb/client/model/MetamorphicGrade.java (modified) (2 diffs)
-
mpdb-common/src/edu/rpi/metpetdb/client/model/Reference.java (modified) (2 diffs)
-
mpdb-common/src/edu/rpi/metpetdb/client/model/Region.java (modified) (2 diffs)
-
mpdb-common/src/edu/rpi/metpetdb/client/model/SampleMineral.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mpdb-client/src/edu/rpi/metpetdb/client/ui/widgets/paging/columns/MultipleColumn.java
r946 r1048  2 2  3 3 import java.util.Collection;  4 import java.util.Set;  5 import java.util.TreeSet; 4 6  5 7 import edu.rpi.metpetdb.client.model.MObject; … …  23 25 String text = ""; 24 26 if (vals != null && vals.size() > 0) { 25  for(Object o : vals) {  27 //sort collection first  28 Set sortedSet = new TreeSet(vals);  29   30 for(Object o : sortedSet) { 26 31 text += o.toString() + ", "; 27 32 } -
trunk/mpdb-common/src/edu/rpi/metpetdb/client/model/MetamorphicGrade.java
r1021 r1048  5 5 import org.hibernate.search.annotations.Store; 6 6   7 import edu.rpi.metpetdb.client.model.properties.Property;  8  7 9 //import java.util.Set; 8 10  9  public class MetamorphicGrade extends MObject { 11 public class MetamorphicGrade extends MObject implements Comparable { 10 12 private static final long serialVersionUID = 1L; 11 13  … …  57 59 return id == 0; 58 60 }  61   62 public int compareTo(Object mg) {  63 if(!(mg instanceof MetamorphicGrade))  64 throw new ClassCastException("Metamorphic Grade object expected");  65 return this.getName().compareTo(((MetamorphicGrade) mg).getName());  66 } 59 67 } -
trunk/mpdb-common/src/edu/rpi/metpetdb/client/model/Reference.java
r1021 r1048  7 7 //import java.util.Set; 8 8  9  public class Reference extends MObject { 9 public class Reference extends MObject implements Comparable { 10 10 private static final long serialVersionUID = 1L; 11 11  … …  56 56 return id == 0; 57 57 }  58   59 public int compareTo(Object r) {  60 if(!(r instanceof Reference))  61 throw new ClassCastException("Reference object expected");  62 return this.getName().compareTo(((Reference) r).getName());  63 } 58 64 } -
trunk/mpdb-common/src/edu/rpi/metpetdb/client/model/Region.java
r1021 r1048  7 7 //import java.util.Set; 8 8  9  public class Region extends MObject { 9 public class Region extends MObject implements Comparable { 10 10 private static final long serialVersionUID = 1L; 11 11  … …  55 55 return id == 0; 56 56 }  57   58 public int compareTo(Object r) {  59 if(!(r instanceof Region))  60 throw new ClassCastException("Region object expected");  61 return this.getName().compareTo(((Region) r).getName());  62 } 57 63 } -
trunk/mpdb-common/src/edu/rpi/metpetdb/client/model/SampleMineral.java
r1027 r1048  6 6 import org.hibernate.search.annotations.Store; 7 7  8  public class SampleMineral extends MObject {  8 import edu.rpi.metpetdb.client.model.properties.Property;  9   10 public class SampleMineral extends MObject implements Comparable { 9 11 private static final long serialVersionUID = 1L; 10 12  … …  83 85 return false; 84 86 }  87   88 public int compareTo(Object sm) {  89 if(!(sm instanceof SampleMineral))  90 throw new ClassCastException("Sample Mineral object expected");  91 Mineral anotherMineral = ((SampleMineral) sm).getMineral();  92 return this.mineral.getName().compareTo(anotherMineral.getName());  93 } 85 94 }Â
