Changeset 1267


Ignore:
Timestamp:
08/16/06 14:56:41 (14 years ago)
Author:
curtis
Message:

Update About dialog boxes to reflect new JAR package structure.

Location:
trunk/loci
Files:
2 added
3 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ImageViewer.java

    r1264 r1267  
    271271      // HACK - JOptionPane prevents shutdown on dispose 
    272272      setDefaultCloseOperation(EXIT_ON_CLOSE); 
    273       String title = "LOCI Bio-Formats"; 
    274       String msg = 
    275         "LOCI Bio-Formats with 4D Data Browser\n" + 
     273      JOptionPane.showMessageDialog(this, 
     274        "LOCI Bio-Formats\n" + 
    276275        "Built @date@\n\n" + 
    277276        "The Bio-Formats library is LOCI software written by\n" + 
    278277        "Melissa Linkert, Curtis Rueden, Chris Allan and Eric Kjellman.\n" + 
    279         "http://www.loci.wisc.edu/ome/formats.html\n\n" + 
    280         "The 4D Data Browser is LOCI software written by\n" + 
    281         "Francis Wong, Curtis Rueden and Melissa Linkert.\n" + 
    282         "http://www.loci.wisc.edu/4d/#browser"; 
    283       JOptionPane.showMessageDialog(this, msg, title, 
    284         JOptionPane.INFORMATION_MESSAGE); 
     278        "http://www.loci.wisc.edu/ome/formats.html", 
     279        "LOCI Bio-Formats", JOptionPane.INFORMATION_MESSAGE); 
    285280    } 
    286281  } 
  • trunk/loci/util/About.java

    r1260 r1267  
    2424package loci.util; 
    2525 
    26 import java.io.*; 
    2726import javax.swing.JOptionPane; 
    2827 
    29 /** 
    30  * About is a small program for displaying version information in a dialog box. 
    31  * It is intended to be used as a main class for JAR libraries to easily 
    32  * determine library version and build date. 
    33  */ 
     28/** Displays a small information dialog about this package. */ 
    3429public abstract class About { 
    3530 
    36   private static String title; 
    37   private static String msg; 
    38  
    39   public static void show() { 
    40     if (title == null) { 
    41       StringBuffer sb = new StringBuffer(); 
    42       try { 
    43         InputStream is = About.class.getResourceAsStream("about.txt"); 
    44         if (is == null) { 
    45           title = "About"; 
    46           msg = "Error: version information not found"; 
    47         } 
    48         else { 
    49           BufferedReader in = new BufferedReader(new InputStreamReader(is)); 
    50           while (true) { 
    51             String line = in.readLine(); 
    52             if (line == null) break; 
    53             if (title == null) title = "About " + line; 
    54             else sb.append("\n"); 
    55             sb.append(line); 
    56           } 
    57           in.close(); 
    58           msg = sb.toString(); 
    59         } 
    60       } 
    61       catch (IOException exc) { 
    62         if (title == null) title = "About"; 
    63         msg = "Error: could not read version information"; 
    64       } 
    65     } 
    66     JOptionPane.showMessageDialog(null, msg, 
    67       title, JOptionPane.INFORMATION_MESSAGE); 
    68   } 
    69  
    7031  public static void main(String[] args) { 
    71     show(); 
     32    JOptionPane.showMessageDialog(null, 
     33      "LOCI Common Classes\n" + 
     34      "Built @date@\n\n" + 
     35      "The LOCI common classes are LOCI software written by\n" + 
     36      "Curtis Rueden, for use with other LOCI software packages.", 
     37      "LOCI Common Classes", JOptionPane.INFORMATION_MESSAGE); 
    7238    System.exit(0); 
    7339  } 
Note: See TracChangeset for help on using the changeset viewer.