com.izforge.izpack.panels.userinput.gui.search
Class SearchInputField

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.gui.search.SearchInputField
All Implemented Interfaces:
ActionListener, EventListener

public class SearchInputField
extends Object
implements ActionListener

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 installDataGUI belonging to a search field.


Constructor Summary
SearchInputField(SearchField field, InstallerFrame parent, JComboBox combobox, JButton autobutton, JButton browsebutton, InstallData installData)
          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 been pressed.
 boolean autodetect()
          perform autodetection
 String getResult()
          Return the result of the search according to result type.
 void setResult(String item)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchInputField

public SearchInputField(SearchField field,
                        InstallerFrame parent,
                        JComboBox combobox,
                        JButton autobutton,
                        JButton browsebutton,
                        InstallData installData)
Constructor - initializes the object, adds it as action listener to the "autodetect" button.

Parameters:
field - the search field
combobox - the JComboBox holding the list of choices; it should be editable and contain only Strings
autobutton - the autodetection button for triggering autodetection
browsebutton - the browse button to look for the file
Method Detail

autodetect

public boolean autodetect()
perform autodetection


actionPerformed

public void actionPerformed(ActionEvent event)
This is called if one of the buttons has been pressed.

It checks, which button caused the action and acts accordingly.

Specified by:
actionPerformed in interface ActionListener

getResult

public String getResult()
Return the result of the search according to result type.

Sometimes, the whole path of the file is wanted, sometimes only the directory where the file is in, sometimes the parent directory.

Returns:
null on error

setResult

public void setResult(String item)


Copyright © 2018. All rights reserved.