public class FindToolBar
extends javax.swing.JPanel
FindDialog,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
FindToolBar.FindFieldListener
Listens for events in the Find (and Replace, in the subclass) search
field.
|
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.JButton |
findButton |
protected SearchComboBox |
findCombo |
protected FindToolBar.FindFieldListener |
findFieldListener |
protected javax.swing.JButton |
findPrevButton |
protected org.fife.rsta.ui.search.FindToolBar.ToolBarListener |
listener |
protected javax.swing.JCheckBox |
markAllCheckBox |
protected javax.swing.JCheckBox |
matchCaseCheckBox |
protected static java.util.ResourceBundle |
MSG |
protected javax.swing.JCheckBox |
regexCheckBox |
protected SearchComboBox |
replaceCombo |
protected static java.util.ResourceBundle |
SEARCH_MSG |
protected javax.swing.JCheckBox |
wholeWordCheckBox |
protected javax.swing.JCheckBox |
wrapCheckBox |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
FindToolBar(SearchListener listener)
Creates the tool bar.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSearchListener(SearchListener l)
Adds a
SearchListener to this tool bar. |
protected java.awt.Container |
createButtonPanel() |
protected javax.swing.JCheckBox |
createCB(java.lang.String key) |
protected java.awt.Container |
createContentAssistablePanel(javax.swing.JComponent comp)
Wraps the specified component in a panel with a leading "content assist
available" icon in front of it.
|
protected java.awt.Container |
createFieldPanel() |
protected void |
createFindButtons()
Creates the buttons for this tool bar.
|
protected void |
doMarkAll(boolean delay)
Forces a "mark all" event to be sent out, if "mark all" is enabled.
|
protected void |
fireSearchEvent(SearchEvent e)
Notifies all listeners that have registered interest for notification on
this event type.
|
protected java.lang.String |
getFindText() |
int |
getMarkAllDelay()
Returns the delay between when the user types and when a "mark all"
event is fired (assuming "mark all" is enabled), in milliseconds.
|
protected java.lang.String |
getReplaceText() |
org.fife.ui.rtextarea.SearchContext |
getSearchContext()
Returns the search context for this tool bar.
|
protected void |
handleRegExCheckBoxClicked()
Called when the regex checkbox is clicked (or its value is modified
via a change to the search context).
|
protected void |
handleSearchAction(java.awt.event.ActionEvent e)
Creates a search event object and notifies all registered listeners.
|
protected FindReplaceButtonsEnableResult |
handleToggleButtons()
Returns whether any action-related buttons (Find Next, Replace, etc.)
should be enabled.
|
protected void |
makeEnterActivateButton(javax.swing.JButton button)
Makes the Enter key activate the button.
|
void |
removeSearchListener(SearchListener l)
Removes a
SearchListener from this tool bar. |
boolean |
requestFocusInWindow()
Makes the find field on this toolbar request focus.
|
void |
setContentAssistImage(java.awt.Image image)
Sets the image to display by this dialog's text fields when content
assistance is available.
|
protected void |
setFindText(java.lang.String text) |
void |
setMarkAllDelay(int millis)
Sets the delay between when the user types and when a "mark all"
event is fired (assuming "mark all" is enabled), in milliseconds.
|
protected void |
setReplaceText(java.lang.String text) |
void |
setSearchContext(org.fife.ui.rtextarea.SearchContext context)
Sets the search context for this tool bar.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected org.fife.rsta.ui.search.FindToolBar.ToolBarListener listener
protected FindToolBar.FindFieldListener findFieldListener
protected SearchComboBox findCombo
protected SearchComboBox replaceCombo
protected javax.swing.JButton findButton
protected javax.swing.JButton findPrevButton
protected javax.swing.JCheckBox matchCaseCheckBox
protected javax.swing.JCheckBox wholeWordCheckBox
protected javax.swing.JCheckBox regexCheckBox
protected javax.swing.JCheckBox markAllCheckBox
protected javax.swing.JCheckBox wrapCheckBox
protected static final java.util.ResourceBundle SEARCH_MSG
protected static final java.util.ResourceBundle MSG
public FindToolBar(SearchListener listener)
listener - An entity listening for search events.public void addSearchListener(SearchListener l)
SearchListener to this tool bar. This listener will
be notified when find or replace operations are triggered.l - The listener to add.removeSearchListener(SearchListener)protected java.awt.Container createButtonPanel()
protected javax.swing.JCheckBox createCB(java.lang.String key)
protected java.awt.Container createContentAssistablePanel(javax.swing.JComponent comp)
comp - The component with content assist.protected java.awt.Container createFieldPanel()
protected void createFindButtons()
protected void doMarkAll(boolean delay)
delay - If the delay should be honored.protected void fireSearchEvent(SearchEvent e)
event parameter.e - The ActionEvent object coming from a
child component.protected java.lang.String getFindText()
public int getMarkAllDelay()
setMarkAllDelay(int)protected java.lang.String getReplaceText()
public org.fife.ui.rtextarea.SearchContext getSearchContext()
setSearchContext(SearchContext)protected void handleRegExCheckBoxClicked()
protected void handleSearchAction(java.awt.event.ActionEvent e)
e - The event.protected FindReplaceButtonsEnableResult handleToggleButtons()
protected void makeEnterActivateButton(javax.swing.JButton button)
button - The button that should respond to the Enter key.public void removeSearchListener(SearchListener l)
SearchListener from this tool bar.l - The listener to removeaddSearchListener(SearchListener)public boolean requestFocusInWindow()
requestFocusInWindow in class javax.swing.JComponentpublic void setContentAssistImage(java.awt.Image image)
image - The image. If this is null, a default image
(a light bulb) is used). This should be kept small, around
8x8 for standard resolution monitors.protected void setFindText(java.lang.String text)
public void setMarkAllDelay(int millis)
millis - The new delay. This should be >= zero.getMarkAllDelay()protected void setReplaceText(java.lang.String text)
public void setSearchContext(org.fife.ui.rtextarea.SearchContext context)
context - The new search context. This cannot be null.getSearchContext()