dguitar.gui
Class FileLoaderHandler

java.lang.Object
  extended bydguitar.gui.FileLoaderHandler
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class FileLoaderHandler
extends java.lang.Object
implements java.awt.event.ActionListener

this class is listening for the FileLoader to finished or be canceled

Author:
Mauricio Gracia G

Field Summary
static int EMPTY
           
private  boolean evaluate
           
private  common.FileLoader fileLoader
           
private  java.lang.String fileName
           
private  int fileType
           
private  long finish
           
static int GUITAR_PRO
           
private  java.util.PropertyResourceBundle lang
           
static int MIDI
           
private  java.lang.String msg
           
private  DGuitar parent
           
private  javax.swing.ProgressMonitor progressMonitor
           
private  long start
           
private  javax.swing.Timer timer
           
 
Constructor Summary
FileLoaderHandler(DGuitar dguitar, java.lang.String aFileName, boolean Evaluate)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
private  void finishLoadAndDisplay(java.lang.String aFileName, byte[] bytes)
          this method is called when the file has been loaded into the byte array and must be displayed (for both GP or MID)
private  void setFileType(java.lang.String fileName)
          Sets the fileType field according to the fileName extension
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

private DGuitar parent

msg

private java.lang.String msg

fileName

private java.lang.String fileName

progressMonitor

private javax.swing.ProgressMonitor progressMonitor

fileLoader

private common.FileLoader fileLoader

lang

private java.util.PropertyResourceBundle lang

timer

private javax.swing.Timer timer

EMPTY

public static final int EMPTY
See Also:
Constant Field Values

GUITAR_PRO

public static final int GUITAR_PRO
See Also:
Constant Field Values

MIDI

public static final int MIDI
See Also:
Constant Field Values

fileType

private int fileType

evaluate

private boolean evaluate

start

private long start

finish

private long finish
Constructor Detail

FileLoaderHandler

public FileLoaderHandler(DGuitar dguitar,
                         java.lang.String aFileName,
                         boolean Evaluate)
Method Detail

start

public void start()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

finishLoadAndDisplay

private void finishLoadAndDisplay(java.lang.String aFileName,
                                  byte[] bytes)
this method is called when the file has been loaded into the byte array and must be displayed (for both GP or MID)


setFileType

private void setFileType(java.lang.String fileName)
Sets the fileType field according to the fileName extension

Parameters:
fileName -