|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.panels.ValidatePackSelections.SearchField
This class encapsulates a lot of search field functionality. A search field supports searching directories and files on the target system. This is a helper class to manage all data belonging to a search field.
Field Summary | |
protected JButton |
autodetectButton
|
protected JButton |
browseButton
|
protected String |
checkFilename
|
protected String |
filename
|
protected com.izforge.izpack.installer.InstallerFrame |
parent
|
protected JComboBox |
pathComboBox
|
static int |
RESULT_DIRECTORY
used in constructor - result of search is the directory. |
static int |
RESULT_FILE
used in constructor - result of search is the whole file name. |
static int |
RESULT_PARENTDIR
used in constructor - result of search is the parent directory. |
protected int |
resultType
|
protected int |
searchType
|
static int |
TYPE_DIRECTORY
used in constructor - we search for a directory. |
static int |
TYPE_FILE
used in constructor - we search for a file. |
Constructor Summary | |
ValidatePackSelections.SearchField(String filename,
String checkFilename,
com.izforge.izpack.installer.InstallerFrame parent,
JComboBox combobox,
JButton autobutton,
JButton browsebutton,
int search_type,
int result_type)
Constructor - initializes the object, adds it as action listener to the "autodetect" button. |
Method Summary | |
void |
actionPerformed(ActionEvent event)
This is called if one of the buttons has bee pressed. |
boolean |
autodetect()
perform autodetection |
boolean |
belongsTo(JComboBox combobox)
Check whether the given combobox belongs to this searchfield. |
String |
getResult()
Return the result of the search according to result type. |
protected boolean |
pathMatches(String path)
check whether the given path matches |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TYPE_DIRECTORY
public static final int TYPE_FILE
public static final int RESULT_DIRECTORY
public static final int RESULT_FILE
public static final int RESULT_PARENTDIR
protected String filename
protected String checkFilename
protected JButton autodetectButton
protected JButton browseButton
protected JComboBox pathComboBox
protected int searchType
protected int resultType
protected com.izforge.izpack.installer.InstallerFrame parent
Constructor Detail |
public ValidatePackSelections.SearchField(String filename, String checkFilename, com.izforge.izpack.installer.InstallerFrame parent, JComboBox combobox, JButton autobutton, JButton browsebutton, int search_type, int result_type)
filename
- the name of the file to search for (might be null for searching
directories)checkFilename
- the name of the file to check when searching for directories (the
checkFilename is appended to a found directory to figure out whether it is the right
directory)combobox
- the JComboBox
holding the list of choices; it should be
editable and contain only Stringsautobutton
- the autodetection button for triggering autodetectionbrowsebutton
- the browse button to look for the filesearch_type
- what to search for - TYPE_FILE or TYPE_DIRECTORYresult_type
- what to return as the result - RESULT_FILE or RESULT_DIRECTORY or
RESULT_PARENTDIRMethod Detail |
public boolean belongsTo(JComboBox combobox)
protected boolean pathMatches(String path)
public boolean autodetect()
public void actionPerformed(ActionEvent event)
actionPerformed
in interface ActionListener
public String getResult()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |