Random image selection
This commit is contained in:
parent
b3bcaa77bd
commit
0099fcbe51
@ -1,5 +1,9 @@
|
|||||||
package net.molez.mandlm.fotostream.server;
|
package net.molez.mandlm.fotostream.server;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||||
|
|
||||||
import net.molez.mandlm.fotostream.client.CurrentImageURLService;
|
import net.molez.mandlm.fotostream.client.CurrentImageURLService;
|
||||||
@ -9,6 +13,11 @@ public class CurrentImageURLServiceImpl extends RemoteServiceServlet implements
|
|||||||
{
|
{
|
||||||
public String getCurrentImageURL()
|
public String getCurrentImageURL()
|
||||||
{
|
{
|
||||||
return "img/dummy.jpg";
|
List<String> fileList = new ArrayList<String>();
|
||||||
|
|
||||||
|
fileList.add("img/dummy_1.jpg");
|
||||||
|
fileList.add("img/dummy_2.jpg");
|
||||||
|
|
||||||
|
return fileList.get(new Random().nextInt(fileList.size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 733 KiB After Width: | Height: | Size: 733 KiB |
BIN
war/img/dummy_2.jpg
Normal file
BIN
war/img/dummy_2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
Reference in New Issue
Block a user