|
|||||||||||
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.ActionListener
public void exit(int i)
AppControllerIfc
exit
in interface AppControllerIfc
public void interruptSearch(boolean exit)
interruptSearch
in interface AppControllerIfc
public void search(int[] config)
search
in interface AppControllerIfc
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
public void saveConfig()
AppControllerIfc
saveConfig
in interface AppControllerIfc
public static void main(java.lang.String[] args)
public void save()
save
in interface AppControllerIfc
public void load()
load
in interface AppControllerIfc
public 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 AppControllerIfc
public void removeFilter(int index)
index
value.
removeFilter
in interface AppControllerIfc
public void removeAction(int index)
index
value.
removeAction
in interface AppControllerIfc
public void resetFilterPlugIns()
resetFilterPlugIns
in interface AppControllerIfc
public 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 AppControllerIfc
public static java.lang.String getUsage()
public void command(java.lang.String[] args)
public void setSearchPatternPreferences(int[] preferences)
AppControllerIfc
setSearchPatternPreferences
in interface AppControllerIfc
public SearchControllerIfc[] getSearchControllers()
getSearchControllers
in interface AppControllerIfc
public SearchControllerIfc getCurrentSearchController()
getCurrentSearchController
in interface AppControllerIfc
public void setCurrentSearchController(SearchControllerIfc controller)
setCurrentSearchController
in interface AppControllerIfc
public java.lang.String getLogFileName()
getLogFileName
in interface AppControllerIfc
public void setLogFileName(java.lang.String name)
setLogFileName
in interface AppControllerIfc
public boolean isAutoSaveEnabled()
isAutoSaveEnabled
in interface AppControllerIfc
public void setAutoSaveEnabled(boolean enable)
setAutoSaveEnabled
in interface AppControllerIfc
public boolean isLoggingEnabled()
AppControllerIfc
isLoggingEnabled
in interface AppControllerIfc
public void setLoggingEnabled(boolean enable)
AppControllerIfc
setLoggingEnabled
in interface AppControllerIfc
public PluginCollection getFiltersModel()
getFiltersModel
in interface AppControllerIfc
public PluginCollection getActionsModel()
getActionsModel
in interface AppControllerIfc
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |