databionics.io
Class ColorTable

java.lang.Object
  extended by databionics.io.BaseFile
      extended by databionics.io.ListFile
          extended by databionics.io.ColorTable

public class ColorTable
extends ListFile

File that stores a color table from *.rgb files. Should really be RGBFile, but color table is more intuitive.


Field Summary
protected static org.apache.log4j.Logger log
          Log4j logging.
 
Fields inherited from class databionics.io.ListFile
data
 
Fields inherited from class databionics.io.BaseFile
allowEmptyLines, comment, commentPrefix, delimiter, delimiters, file, header, headerPrefix, loc, nf
 
Constructor Summary
ColorTable()
          Standard constructor
ColorTable(java.lang.String filename)
          Constructor with a filename
 
Method Summary
protected  java.lang.String buildLine(int row)
          Get line for file.
 java.awt.Color getColor(int i)
           
static FileType getFileType()
          Get the type of file.
protected  void parseLine(int row, java.lang.String line)
          Parse a line.
 void setFilename(java.lang.String filename)
          Change the name of the file.
 
Methods inherited from class databionics.io.ListFile
getData, getSize, setData
 
Methods inherited from class databionics.io.BaseFile
buildHeader, checkHeader, checkHeaderAgainstSize, getComment, getFile, getFilename, getHeader, getLocale, getNumberFormat, init, isHeader, isNaN, isNumber, load, load, parseError, parseHeader, save, save, setComment, setLocale, writeStringList, writeStringList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Log4j logging.

Constructor Detail

ColorTable

public ColorTable()
Standard constructor


ColorTable

public ColorTable(java.lang.String filename)
Constructor with a filename

Parameters:
filename - Name of the file
Method Detail

setFilename

public void setFilename(java.lang.String filename)
Change the name of the file.

Overrides:
setFilename in class BaseFile

parseLine

protected void parseLine(int row,
                         java.lang.String line)
Parse a line.

Overrides:
parseLine in class BaseFile
Parameters:
row - Number of current line.
line - Current line.

buildLine

protected java.lang.String buildLine(int row)
Get line for file.

Overrides:
buildLine in class ListFile
Parameters:
row - Number of current line.
Returns:
Line with that number.

getFileType

public static FileType getFileType()
Get the type of file.


getColor

public java.awt.Color getColor(int i)


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.