Changeset 1401


Ignore:
Timestamp:
08/31/06 16:03:53 (14 years ago)
Author:
curtis
Message:

More style fixes.

Location:
trunk/loci/formats
Files:
14 edited

Legend:

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

    r1388 r1401  
    3636 * @author Melissa Linkert linkert at cs.wisc.edu 
    3737 */ 
    38 public abstract class Compression { 
     38public final class Compression { 
    3939 
    4040  // -- Constants -- 
  • trunk/loci/formats/DataTools.java

    r1388 r1401  
    3333 * @author Curtis Rueden ctrueden at wisc.edu 
    3434 */ 
    35 public abstract class DataTools { 
     35public final class DataTools { 
    3636 
    3737  // -- Constructor -- 
  • trunk/loci/formats/FormatHandler.java

    r1264 r1401  
    6565  /** Creates JFileChooser file filters for this file format. */ 
    6666  protected void createFilters() { 
    67     filters = new FileFilter[] { new ExtensionFileFilter(suffixes, format) }; 
     67    filters = new FileFilter[] {new ExtensionFileFilter(suffixes, format)}; 
    6868  } 
    6969 
  • trunk/loci/formats/FormatReader.java

    r1399 r1401  
    301301        origSizeC + ", sizeT=" + sizeT + ", total=" + num); 
    302302    } 
    303     /* 
    304     sizeZ = 5 
    305     sizeC = 6 
    306     sizeT = 7 
    307     z = 2 
    308     c = 1 
    309     t = 4 
    310     num = 210 
    311     */ 
    312303 
    313304    // assign rasterization order 
  • trunk/loci/formats/IFormatHandler.java

    r1264 r1401  
    2828import javax.swing.filechooser.FileFilter; 
    2929 
     30/** Interface for all biological file format readers and writers. */ 
    3031public interface IFormatHandler { 
    31   /** 
    32    * Checks if the given string is a valid filename for this file format. 
    33    */ 
     32 
     33  /** Checks if the given string is a valid filename for this file format. */ 
    3434  boolean isThisType(String name); 
    3535 
     
    4545  /** Gets a JFileChooser that recognizes accepted file types. */ 
    4646  JFileChooser getFileChooser(); 
     47 
    4748} 
  • trunk/loci/formats/IFormatReader.java

    r1386 r1401  
    2929import java.util.Hashtable; 
    3030 
    31 /** Abstract superclass of all biological file format readers. */ 
     31/** Interface for all biological file format readers. */ 
    3232public interface IFormatReader extends IFormatHandler { 
     33 
    3334  /** Checks if the given block is a valid header for this file format. */ 
    3435  boolean isThisType(byte[] block); 
    3536 
    3637  /** Determines the number of images in the given file. */ 
    37   int getImageCount(String id) 
    38     throws FormatException, IOException; 
     38  int getImageCount(String id) throws FormatException, IOException; 
    3939 
    4040  /** Checks if the images in the file are RGB. */ 
    41   boolean isRGB(String id) 
    42     throws FormatException, IOException; 
     41  boolean isRGB(String id) throws FormatException, IOException; 
    4342 
    4443  /** Get the size of the X dimension. */ 
     
    6261  /** Get the size of the Y dimension for the thumbnail. */ 
    6362  int getThumbSizeY(String id) throws FormatException, IOException; 
    64    
     63 
    6564  /** Return true if the data is in little-endian format. */ 
    66   boolean isLittleEndian(String id) 
    67     throws FormatException, IOException; 
     65  boolean isLittleEndian(String id) throws FormatException, IOException; 
    6866 
    6967  /** 
     
    7169   * within the file. 
    7270   */ 
    73   String getDimensionOrder(String id) 
    74     throws FormatException, IOException; 
     71  String getDimensionOrder(String id) throws FormatException, IOException; 
    7572 
    7673  /** Obtains the specified image from the given file. */ 
     
    8178   * Obtains the specified image from the given file as a byte array. 
    8279   */ 
    83   byte[] openBytes(String id, int no) 
    84     throws FormatException, IOException; 
     80  byte[] openBytes(String id, int no) throws FormatException, IOException; 
    8581 
    8682  /** Obtains a thumbnail for the specified image from the given file. */ 
     
    9288   * as a byte array. 
    9389   */ 
    94   byte[] openThumbBytes(String id, int no) 
    95     throws FormatException, IOException; 
     90  byte[] openThumbBytes(String id, int no) throws FormatException, IOException; 
    9691 
    9792  /** Closes the currently open file. */ 
     
    10398   * @return Java Images containing pixel data 
    10499   */ 
    105   BufferedImage[] openImage(String id) 
    106     throws FormatException, IOException; 
     100  BufferedImage[] openImage(String id) throws FormatException, IOException; 
    107101 
    108102  /** Return the number of series in this file. */ 
     
    136130   * to the given rasterized index value. 
    137131   */ 
    138   int[] getZCTCoords(String id, int index) 
    139     throws FormatException, IOException; 
     132  int[] getZCTCoords(String id, int index) throws FormatException, IOException; 
    140133 
    141134  /** 
     
    170163   * @return a metadata store implementation. 
    171164   */ 
    172   MetadataStore getMetadataStore(String id) 
    173     throws FormatException, IOException; 
     165  MetadataStore getMetadataStore(String id) throws FormatException, IOException; 
    174166 
    175167  /** 
     
    184176   * unsupported type. 
    185177   */ 
    186   Object getMetadataStoreRoot(String id) 
    187     throws FormatException, IOException; 
     178  Object getMetadataStoreRoot(String id) throws FormatException, IOException; 
    188179 
    189180  /** 
     
    192183   */ 
    193184  boolean testRead(String[] args) throws FormatException, IOException; 
     185 
    194186} 
  • trunk/loci/formats/ImageReader.java

    r1386 r1401  
    120120   * <code>readerClasses</code>). 
    121121   */ 
    122   private void initializeReaders() 
    123   { 
     122  private void initializeReaders() { 
    124123    // add built-in readers to the list 
    125124    Vector v = new Vector(); 
     
    244243 
    245244  /** Return true if the data is in little-endian format. */ 
    246   public boolean isLittleEndian(String id) throws FormatException, IOException 
    247   { 
     245  public boolean isLittleEndian(String id) throws FormatException, IOException { 
    248246    if (!id.equals(currentId)) initFile(id); 
    249247    return readers[index].isLittleEndian(id); 
     
    254252   * within the file. 
    255253   */ 
    256   public String getDimensionOrder(String id) throws FormatException, IOException 
     254  public String getDimensionOrder(String id) 
     255    throws FormatException, IOException 
    257256  { 
    258257    if (!id.equals(currentId)) initFile(id); 
     
    283282   * image plane, it will be left as RGB and not split into 3 separate planes. 
    284283   */ 
    285   public void setSeparated(boolean separate) 
    286   { 
     284  public void setSeparated(boolean separate) { 
    287285    for (int i = 0; i < readers.length; i++) 
    288286      readers[i].setSeparated(separate); 
     
    388386          continue; 
    389387        } 
    390         catch (Exception e ) { } 
     388        catch (Exception e) { } 
    391389        System.out.print("Checking file format "); 
    392390        System.out.println("[" + getFormat(arg) + "]"); 
     
    534532   * @return the current active reader. 
    535533   */ 
    536   private IFormatReader currentReader() 
    537   { 
    538     return readers[index]; 
    539   } 
     534  private IFormatReader currentReader() { return readers[index]; } 
    540535 
    541536  // -- Main method -- 
  • trunk/loci/formats/ImageTester.java

    r1264 r1401  
    103103    int wpad = 50, hpad = 100; 
    104104    int w = (screen.width - wpad) / chan.length; 
    105     int h = (screen.height - hpad) / 6;//9; 
     105    int h = (screen.height - hpad) / 6; //9; 
    106106    System.out.println("Using images of size " + w + " x " + h); 
    107107    int size = w * h; 
  • trunk/loci/formats/ImageTools.java

    r1327 r1401  
    3838 * @author Curtis Rueden ctrueden at wisc.edu 
    3939 */ 
    40 public abstract class ImageTools { 
     40public final class ImageTools { 
    4141 
    4242  // -- Constants -- 
     
    4545  protected static final Component OBS = new Container(); 
    4646 
     47  // -- Constructor -- 
     48 
     49  private ImageTools() { } 
    4750 
    4851  // -- Image construction -- 
  • trunk/loci/formats/MetadataStore.java

    r1357 r1401  
    5858   * unsupported or unknown type. 
    5959   */ 
    60   void setRoot(Object root) throws IllegalArgumentException; 
     60  void setRoot(Object root); 
    6161 
    6262  /** 
     
    220220   * <a href="http://cvs.openmicroscopy.org.uk/tiki/tiki-index.php?page=DataModelProposal#id119301">here</a>. 
    221221   * 
    222    * @param numZ the optical section index. 
    223    * @param numC the channel index. 
    224    * @param numT the timepoint. 
     222   * @param theZ the optical section index. 
     223   * @param theC the channel index. 
     224   * @param theT the timepoint. 
    225225   * @param timestamp the time of acquisition in seconds of the plane (section) 
    226226   * with zero being the start of acquistion. 
  • trunk/loci/formats/OMEUpload.java

    r1376 r1401  
    55/* 
    66LOCI Bio-Formats package for reading and converting biological file formats. 
    7 Copyright (C) 2005-2006 Melissa Linkert, Curtis Rueden, Chris Allan 
     7Copyright (C) 2005-@year@ Melissa Linkert, Curtis Rueden, Chris Allan 
    88and Eric Kjellman. 
    99 
     
    460460 
    461461  /** Build a multipart form request and send to the server. */ 
    462   private String buildMultipart(Vector keys, Vector values) throws IOException 
    463   { 
     462  private String buildMultipart(Vector keys, Vector values) throws IOException { 
    464463    String boundary = 
    465464      "------------------------------" + System.currentTimeMillis(); 
  • trunk/loci/formats/TiffIFDEntry.java

    r1294 r1401  
    4949  private int valueOffset; 
    5050 
    51   public TiffIFDEntry (int tag, int type, int valueCount, int valueOffset) { 
     51  public TiffIFDEntry(int tag, int type, int valueCount, int valueOffset) { 
    5252    this.tag = tag; 
    5353    this.type = type; 
  • trunk/loci/formats/TiffRational.java

    r1264 r1401  
    3333  protected long numer, denom; 
    3434 
    35  
    3635  // -- Constructor -- 
    3736 
     
    4140    this.denom = denom; 
    4241  } 
    43  
    4442 
    4543  // -- TiffRational API methods -- 
     
    6765  } 
    6866 
    69  
    7067  // -- Number API methods -- 
    7168 
     
    9087  public short shortValue() { return (short) longValue(); } 
    9188 
    92  
    9389  // -- Object API methods -- 
    9490 
     
    9692  public boolean equals(Object o) { return compareTo(o) == 0; } 
    9793 
     94  /** Reasonable hash value for use with hashtables. */ 
     95  public int hashCode() { return (int) (numer - denom); } 
     96 
    9897  /** Returns a string representation of the object. */ 
    9998  public String toString() { return numer + "/" + denom; } 
    100  
    10199 
    102100  // -- Comparable API methods -- 
  • trunk/loci/formats/UnknownTagException.java

    r1294 r1401  
     1// 
     2// UnknownTagException.java 
     3// 
     4 
     5/* 
     6LOCI Bio-Formats package for reading and converting biological file formats. 
     7Copyright (C) 2005-@year@ Melissa Linkert, Curtis Rueden, Chris Allan 
     8and Eric Kjellman. 
     9 
     10This program is free software; you can redistribute it and/or modify 
     11it under the terms of the GNU Library General Public License as published by 
     12the Free Software Foundation; either version 2 of the License, or 
     13(at your option) any later version. 
     14 
     15This program is distributed in the hope that it will be useful, 
     16but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18GNU Library General Public License for more details. 
     19 
     20You should have received a copy of the GNU Library General Public License 
     21along with this program; if not, write to the Free Software 
     22Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     23*/ 
     24 
    125package loci.formats; 
    226 
     
    630 * @author Chris Allan callan at blackcat.ca 
    731 */ 
    8 public class UnknownTagException extends RuntimeException { 
    9  
    10 } 
     32public class UnknownTagException extends RuntimeException { } 
Note: See TracChangeset for help on using the changeset viewer.