org.merlotxml.merlot
Class XerlinDavFileDialogs

java.lang.Object
  extended byorg.merlotxml.merlot.XerlinFileDialogs
      extended byorg.merlotxml.merlot.XerlinDavFileDialogs
All Implemented Interfaces:
MerlotConstants

public class XerlinDavFileDialogs
extends XerlinFileDialogs

This class provides file dialogs for loading and saving of XML files it can ge used to provide different dialogs for different filesystems

Author:
Justin Lipton

Field Summary
 
Fields inherited from class org.merlotxml.merlot.XerlinFileDialogs
_frame
 
Fields inherited from interface org.merlotxml.merlot.MerlotConstants
ACTION_MENU_ACCELERATOR, ACTION_MENU_ICON, ACTION_NAME, ACTION_SHORT_DESCRIPTION, ACTION_SMALL_ICON, AFTER, BEFORE, ERR, INTO, UI, XML
 
Constructor Summary
XerlinDavFileDialogs(XMLEditorFrame frame)
          Constructor for the XerlinDavFileDialogs object
 
Method Summary
static com.speedlegal.webdav.DAVServer getClient()
          Gets the client service if it exists otherwise creates a new client returns null if filebased returns _davserver if it exists returns new _davserver if it doesn't exist
 com.speedlegal.webdav.EditorFile getCurrentFile()
          Setter and getter methods for user current clause and file directory locations
protected  java.io.File getFileToOpen(MerlotFileFilter filter, java.lang.String selectedFileName, boolean readWrite)
          Present a file chooser dialog for the user to select a file.
protected  java.io.File getFileToSave()
          Gets the fileToSave attribute of the XerlinFileDialogs object
protected  javax.swing.JFileChooser getXMLFileChooser(java.lang.String dir, javax.swing.filechooser.FileFilter filter)
          Creates a Swing JFileChooser with the given filter and starting the directory given
protected  java.awt.FileDialog getXMLFileDialog(java.lang.String dir, java.io.FilenameFilter filter)
          Creates an AWT native-peered file dialog.
protected  java.io.File openLibraryFile()
          Description of the Method
 void setCurrentFile(com.speedlegal.webdav.EditorFile f)
          Sets the currentFile attribute of the XMLEditorFrame object
 
Methods inherited from class org.merlotxml.merlot.XerlinFileDialogs
getFileToOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XerlinDavFileDialogs

public XerlinDavFileDialogs(XMLEditorFrame frame)
Constructor for the XerlinDavFileDialogs object

Parameters:
frame - Description of the Parameter
Method Detail

getClient

public static com.speedlegal.webdav.DAVServer getClient()
Gets the client service if it exists otherwise creates a new client returns null if filebased returns _davserver if it exists returns new _davserver if it doesn't exist

Returns:
The client value

getFileToOpen

protected java.io.File getFileToOpen(MerlotFileFilter filter,
                                     java.lang.String selectedFileName,
                                     boolean readWrite)
Present a file chooser dialog for the user to select a file.

Overrides:
getFileToOpen in class XerlinFileDialogs
Parameters:
filter - the file filter for which files to show in the chooser
selectedFileName - a file to select in the chooser if using the native AWT fileDialog
readWrite - Description of the Parameter
Returns:
the File the user selected or null if they didn't select one

getXMLFileDialog

protected java.awt.FileDialog getXMLFileDialog(java.lang.String dir,
                                               java.io.FilenameFilter filter)
Creates an AWT native-peered file dialog. This is usefull on windows for accessing network shares and such.

Overrides:
getXMLFileDialog in class XerlinFileDialogs
Parameters:
dir - the Directory to start the file dialog in
filter - a file filter for what files to show to the user in the dialog
Returns:
a FileDialog instance with the given properties

getXMLFileChooser

protected javax.swing.JFileChooser getXMLFileChooser(java.lang.String dir,
                                                     javax.swing.filechooser.FileFilter filter)
Creates a Swing JFileChooser with the given filter and starting the directory given

Overrides:
getXMLFileChooser in class XerlinFileDialogs
Parameters:
dir - the Directory to start the file chooser in
filter - a file filter for what files to show to the user in the dialog
Returns:
a JFileChooser instance with the given properties

openLibraryFile

protected java.io.File openLibraryFile()
Description of the Method

Overrides:
openLibraryFile in class XerlinFileDialogs
Returns:
Description of the Return Value

getFileToSave

protected java.io.File getFileToSave()
Gets the fileToSave attribute of the XerlinFileDialogs object

Overrides:
getFileToSave in class XerlinFileDialogs
Returns:
The fileToSave value

getCurrentFile

public com.speedlegal.webdav.EditorFile getCurrentFile()
Setter and getter methods for user current clause and file directory locations

Returns:
The currentFile value

setCurrentFile

public void setCurrentFile(com.speedlegal.webdav.EditorFile f)
Sets the currentFile attribute of the XMLEditorFrame object

Parameters:
f - The new currentFile value