Exemple #1
0
 public int getPreviousImage() {
   int img;
   index.decrement();
   switch (index.getCounter()) {
     case 1:
       img = img1;
       break;
     case 2:
       img = img2;
       break;
     case 3:
       img = img3;
       break;
     case 4:
       img = img4;
       break;
     default:
       return 0;
   }
   System.out.println("index = " + index + "; prevImg()");
   return img;
 }
Exemple #2
0
 public int getImageByIndex() {
   switch (index.getCounter()) {
     case 1:
       return img1;
     case 2:
       return img2;
     case 3:
       return img3;
     case 4:
       return img4;
     default:
       return 0;
   }
 }
Exemple #3
0
 public int getIndex() {
   return index.getCounter();
 }