BioLegato 0.7.5 GDE plugin

org.biolegato.gdesupport.files
Class GDEColourMaskFile

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.biolegato.gdesupport.files.GDEColourMaskFile

public final class GDEColourMaskFile
extends javax.swing.filechooser.FileFilter

Used to select colour masks.

Author:
Graham Alvare, Brian Fristensky

Constructor Summary
GDEColourMaskFile()
          Creates a new instance of GDEColourMaskFile
 
Method Summary
 boolean accept(java.io.File f)
           
 java.lang.String getDescription()
           
static ColourMask readColourMaskFile(java.io.File file)
          Reads and parses a colour mask file.
static int stringToInt(java.lang.String s)
          Converts a string to an integer (note: returns 0 on failure).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GDEColourMaskFile

public GDEColourMaskFile()
Creates a new instance of GDEColourMaskFile

Method Detail

accept

public boolean accept(java.io.File f)
Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.filechooser.FileFilter

readColourMaskFile

public static ColourMask readColourMaskFile(java.io.File file)
                                     throws java.io.IOException
Reads and parses a colour mask file.

Parameters:
file - the file to read.
Returns:
an array of colour masks defined by the file.
Throws:
java.io.IOException

stringToInt

public static int stringToInt(java.lang.String s)
Converts a string to an integer (note: returns 0 on failure).

Parameters:
s - the string to convert.
Returns:
the integer representation of the string, 0 on failure.

BioLegato 0.7.5 GDE plugin

Copyright © 2008-2011 University of Manitoba.