sears.search.core
Class FindModule

java.lang.Object
  extended by sears.gui.glassPane.ViewportGlassPaneModule
      extended by sears.search.core.FindModule

public class FindModule
extends ViewportGlassPaneModule

BETA CLASS: Find action core, extension of MainWindow class


Field Summary
 
Fields inherited from class sears.gui.glassPane.ViewportGlassPaneModule
isViewportChanged, view, viewport
 
Constructor Summary
FindModule(javax.swing.JScrollPane scrollPane)
          Constructs a new FindModule object.
 
Method Summary
 void cancel()
          Cancel the action
 void fire(FindDialog dialog, java.util.ArrayList<Subtitle> subtitleList, boolean backward)
          Principal method
 void fireAdjustmentValueChanged(java.awt.event.AdjustmentEvent e)
           
 void fireViewChange()
          Use when view change
 void fireWordNotFound()
          Alerts that the word is not found in subtitle
 java.awt.Point getPillLocation(java.awt.Rectangle cell)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindModule

public FindModule(javax.swing.JScrollPane scrollPane)
Constructs a new FindModule object.

Parameters:
scrollPane -
Throws:
java.lang.NullPointerException - if scrollPane is null
java.lang.NullPointerException - if its view port is null
java.lang.IllegalArgumentException - if the view of the view port is not a JTable object
See Also:
JScrollPane, JViewport
Method Detail

fire

public void fire(FindDialog dialog,
                 java.util.ArrayList<Subtitle> subtitleList,
                 boolean backward)
Principal method

Parameters:
dialog - the dialog which calls the find action
subtitleList - the subtitle list where search occurs
backward - direction of search

cancel

public void cancel()
Cancel the action


getPillLocation

public java.awt.Point getPillLocation(java.awt.Rectangle cell)
Parameters:
cell - the cell
Returns:
the point in context or null if cell/tt> is null

fireViewChange

public void fireViewChange()
Description copied from class: ViewportGlassPaneModule
Use when view change

Overrides:
fireViewChange in class ViewportGlassPaneModule

fireWordNotFound

public void fireWordNotFound()
Alerts that the word is not found in subtitle


fireAdjustmentValueChanged

public void fireAdjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Specified by:
fireAdjustmentValueChanged in class ViewportGlassPaneModule