|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.win.swing.component.LyJFileDialog
public class LyJFileDialog
This class defines a component containing a text field and a button. A click on the button opens a dialog which allows to select a file. The selector may have a type indicating the mime-type of the files that may be chosen (text, image, audio, video...).
LyJSelector
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
TYPE_AUDIO
Audio type. |
static int |
TYPE_DIRECTORY
Directory type. |
static int |
TYPE_IMAGE
Image type. |
static int |
TYPE_TEXT
Text type. |
static int |
TYPE_VIDEO
Video type. |
Constructor Summary | |
---|---|
LyJFileDialog(java.awt.Frame parent,
java.lang.String title,
LyFile.Type type,
java.lang.String directory,
java.lang.String filter)
Creates and initializes a new file dialog. |
Method Summary | |
---|---|
java.lang.String |
getDirectory()
Gets the directory in which the files are selected. |
java.lang.String |
getFile()
Gets the path of the selected file. |
void |
setDirectory(java.io.File file)
Sets the current directory on dialog opening. |
void |
setFile(java.io.File file)
Allows to select initial value of the file chooser. |
int |
show()
Shows the file chooser dialog. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final int TYPE_TEXT
public static final int TYPE_IMAGE
public static final int TYPE_AUDIO
public static final int TYPE_VIDEO
public static final int TYPE_DIRECTORY
Constructor Detail |
---|
public LyJFileDialog(java.awt.Frame parent, java.lang.String title, LyFile.Type type, java.lang.String directory, java.lang.String filter)
parent
- the parent componenttitle
- the title of the dialogtype
- the type of files to show (see _type
)directory
- the path to the starting directoryfilter
- a filter for the file names to showMethod Detail |
---|
public int show()
JFileChooser.CANCEL_OPTION
JFileChooser.APPROVE_OPTION
JFileChooser.ERROR_OPTION
if an error occurs or the dialog is
dismissedJFileChooser.showOpenDialog(java.awt.Component)
public java.lang.String getDirectory()
setDirectory(File)
public java.lang.String getFile()
setFile(File)
public void setFile(java.io.File file)
file
- he initial file or directorygetFile()
,
JFileChooser.setSelectedFile(java.io.File)
public void setDirectory(java.io.File file)
file
- a directory or a file in the directory to useJFileChooser.setCurrentDirectory(java.io.File)
,
getDirectory()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |