com.usefullittlethings.saw.ui
Class DefaultSearchUI

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--com.usefullittlethings.saw.ui.DefaultSearchUI
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.awt.dnd.DropTargetListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, SearchUIIfc, java.io.Serializable, javax.swing.WindowConstants

public class DefaultSearchUI
extends javax.swing.JFrame
implements SearchUIIfc, java.awt.event.ActionListener, java.awt.dnd.DropTargetListener

Basic implementation of the SearchUIIfc interface using Swing classes (i.e.- JFrame).

See Also:
SearchUIIfc, JFrame, Serialized Form

Field Summary
 
Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DefaultSearchUI()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addActionUI(int index, java.awt.Component c, java.lang.String title)
          Adds the action's ui to the user interface.
 void addFilterUI(int index, java.awt.Component c, java.lang.String title)
          Adds the filter's ui to the user interface.
 void disableForSearch()
          Tells the user interface to stop accepting user input for the duration of a search operation.
 void dispose()
          Disposes of this ui component, only to be used when application is exiting.
 void doShowStatusMessage(java.lang.String message)
           
 void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
           
 void dragExit(java.awt.dnd.DropTargetEvent dte)
           
 void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
           
 void drop(java.awt.dnd.DropTargetDropEvent dtde)
           
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
           
 void enableAfterSearch()
          Tells the user interface to start accepting user input at the completion of a search operation.
 java.io.File getOpenFromLocation()
          Displays an open dialog and returns the selection.
 java.io.File getSaveToLocation()
          Displays a save dialog and returns the selection.
 StartupUIIfc getStartupUI()
           
 void removeActionUI(java.awt.Component c)
          Removes the ui of the filter specified by the index from the user interface.
 void removeFilterUI(java.awt.Component c)
          Removes the ui of the filter specified by the index from the user interface.
 void setActionsModel(PluginCollection model)
          Used to set a reference to the actions model within the ui.
 void setActionSummary(java.lang.String message)
          Sets a summary of the actions' configuration in the ui.
 void setAppTitle(java.lang.String title)
          Sets the application title to the specified value.
 void setController(AppControllerIfc controller)
          Registers the application-level controller with the user interface to receive application-level events, such as exit requests, etc.
 void setFiltersModel(PluginCollection model)
          Used to set a reference to the filters model within the ui.
 void setFilterSummary(java.lang.String message)
          Sets a summary of the filters' configuration in the ui.
 void setSearchRootUI(SearchRootUIIfc root)
          Installs the "panel" responsible for handling selection of the root location for the search to be performed.
 void show()
          Displays the ui.
 boolean showConfirmInterrupt()
          Shows the user a confirmation prompt to determine if the currently executing search should be stopped.
 void showLoadError()
          Display an error for the user indicating that the load process failed.
 void showNoCommonSupportError()
          Displays the an error indicating that there is no single search pattern supported by both the search plug-in and the selected filter/action plug-ins.
 void showStatusMessage(java.lang.String message)
          Displays feedback to the user, such as in the status bar of a window.
 void updateUI()
          Updates the user interface to reflect any changes that may have occurred in the model.
 
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

DefaultSearchUI

public DefaultSearchUI()
Method Detail

getStartupUI

public StartupUIIfc getStartupUI()
Specified by:
getStartupUI in interface SearchUIIfc

setSearchRootUI

public void setSearchRootUI(SearchRootUIIfc root)
Description copied from interface: SearchUIIfc
Installs the "panel" responsible for handling selection of the root location for the search to be performed.

Specified by:
setSearchRootUI in interface SearchUIIfc

show

public void show()
Description copied from interface: SearchUIIfc
Displays the ui.

Specified by:
show in interface SearchUIIfc
Overrides:
show in class java.awt.Window

dispose

public void dispose()
Description copied from interface: SearchUIIfc
Disposes of this ui component, only to be used when application is exiting.

Specified by:
dispose in interface SearchUIIfc
Overrides:
dispose in class java.awt.Window

updateUI

public void updateUI()
Description copied from interface: SearchUIIfc
Updates the user interface to reflect any changes that may have occurred in the model.

Specified by:
updateUI in interface SearchUIIfc

setFiltersModel

public void setFiltersModel(PluginCollection model)
Description copied from interface: SearchUIIfc
Used to set a reference to the filters model within the ui.

Specified by:
setFiltersModel in interface SearchUIIfc

setActionsModel

public void setActionsModel(PluginCollection model)
Description copied from interface: SearchUIIfc
Used to set a reference to the actions model within the ui.

Specified by:
setActionsModel in interface SearchUIIfc

addFilterUI

public void addFilterUI(int index,
                        java.awt.Component c,
                        java.lang.String title)
Description copied from interface: SearchUIIfc
Adds the filter's ui to the user interface.

Specified by:
addFilterUI in interface SearchUIIfc

addActionUI

public void addActionUI(int index,
                        java.awt.Component c,
                        java.lang.String title)
Description copied from interface: SearchUIIfc
Adds the action's ui to the user interface.

Specified by:
addActionUI in interface SearchUIIfc

setFilterSummary

public void setFilterSummary(java.lang.String message)
Description copied from interface: SearchUIIfc
Sets a summary of the filters' configuration in the ui.

Specified by:
setFilterSummary in interface SearchUIIfc

setActionSummary

public void setActionSummary(java.lang.String message)
Description copied from interface: SearchUIIfc
Sets a summary of the actions' configuration in the ui.

Specified by:
setActionSummary in interface SearchUIIfc

removeFilterUI

public void removeFilterUI(java.awt.Component c)
Description copied from interface: SearchUIIfc
Removes the ui of the filter specified by the index from the user interface.

Specified by:
removeFilterUI in interface SearchUIIfc

removeActionUI

public void removeActionUI(java.awt.Component c)
Description copied from interface: SearchUIIfc
Removes the ui of the filter specified by the index from the user interface.

Specified by:
removeActionUI in interface SearchUIIfc

setAppTitle

public void setAppTitle(java.lang.String title)
Description copied from interface: SearchUIIfc
Sets the application title to the specified value.

Specified by:
setAppTitle in interface SearchUIIfc

showStatusMessage

public void showStatusMessage(java.lang.String message)
Description copied from interface: SearchUIIfc
Displays feedback to the user, such as in the status bar of a window.

Specified by:
showStatusMessage in interface SearchUIIfc

showNoCommonSupportError

public void showNoCommonSupportError()
Description copied from interface: SearchUIIfc
Displays the an error indicating that there is no single search pattern supported by both the search plug-in and the selected filter/action plug-ins.

Specified by:
showNoCommonSupportError in interface SearchUIIfc

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

setController

public void setController(AppControllerIfc controller)
Description copied from interface: SearchUIIfc
Registers the application-level controller with the user interface to receive application-level events, such as exit requests, etc.

Specified by:
setController in interface SearchUIIfc

disableForSearch

public void disableForSearch()
Description copied from interface: SearchUIIfc
Tells the user interface to stop accepting user input for the duration of a search operation.

Specified by:
disableForSearch in interface SearchUIIfc

enableAfterSearch

public void enableAfterSearch()
Description copied from interface: SearchUIIfc
Tells the user interface to start accepting user input at the completion of a search operation.

Specified by:
enableAfterSearch in interface SearchUIIfc

getSaveToLocation

public java.io.File getSaveToLocation()
Description copied from interface: SearchUIIfc
Displays a save dialog and returns the selection.

Specified by:
getSaveToLocation in interface SearchUIIfc

getOpenFromLocation

public java.io.File getOpenFromLocation()
Description copied from interface: SearchUIIfc
Displays an open dialog and returns the selection.

Specified by:
getOpenFromLocation in interface SearchUIIfc

showConfirmInterrupt

public boolean showConfirmInterrupt()
Description copied from interface: SearchUIIfc
Shows the user a confirmation prompt to determine if the currently executing search should be stopped.

Specified by:
showConfirmInterrupt in interface SearchUIIfc

showLoadError

public void showLoadError()
Description copied from interface: SearchUIIfc
Display an error for the user indicating that the load process failed.

Specified by:
showLoadError in interface SearchUIIfc

doShowStatusMessage

public void doShowStatusMessage(java.lang.String message)

dragEnter

public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener

dragOver

public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
Specified by:
dragOver in interface java.awt.dnd.DropTargetListener

dropActionChanged

public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener

dragExit

public void dragExit(java.awt.dnd.DropTargetEvent dte)
Specified by:
dragExit in interface java.awt.dnd.DropTargetListener

drop

public void drop(java.awt.dnd.DropTargetDropEvent dtde)
Specified by:
drop in interface java.awt.dnd.DropTargetListener