|
||||||||||
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 javax.swing.JComponent javax.swing.JPanel prefuse.util.ui.JSearchPanel
public class JSearchPanel
Swing component that enables keyword search over prefuse data tuples.
SearchQueryBinding
,
Serialized FormNested Class Summary | |
---|---|
class |
JSearchPanel.CancelButton
A button depicted as an "X" that allows users to cancel the current query and clear the query field. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
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 |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, update |
Methods inherited from class java.awt.Container |
---|
add, 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, 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, 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, hide, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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)Method Detail |
---|
public void requestFocus()
requestFocus
in class javax.swing.JComponent
public 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.JComponent
Component.setBackground(java.awt.Color)
public void setForeground(java.awt.Color fg)
setForeground
in class javax.swing.JComponent
Component.setForeground(java.awt.Color)
public void setOpaque(boolean opaque)
setOpaque
in class javax.swing.JComponent
JComponent.setOpaque(boolean)
public void setFont(java.awt.Font f)
setFont
in class javax.swing.JComponent
Component.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.DocumentListener
DocumentListener.changedUpdate(javax.swing.event.DocumentEvent)
public void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate
in interface javax.swing.event.DocumentListener
DocumentListener.insertUpdate(javax.swing.event.DocumentEvent)
public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate
in interface javax.swing.event.DocumentListener
DocumentListener.removeUpdate(javax.swing.event.DocumentEvent)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
ActionListener.actionPerformed(java.awt.event.ActionEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |