/[projects]/android/Side9/src/dk/thoerup/side9/ImageEntry.java
ViewVC logotype

Contents of /android/Side9/src/dk/thoerup/side9/ImageEntry.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1185 - (show annotations) (download)
Tue Nov 2 17:08:57 2010 UTC (13 years, 6 months ago) by torben
File size: 750 byte(s)
Add options for sorting the images

Bumb version to 17
1 package dk.thoerup.side9;
2
3 import java.io.Serializable;
4 import java.util.Comparator;
5
6 import android.graphics.Bitmap;
7
8 public class ImageEntry implements Serializable {
9 private static final long serialVersionUID = 1L;
10
11 public String path;
12 public transient Bitmap thumb; //do not serialize
13 public String caption;
14
15
16 public static class PathComparator implements Comparator<ImageEntry> {
17 @Override
18 public int compare(ImageEntry object1, ImageEntry object2) {
19 return object1.path.compareTo(object2.path) * -1;
20 }
21 }
22
23 public static class CaptionComparator implements Comparator<ImageEntry> {
24 @Override
25 public int compare(ImageEntry object1, ImageEntry object2) {
26 return object1.caption.compareTo( object2.caption );
27 }
28
29 }
30
31 }

  ViewVC Help
Powered by ViewVC 1.1.20