org.basex.gui.layout
Class BaseXFileChooser

java.lang.Object
  extended by org.basex.gui.layout.BaseXFileChooser

public final class BaseXFileChooser
extends java.lang.Object

Project specific File Chooser implementation.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Christian Gruen

Nested Class Summary
static class BaseXFileChooser.Mode
          File Dialog Mode.
 
Constructor Summary
BaseXFileChooser(java.lang.String title, java.lang.String path, javax.swing.JFrame par)
          Default Constructor.
 
Method Summary
 void addFilter(java.lang.String suf, java.lang.String dsc)
          Sets a file filter.
 java.lang.String getDir()
          Returns the selected directory.
 IO getFile()
          Returns the selected file.
 boolean select(BaseXFileChooser.Mode type)
          Selects a file or directory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseXFileChooser

public BaseXFileChooser(java.lang.String title,
                        java.lang.String path,
                        javax.swing.JFrame par)
Default Constructor.

Parameters:
title - dialog title
path - initial path
par - parent reference
Method Detail

addFilter

public void addFilter(java.lang.String suf,
                      java.lang.String dsc)
Sets a file filter.

Parameters:
suf - suffix
dsc - description

select

public boolean select(BaseXFileChooser.Mode type)
Selects a file or directory.

Parameters:
type - type defined by BaseXFileChooser.Mode
Returns:
file or directory

getFile

public IO getFile()
Returns the selected file.

Returns:
file

getDir

public java.lang.String getDir()
Returns the selected directory.

Returns:
directory