com.partnersoft.gui
Class FileChooserControl

java.lang.Object
  extended by com.partnersoft.gui.FileChooserControl
All Implemented Interfaces:
GUIControl

public class FileChooserControl
extends java.lang.Object
implements GUIControl

A basic convenience wrapper around a JFileChooser.

Author:
Paul Reavis Copyright 2005 Partner Software, Inc.

Constructor Summary
FileChooserControl(java.lang.String extension, java.lang.String description)
           
 
Method Summary
 boolean choose(java.awt.Component parent)
           
 javax.swing.JComponent getGUI()
           
 javax.swing.JFileChooser getJFileChooser()
           
 java.io.File getSelectedFileRequireExtension()
           
 boolean isSaving()
          Returns true if this is a file saving control (as opposed to a file opening control).
 void setSaving(boolean tizit)
          Specify true if this is a file saving control (as opposed to a file opening control)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChooserControl

public FileChooserControl(java.lang.String extension,
                          java.lang.String description)
Method Detail

getGUI

public javax.swing.JComponent getGUI()
Specified by:
getGUI in interface GUIControl

getJFileChooser

public javax.swing.JFileChooser getJFileChooser()

isSaving

public boolean isSaving()
Returns true if this is a file saving control (as opposed to a file opening control).

Returns:
true if this is a file saving control, false if it is a file opening control

setSaving

public void setSaving(boolean tizit)
Specify true if this is a file saving control (as opposed to a file opening control)

Parameters:
tizit - true if this is a file saving control, false if it is a file opening control

choose

public boolean choose(java.awt.Component parent)

getSelectedFileRequireExtension

public java.io.File getSelectedFileRequireExtension()