wt.clients.csm.search
Class SearchSelector

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bywt.clients.csm.search.SearchSelector
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class SearchSelector
extends JPanel

See Also:
Serialized Form

Nested Class Summary
(package private)  class SearchSelector.TabChangeListener
           
(package private)  class SearchSelector.TextFieldKeyListener
          Binh added this nested class to implement the control of searchButton.
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  Component component
           
private  JPanel containerPanel
           
private static boolean debug
           
protected  GraphicalPanelSelector gp
           
private  String[] matchingPatterns
           
(package private)  NavStructListView nslv
           
protected  JTabbedPane pane
          reference to JTabbedPane
private  AbstractNodeNodeView[] pathToExpand
           
(package private)  ResourceBundle resource
           
private  JButton searchButton
           
private  JLabel searchLabel
          Binh added these components to implement the navigation node search
private  JPanel searchPanel
           
private  JComboBox searchPatternComboBox
           
private  Vector searchResult
           
private  JTextField searchText
           
private  int selectIndex
           
protected  SearchSelector srcSelectorRef
           
private  JButton testButton
           
protected  NavigationNodeSelector tp
           
 
Fields inherited from class javax.swing.JPanel
 
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.Container
 
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
SearchSelector(ResourceBundle resource, NavStructListView nslv)
          This constructor will create the AttributeValueDetailsEditor, initializeData and Components.
 
Method Summary
 void addSelectorListener(SelectorEventListener list)
           
private  void constructSrcPanel()
          Binh added this function to construct the search Panel which contains a textfield, a comboBox, and a button
private  JComboBox createSearchPatternComboBox()
          Binh added this function to be used by constructSrcPanel()
private  void displayExceptionMessage(String key, Object[] params)
          Display the exception messages with the key plus the parameters.
private  void doSearch()
           
private  String getSearchPattern()
           
private  String getSearchText()
           
 JComponent getSearchTextGuiObject()
          This function is called in SearchResultsFrame.showFrame() to set focus to the JTextField
 NavigationNodeSelector getSelector()
           
 void setComponents()
           
protected  void setCursor(boolean state)
           
protected  void setSelectedIndex(int userSelect)
          The search result dialog calls this function to set the index of the node user selected
private  void showResult()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
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, setVisible, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gp

protected GraphicalPanelSelector gp

tp

protected NavigationNodeSelector tp

debug

private static final boolean debug

searchLabel

private JLabel searchLabel
Binh added these components to implement the navigation node search


searchText

private JTextField searchText

searchPatternComboBox

private JComboBox searchPatternComboBox

matchingPatterns

private String[] matchingPatterns

searchButton

private JButton searchButton

testButton

private JButton testButton

searchPanel

private JPanel searchPanel

containerPanel

private JPanel containerPanel

pathToExpand

private AbstractNodeNodeView[] pathToExpand

srcSelectorRef

protected SearchSelector srcSelectorRef

searchResult

private Vector searchResult

selectIndex

private int selectIndex

pane

protected JTabbedPane pane
reference to JTabbedPane


component

Component component

resource

ResourceBundle resource

nslv

NavStructListView nslv
Constructor Detail

SearchSelector

public SearchSelector(ResourceBundle resource,
                      NavStructListView nslv)
This constructor will create the AttributeValueDetailsEditor, initializeData and Components.

Method Detail

setComponents

public void setComponents()

constructSrcPanel

private void constructSrcPanel()
Binh added this function to construct the search Panel which contains a textfield, a comboBox, and a button


createSearchPatternComboBox

private JComboBox createSearchPatternComboBox()
Binh added this function to be used by constructSrcPanel()


getSearchTextGuiObject

public JComponent getSearchTextGuiObject()
This function is called in SearchResultsFrame.showFrame() to set focus to the JTextField


getSearchText

private String getSearchText()

getSearchPattern

private String getSearchPattern()

setSelectedIndex

protected void setSelectedIndex(int userSelect)
The search result dialog calls this function to set the index of the node user selected

Parameters:
userSelect - int value synchronized

setCursor

protected void setCursor(boolean state)

doSearch

private void doSearch()

showResult

private void showResult()

getSelector

public NavigationNodeSelector getSelector()

addSelectorListener

public void addSelectorListener(SelectorEventListener list)

displayExceptionMessage

private void displayExceptionMessage(String key,
                                     Object[] params)
Display the exception messages with the key plus the parameters.

Parameters:
key - Key to find the string from the resource bundle
params - Parameters passed to the value from the resource bundle