|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Dialog javax.swing.JDialog org.fife.rsta.ui.EscapableDialog org.fife.rsta.ui.search.AbstractSearchDialog org.fife.ui.search.FindInFilesDialog
public class FindInFilesDialog
A dialog allowing the user to search for a text string in all files in a directory, so they don't have to do the files one at a time.
Nested Class Summary | |
---|---|
protected class |
FindInFilesDialog.FindInFilesFocusAdapter
Listens for the text field gaining focus. |
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
javax.swing.JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected javax.swing.JButton |
findButton
|
protected javax.swing.JComboBox |
inFilesComboBox
|
protected FSATextField |
inFolderTextField
|
protected javax.swing.JCheckBox |
subfoldersCheckBox
|
protected javax.swing.JCheckBox |
verboseCheckBox
|
Fields inherited from class org.fife.rsta.ui.search.AbstractSearchDialog |
---|
cancelButton, caseCheckBox, context, findTextCombo, regexCheckBox, searchConditionsPanel, wholeWordCheckBox |
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
---|
DEFAULT_MODALITY_TYPE |
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
FindInFilesDialog(java.awt.Frame owner)
Creates a new FindInFilesDialog . |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Called whenever the user does something. |
void |
addFindInFilesListener(FindInFilesListener listener)
Adds a find-in-files listener to this find in files dialog. |
void |
addInFilesComboBoxFilter(java.lang.String filter)
Adds a file filter to the "In files:" combo box. |
protected SearchContext |
createDefaultSearchContext()
Overridden to return the "find in files"-specific search context. |
protected javax.swing.Box |
createDetailsPanel()
Creates the panel containing "Report Detail" options. |
protected javax.swing.Box |
createExtraOptionsPanel()
Returns a panel containing any extra options, such as a "verbose" output option. |
protected javax.swing.JPanel |
createInputPanel()
Creates and returns the panel containing input fields and their labels. |
protected org.fife.ui.search.ResultsComponent |
createResultsComponent()
Creates and returns the component used to display search results. |
protected org.fife.ui.search.FindInFilesThread |
createWorkerThread(java.io.File directory)
Returns the thread that will do the searching. |
protected void |
fireFindInFilesEvent(FindInFilesEvent e)
Notifies all find-in-files listeners of a find-in-files event in this dialog. |
protected static int |
getLength(javax.swing.text.JTextComponent c)
Returns the length of the text in a text component. |
protected org.fife.ui.search.ResultsComponent |
getResultsComponent()
Returns the component used to display results. |
protected static javax.swing.text.JTextComponent |
getTextComponent(javax.swing.JComboBox combo)
Returns the text editor component for the specified combo box. |
protected org.fife.ui.search.FindInFilesThread |
getWorkerThread()
Synchronizes access to our "worker" thread. |
protected org.fife.rsta.ui.search.FindReplaceButtonsEnableResult |
handleToggleButtons()
Returns whether any action-related buttons (Find Next, Replace, etc.) |
protected boolean |
isEverythingFilledIn()
Returns whether everything in the UI that needs to be filled in for a search to be performed is filled in. |
protected void |
refreshUIFromContext()
Overridden to initialize UI elements specific to this subclass. |
void |
removeFindInFilesListener(FindInFilesListener listener)
Removes a find-in-files listener to this find in files dialog. |
protected void |
setSearching(boolean searching)
Enables or disables widgets in the dialog as appropriate. |
void |
setStatusText(java.lang.String text)
Sets the text in the status bar. |
void |
setVisible(boolean visible)
Displays or hides the Find in Files dialog. |
void |
updateUI()
Called whenever the user changes the Look and Feel, etc. |
Methods inherited from class org.fife.rsta.ui.search.AbstractSearchDialog |
---|
createTitledBorder, escapePressed, focusFindTextField, getBundle, getCancelButtonText, getContentAssistImage, getMatchCaseCheckboxText, getRegularExpressionCheckboxText, getSearchContext, getSearchString, getString, getWholeWordCheckboxText, handleRegExCheckBoxClicked, handleSearchContextPropertyChanged, isPreJava6JRE, isWholeWord, requestFocus, setCancelButtonText, setMatchCaseCheckboxText, setRegularExpressionCheckboxText, setSearchContext, setSearchString, setWholeWordCheckboxText |
Methods inherited from class org.fife.rsta.ui.EscapableDialog |
---|
setEscapeClosesDialog |
Methods inherited from class javax.swing.JDialog |
---|
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected javax.swing.JComboBox inFilesComboBox
protected FSATextField inFolderTextField
protected javax.swing.JCheckBox subfoldersCheckBox
protected javax.swing.JButton findButton
protected javax.swing.JCheckBox verboseCheckBox
Constructor Detail |
---|
public FindInFilesDialog(java.awt.Frame owner)
FindInFilesDialog
.
owner
- The main window that owns this dialog.Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class org.fife.rsta.ui.search.AbstractSearchDialog
public void addFindInFilesListener(FindInFilesListener listener)
listener
- The listener to add.removeFindInFilesListener(org.fife.ui.search.FindInFilesListener)
public void addInFilesComboBoxFilter(java.lang.String filter)
filter
- The filter to add.protected javax.swing.Box createDetailsPanel()
protected javax.swing.Box createExtraOptionsPanel()
null
if there are no extra
options.protected javax.swing.JPanel createInputPanel()
protected org.fife.ui.search.ResultsComponent createResultsComponent()
protected SearchContext createDefaultSearchContext()
createDefaultSearchContext
in class org.fife.rsta.ui.search.AbstractSearchDialog
protected org.fife.ui.search.FindInFilesThread createWorkerThread(java.io.File directory)
directory
- The directory to search in.
protected void fireFindInFilesEvent(FindInFilesEvent e)
e
- The event to notify all listeners about.protected static final javax.swing.text.JTextComponent getTextComponent(javax.swing.JComboBox combo)
combo
- The combo box.
protected static final int getLength(javax.swing.text.JTextComponent c)
c
- The text component.
protected org.fife.ui.search.ResultsComponent getResultsComponent()
protected org.fife.ui.search.FindInFilesThread getWorkerThread()
null
if
no searching is going on.protected org.fife.rsta.ui.search.FindReplaceButtonsEnableResult handleToggleButtons()
handleToggleButtons
in class org.fife.rsta.ui.search.AbstractSearchDialog
protected boolean isEverythingFilledIn()
protected void refreshUIFromContext()
refreshUIFromContext
in class org.fife.rsta.ui.search.AbstractSearchDialog
public void removeFindInFilesListener(FindInFilesListener listener)
listener
- The listener to removeaddFindInFilesListener(org.fife.ui.search.FindInFilesListener)
protected void setSearching(boolean searching)
searching
- Whether searching is starting.public void setStatusText(java.lang.String text)
text
- The text to display.public void setVisible(boolean visible)
show()
to properly display this dialog.
setVisible
in class java.awt.Dialog
visible
- Whether the dialog should be displayed or hidden.public void updateUI()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |