|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.usefullittlethings.saw.Main
Controller class for Search and Whatever application. Invoking
the main method of this class without any paramters
will (the first time) run the File Edition of Search and Whatever.
This class also handles the command-line interface via the
command method.
| Field Summary | |
static java.lang.String |
VERSION
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
command(java.lang.String[] args)
|
void |
copyAction(int from,
int to)
Duplicates the action indicated by the from index, placing
the copy in the collection at the index specified by to. |
void |
copyFilter(int from,
int to)
Duplicates the filter indicated by the from index, placing
the copy in the collection at the index specified by to. |
void |
exit(int i)
Requests that the application terminate. |
PluginCollection |
getActionsModel()
Returns a reference to the actions model |
SearchControllerIfc |
getCurrentSearchController()
Returns the currently selected search controller plug-in. |
PluginCollection |
getFiltersModel()
Returns a reference to the filters model |
java.lang.String |
getLogFileName()
Returns the (relative) path and filename of the currently assigned logfile. |
SearchControllerIfc[] |
getSearchControllers()
Returns a list of the currently installed search controller plug-ins. |
static java.lang.String |
getUsage()
|
void |
interruptSearch(boolean exit)
Interrupts the currently executing search. |
boolean |
isAutoSaveEnabled()
Indicates whether or not sessions are automatically saved and restored on exit and start-up. |
boolean |
isLoggingEnabled()
Indicates whether or not session events are automatically logged. |
void |
load()
Loads the current state of the application. |
static void |
main(java.lang.String[] args)
|
void |
moveActionPlugIn(int oldIndex,
int newIndex)
Moves the action indicated by the oldIndex value to the
newIndex value location. |
void |
moveFilterPlugIn(int oldIndex,
int newIndex)
Moves the filter indicated by the oldIndex value to the
newIndex value location. |
void |
removeAction(int index)
Removes the action indicated by the index value. |
void |
removeFilter(int index)
Removes the filter indicated by the index value. |
void |
reset()
Resets the current state of the application, similar to a New action. |
void |
resetActionPlugIns()
Resets the list of action plug-ins, adding back removed ones and removing duplicates. |
void |
resetFilterPlugIns()
Resets the list of filter plug-ins, adding back removed ones and removing duplicates. |
void |
restoreLastState()
Loads the current state of the application. |
void |
save()
Saves the current state of the application. |
void |
saveConfig()
Attempts to save the current configuration. |
void |
search(int[] config)
Performs the search operation using the selected search plug-in, filters, and actions. |
void |
setAutoSaveEnabled(boolean enable)
Attempts to set the auto-save flag to the value specified. |
void |
setCurrentSearchController(SearchControllerIfc controller)
Attempts to set the currently selected search controller to the controller passed in to the method. |
void |
setLogFileName(java.lang.String name)
Attempts to set the log file to the name specified. |
void |
setLoggingEnabled(boolean enable)
Attempts to turn on/off event logging. |
void |
setSearchPatternPreferences(int[] preferences)
Attempts to set the preferred order of search routines |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
| 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
| Method Detail |
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void exit(int i)
AppControllerIfc
exit in interface AppControllerIfcpublic void interruptSearch(boolean exit)
interruptSearch in interface AppControllerIfcpublic void search(int[] config)
search in interface AppControllerIfc
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic void saveConfig()
AppControllerIfc
saveConfig in interface AppControllerIfcpublic static void main(java.lang.String[] args)
public void save()
save in interface AppControllerIfcpublic void load()
load in interface AppControllerIfcpublic void restoreLastState()
public void reset()
reset in interface AppControllerIfc
public void copyFilter(int from,
int to)
from index, placing
the copy in the collection at the index specified by to.
copyFilter in interface AppControllerIfc
public void copyAction(int from,
int to)
from index, placing
the copy in the collection at the index specified by to.
copyAction in interface AppControllerIfcpublic void removeFilter(int index)
index value.
removeFilter in interface AppControllerIfcpublic void removeAction(int index)
index value.
removeAction in interface AppControllerIfcpublic void resetFilterPlugIns()
resetFilterPlugIns in interface AppControllerIfcpublic void resetActionPlugIns()
resetActionPlugIns in interface AppControllerIfc
public void moveFilterPlugIn(int oldIndex,
int newIndex)
oldIndex value to the
newIndex value location.
moveFilterPlugIn in interface AppControllerIfc
public void moveActionPlugIn(int oldIndex,
int newIndex)
oldIndex value to the
newIndex value location.
moveActionPlugIn in interface AppControllerIfcpublic static java.lang.String getUsage()
public void command(java.lang.String[] args)
public void setSearchPatternPreferences(int[] preferences)
AppControllerIfc
setSearchPatternPreferences in interface AppControllerIfcpublic SearchControllerIfc[] getSearchControllers()
getSearchControllers in interface AppControllerIfcpublic SearchControllerIfc getCurrentSearchController()
getCurrentSearchController in interface AppControllerIfcpublic void setCurrentSearchController(SearchControllerIfc controller)
setCurrentSearchController in interface AppControllerIfcpublic java.lang.String getLogFileName()
getLogFileName in interface AppControllerIfcpublic void setLogFileName(java.lang.String name)
setLogFileName in interface AppControllerIfcpublic boolean isAutoSaveEnabled()
isAutoSaveEnabled in interface AppControllerIfcpublic void setAutoSaveEnabled(boolean enable)
setAutoSaveEnabled in interface AppControllerIfcpublic boolean isLoggingEnabled()
AppControllerIfc
isLoggingEnabled in interface AppControllerIfcpublic void setLoggingEnabled(boolean enable)
AppControllerIfc
setLoggingEnabled in interface AppControllerIfcpublic PluginCollection getFiltersModel()
getFiltersModel in interface AppControllerIfcpublic PluginCollection getActionsModel()
getActionsModel in interface AppControllerIfc
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||