ice.ri.common.search.swing
Class SearchPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ice.ri.common.search.swing.SearchPanel
- All Implemented Interfaces:
- Accessible, ActionListener, DocumentListener, EventListener, ImageObserver, ItemListener, MenuContainer, SearchStatusEventListener, Serializable
- public final class SearchPanel
- extends JPanel
- implements ActionListener, ItemListener, DocumentListener, SearchStatusEventListener
This class extends JPanel. By default, this JPanel is
invisible. Method setVisible(true) should be called in order
to make it visible, which should be done after this JPanel
has been added to a containment hierarchy such that
the locale can be determined.
- Since:
- 6.1.0
- Version:
- %I%, %G%
- See Also:
- Serialized Form
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
SearchPanel
public SearchPanel(Viewport viewport)
- Creates an instance of this class. An instance of SearchHelper is also
created.
- Parameters:
viewport -
dispose
public void dispose()
- Disposes related resources
actionPerformed
public void actionPerformed(ActionEvent ev)
- Specified by:
actionPerformed in interface ActionListener
itemStateChanged
public void itemStateChanged(ItemEvent ev)
- Specified by:
itemStateChanged in interface ItemListener
setVisible
public void setVisible(boolean isVisible)
addSearchStatusEventListener
public void addSearchStatusEventListener(SearchStatusEventListener l)
removeSearchStatusEventListener
public void removeSearchStatusEventListener(SearchStatusEventListener l)
setFindNextEnabled
public void setFindNextEnabled(boolean b)
setFindPreviousEnabled
public void setFindPreviousEnabled(boolean b)
setSearchEnabled
public void setSearchEnabled(boolean b)
- Description copied from interface:
SearchStatusEventListener
- Invoked when executing search is currently allowed or disallowed. This method
can be used to enable or disable search buttons. This is useful when you use it
in a non-modal form because search operation should be disabled when browser is
in the process of loading new document.
- Specified by:
setSearchEnabled in interface SearchStatusEventListener
- Parameters:
b - true if executing search is allowed, false otherwise.
setSearchStatusMessage
public void setSearchStatusMessage(int status,
int nMatches)
- Description copied from interface:
SearchStatusEventListener
- Invoked when search result message needs to be set.
- Specified by:
setSearchStatusMessage in interface SearchStatusEventListener
- Parameters:
status -
- SearchHelper.MATCH_FOUND if search found match.
- SearchHelper.NO_MATCH_FOUND if search did not find match.
- SearchHelper.END_OF_SEARCH if search has reached the end of the page
nMatches - The number of matches found. It is meaningful
only if status equals SearchHelper.MATCH_FOUND and number_of_matches
> 0.
reset
public void reset(int signal)
- Description copied from interface:
SearchStatusEventListener
- Invoked when the document of top level
Viewport or child
Viewport is changed. This is useful when you use it in a
non-modal form.
- Specified by:
reset in interface SearchStatusEventListener
- Parameters:
signal -
- SearchHelper.RESET_ALL, document of top level
Viewport
is changed and HIGHLIGHT button, WHOLE-WORD and MATCH-CASE check boxes
need to be reset.
- SearchHelper.RESET_HIGHLIGHT, document of a child
Viewport
is changed and for example HIGHLIGHT button needs to be reset.
changedUpdate
public void changedUpdate(DocumentEvent e)
- Specified by:
changedUpdate in interface DocumentListener
insertUpdate
public void insertUpdate(DocumentEvent e)
- Specified by:
insertUpdate in interface DocumentListener
removeUpdate
public void removeUpdate(DocumentEvent e)
- Specified by:
removeUpdate in interface DocumentListener