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-07, ISC License, Christian Gruen

Field Summary
static int DIR
          Directory chooser.
static int OPEN
          Open dialog.
static int SAVE
          Save dialog.
 
Constructor Summary
BaseXFileChooser(java.lang.String title, java.lang.String path, javax.swing.JFrame par)
          Default Constructor.
 
Method Summary
 java.lang.String getDir()
          Returns the selected directory.
 java.lang.String getFile()
          Returns the selected file.
 boolean select(int type)
          Selects a file or directory.
 void setFilter(java.lang.String suf, java.lang.String dsc)
          Sets a file filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIR

public static final int DIR
Directory chooser.

See Also:
Constant Field Values

OPEN

public static final int OPEN
Open dialog.

See Also:
Constant Field Values

SAVE

public static final int SAVE
Save dialog.

See Also:
Constant Field Values
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

getDir

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

Returns:
directory

getFile

public java.lang.String getFile()
Returns the selected file.

Returns:
file

select

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

Parameters:
type - type (OPEN, SAVE or DIR)
Returns:
file or directory

setFilter

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

Parameters:
suf - suffix
dsc - description