com.appperfect.devcommon.script.javaelement
Interface AwtFileDialog

All Superinterfaces:
AwtComponent, AwtContainer, AwtDialog, AwtWindow, IScript, JavaComponent

public interface AwtFileDialog
extends AwtDialog

AwtFileDialog is created to represent java.awt.FileDialog component

The following code fragment illustrates how to create an AwtFileDialog element.

 var element = engine.createAwtFileDialog(1, 5);
 
where engine is object of IScriptEngine


Method Summary
 java.lang.String getDirectory()
 To get the currently selected folder in the FileDialog
 java.lang.String getFile()
 To get the currently selected file in the FileDialog
 int getMode()
 Indicates whether this file dialog box is for loading from a file or for saving to a file.
 boolean setDirectory(java.lang.String directory)
 To select the folder represented by directory path in the FileDialog
 boolean setFile(java.lang.String file)
 To select the file represented by file path in the FileDialog
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtDialog
isModal, isResizable, setModal
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtWindow
hide, isActive, show
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtContainer
getComponentCount
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.JavaComponent
activate, addAttribute, captureImage, click, close, dblClick, drag, drop, getName, getText, getToolTipText, maximize, minimize, mouseMove, restore, rightClick, set, setBreakPoint, setIgnored, setImagePath, setName, setThinkTime, setTitle, type
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

getDirectory

java.lang.String getDirectory()
To get the currently selected folder in the FileDialog

Returns:
the currently selected folder in the FileDialog

getFile

java.lang.String getFile()
To get the currently selected file in the FileDialog

Returns:
the currently selected file in the FileDialog

getMode

int getMode()
Indicates whether this file dialog box is for loading from a file or for saving to a file.

Returns:
the mode of this file dialog window, either FileDialog.LOAD or FileDialog.SAVE

setDirectory

boolean setDirectory(java.lang.String directory)
To select the folder represented by directory path in the FileDialog

Parameters:
directory - path of the directory to be selected
Returns:
true if successful, false otherwise

setFile

boolean setFile(java.lang.String file)
To select the file represented by file path in the FileDialog

Parameters:
file - path of the file to be selected
Returns:
true if successful, false otherwise


Copyright © 2003-2011 AppPerfect Corporation. All Rights Reserved.