mhframework.gui
Class MHGUIFileDialogScreen

java.lang.Object
  extended by mhframework.MHScreen
      extended by mhframework.gui.MHGUIDialogScreen
          extended by mhframework.gui.MHGUIFileDialogScreen
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, MHRenderable

public class MHGUIFileDialogScreen
extends MHGUIDialogScreen


Field Summary
 
Fields inherited from class mhframework.gui.MHGUIDialogScreen
_btnCancel, _btnOK, _messageFont, _titleFont, CANCEL_OPTION, OK_OPTION
 
Constructor Summary
MHGUIFileDialogScreen(java.lang.String directory)
          Creates a dialog screen listing all files in given directory.
MHGUIFileDialogScreen(java.lang.String directory, java.lang.String fileType)
          Creates a dialog screen listing files in the given directory having the extension specified by fileType.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 java.io.File getSelectedFile()
           
 void load()
          Set up a screen and prepare it to run.
static void main(java.lang.String[] args)
           
 void render(java.awt.Graphics2D g2d)
          Draws the GUI components onto the sent Graphics object.
 
Methods inherited from class mhframework.gui.MHGUIDialogScreen
advance, drawBackground, drawMessage, drawTitle, getBackgroundColor, getBackgroundImage, getMessage, getReturnCode, getTextColor, getTitle, getTitleColor, setBackgroundColor, setBackgroundImage, setButtonCaptions, setCancelButton, setMessage, setMessageFont, setOKButton, setTextColor, setTitle, setTitleColor, setTitleFont, unload
 
Methods inherited from class mhframework.MHScreen
add, centerText, getComponentList, getFocusedComponent, getNextScreen, getPreviousScreen, hideErrorMessage, isDisposable, isFinished, keyPressed, keyReleased, keyTyped, mouseClicked, mouseMoved, mousePressed, mouseReleased, nextFocusableComponent, prevFocusableComponent, remove, setDisposable, setFinished, setNextScreen, setPreviousScreen, showErrorMessage, tileImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MHGUIFileDialogScreen

public MHGUIFileDialogScreen(java.lang.String directory)
Creates a dialog screen listing all files in given directory.

Parameters:
directory -

MHGUIFileDialogScreen

public MHGUIFileDialogScreen(java.lang.String directory,
                             java.lang.String fileType)
Creates a dialog screen listing files in the given directory having the extension specified by fileType.

Parameters:
directory -
fileType -
Method Detail

load

public void load()
Description copied from class: MHScreen
Set up a screen and prepare it to run. This method is called before every time this screen is displayed.

Overrides:
load in class MHGUIDialogScreen

render

public void render(java.awt.Graphics2D g2d)
Description copied from class: MHScreen
Draws the GUI components onto the sent Graphics object. This method is intended to be overridden by methods that do their own specialized rendering, then call this base-class version to draw the components.

Specified by:
render in interface MHRenderable
Overrides:
render in class MHGUIDialogScreen
Parameters:
g2d - The Graphics object on which this object is to draw itself.

getSelectedFile

public java.io.File getSelectedFile()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class MHGUIDialogScreen

main

public static void main(java.lang.String[] args)