BioLegato 0.7.0 GDE Canvas plugin

org.biolegato.gdesupport.canvas.colourmask
Class GDEColourMaskFile

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.biolegato.gdesupport.canvas.colourmask.ColourMaskReader
          extended by org.biolegato.gdesupport.canvas.colourmask.GDEColourMaskFile

public class GDEColourMaskFile
extends ColourMaskReader

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)
           
static java.awt.Color getDefaultColour(int number)
          Returns a standard colour from the properties
 java.lang.String getDescription()
           
 ColourMap[] readColourMapFile(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

readColourMapFile

public ColourMap[] readColourMapFile(java.io.File file)
Reads and parses a colour mask file.

Specified by:
readColourMapFile in class ColourMaskReader
Parameters:
file - the file to read.
Returns:
an array of colour masks defined by the file.

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

getDefaultColour

public static java.awt.Color getDefaultColour(int number)
Returns a standard colour from the properties

Parameters:
number - the colour number to retrieve from the pallet.
Returns:
the colour object corresponding to the number.

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.0 GDE Canvas plugin

Copyright © 2008-2010 University of Manitoba.