Ejemplo n.º 1
0
 void editFile() {
   String[] keys = peer.getModifiedFileNames();
   File f = peer.getModifiedFile(keys[modifiedFilesList.getSelectedIndex()]);
   String[] exec = {"cmd.exe", "/C", f.getPath()};
   try {
     Runtime.getRuntime().exec(exec);
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 2
0
  void selectPhoto() {
    int index = exhibitPhotosList.getSelectedIndex();
    String shortUrl = getCurrentExhibit().getPhotos()[index].shortUrl;

    if (peer.modifiedFileExists(shortUrl)) {
      exhibitPhotosImage.setImage(peer.getModifiedFile(shortUrl));
    } else {
      exhibitPhotosImage.setImage(shortUrl, peer.getFileInputStream("assets/" + shortUrl));
    }
    photoCaption.setText(getCurrentExhibit().getPhotos()[index].getCaption());
  }