public class JSearchPanel
extends javax.swing.JPanel
implements javax.swing.event.DocumentListener, java.awt.event.ActionListener
SearchQueryBinding,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
class |
JSearchPanel.CancelButton
A button depicted as an "X" that allows users to cancel the current query
and clear the query field.
|
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
JSearchPanel(SearchTupleSet search,
java.lang.String field)
Create a new JSearchPanel.
|
JSearchPanel(SearchTupleSet search,
java.lang.String field,
boolean monitorKeystrokes)
Create a new JSearchPanel.
|
JSearchPanel(TupleSet source,
SearchTupleSet search,
java.lang.String[] fields,
boolean autoIndex,
boolean monitorKeystrokes)
Create a new JSearchPanel.
|
JSearchPanel(Visualization vis,
java.lang.String field)
Create a new JSearchPanel.
|
JSearchPanel(Visualization vis,
java.lang.String group,
java.lang.String field)
Create a new JSearchPanel.
|
JSearchPanel(Visualization vis,
java.lang.String group,
java.lang.String field,
boolean autoIndex)
Create a new JSearchPanel.
|
JSearchPanel(Visualization vis,
java.lang.String group,
java.lang.String field,
boolean autoIndex,
boolean monitorKeystrokes)
Create a new JSearchPanel.
|
JSearchPanel(Visualization vis,
java.lang.String group,
java.lang.String searchGroup,
java.lang.String[] fields,
boolean autoIndex,
boolean monitorKeystrokes)
Create a new JSearchPanel.
|
JSearchPanel(Visualization vis,
java.lang.String group,
java.lang.String searchGroup,
java.lang.String field,
boolean autoIndex,
boolean monitorKeystrokes)
Create a new JSearchPanel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
changedUpdate(javax.swing.event.DocumentEvent e) |
java.lang.String |
getQuery()
Get the query string in the text field.
|
void |
insertUpdate(javax.swing.event.DocumentEvent e) |
void |
removeUpdate(javax.swing.event.DocumentEvent e) |
void |
requestFocus()
Request the keyboard focus for this component.
|
protected void |
searchUpdate()
Update the search results based on the current query.
|
void |
setBackground(java.awt.Color bg) |
void |
setCancelColor(java.awt.Color c)
Set the fill color of the cancel 'x' button that appears
when the button has the mouse pointer over it.
|
void |
setFont(java.awt.Font f) |
void |
setForeground(java.awt.Color fg) |
void |
setLabelText(java.lang.String text)
Set the label text used on this component.
|
void |
setLock(java.lang.Object lock)
Set the lock, an object to synchronize on while issuing queries.
|
void |
setOpaque(boolean opaque) |
void |
setQuery(java.lang.String query)
Set the query string in the text field.
|
void |
setShowBorder(boolean b)
Indicates if the component should show a border around the text field.
|
void |
setShowCancel(boolean b)
Indicates if the component should show the cancel query button.
|
void |
setShowResultCount(boolean b)
Indicates if the component should show the number of search results.
|
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, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, 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, transferFocusUpCyclepublic JSearchPanel(SearchTupleSet search, java.lang.String field)
search - the search tuple set conducting the searchesfield - the data field being searchedpublic JSearchPanel(SearchTupleSet search, java.lang.String field, boolean monitorKeystrokes)
search - the search tuple set conducting the searchesfield - the data field being searchedmonitorKeystrokes - indicates if each keystroke event should result
in a new search being issued (true) or if searches should only be
initiated by hitting the enter key (false)public JSearchPanel(TupleSet source, SearchTupleSet search, java.lang.String[] fields, boolean autoIndex, boolean monitorKeystrokes)
source - the source set of tuples that should be searched oversearch - the search tuple set conducting the searchesfields - the data fields being searchedmonitorKeystrokes - indicates if each keystroke event should result
in a new search being issued (true) or if searches should only be
initiated by hitting the enter key (false)public JSearchPanel(Visualization vis, java.lang.String field)
vis - the Visualization to search overfield - the data field being searchedpublic JSearchPanel(Visualization vis, java.lang.String group, java.lang.String field)
vis - the Visualization to search overgroup - the particular data group to search overfield - the data field being searchedpublic JSearchPanel(Visualization vis, java.lang.String group, java.lang.String field, boolean autoIndex)
vis - the Visualization to search overgroup - the particular data group to search overfield - the data field being searchedautoIndex - indicates if items should be automatically
indexed and unindexed as their membership in the source group
changes.public JSearchPanel(Visualization vis, java.lang.String group, java.lang.String field, boolean autoIndex, boolean monitorKeystrokes)
vis - the Visualization to search overgroup - the particular data group to search overfield - the data field being searchedautoIndex - indicates if items should be automatically
indexed and unindexed as their membership in the source group
changes.monitorKeystrokes - indicates if each keystroke event should result
in a new search being issued (true) or if searches should only be
initiated by hitting the enter key (false)public JSearchPanel(Visualization vis, java.lang.String group, java.lang.String searchGroup, java.lang.String field, boolean autoIndex, boolean monitorKeystrokes)
vis - the Visualization to search overgroup - the particular data group to search oversearchGroup - the group name that resolves to the SearchTupleSet
to usefield - the data field being searchedautoIndex - indicates if items should be automatically
indexed and unindexed as their membership in the source group
changes.monitorKeystrokes - indicates if each keystroke event should result
in a new search being issued (true) or if searches should only be
initiated by hitting the enter key (false)public JSearchPanel(Visualization vis, java.lang.String group, java.lang.String searchGroup, java.lang.String[] fields, boolean autoIndex, boolean monitorKeystrokes)
vis - the Visualization to search overgroup - the particular data group to search oversearchGroup - the group name that resolves to the SearchTupleSet
to usefields - the data fields being searchedautoIndex - indicates if items should be automatically
indexed and unindexed as their membership in the source group
changes.monitorKeystrokes - indicates if each keystroke event should result
in a new search being issued (true) or if searches should only be
initiated by hitting the enter key (false)public void requestFocus()
requestFocus in class javax.swing.JComponentpublic void setLock(java.lang.Object lock)
lock - the synchronization lockpublic void setShowResultCount(boolean b)
b - true to show the result count, false to hide itpublic void setShowBorder(boolean b)
b - true to show the text field border, false to hide itpublic void setShowCancel(boolean b)
b - true to show the cancel query button, false to hide itprotected void searchUpdate()
public void setQuery(java.lang.String query)
query - the query string to usepublic java.lang.String getQuery()
public void setCancelColor(java.awt.Color c)
c - the cancel colorpublic void setBackground(java.awt.Color bg)
setBackground in class javax.swing.JComponentComponent.setBackground(java.awt.Color)public void setForeground(java.awt.Color fg)
setForeground in class javax.swing.JComponentComponent.setForeground(java.awt.Color)public void setOpaque(boolean opaque)
setOpaque in class javax.swing.JComponentJComponent.setOpaque(boolean)public void setFont(java.awt.Font f)
setFont in class javax.swing.JComponentComponent.setFont(java.awt.Font)public void setLabelText(java.lang.String text)
text - the label text, use null to show no labelpublic void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate in interface javax.swing.event.DocumentListenerDocumentListener.changedUpdate(javax.swing.event.DocumentEvent)public void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate in interface javax.swing.event.DocumentListenerDocumentListener.insertUpdate(javax.swing.event.DocumentEvent)public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate in interface javax.swing.event.DocumentListenerDocumentListener.removeUpdate(javax.swing.event.DocumentEvent)public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerActionListener.actionPerformed(java.awt.event.ActionEvent)