com.pallas.swing.psearchcombo
Class PSearchCombo

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.pallas.swing.psearchcombo.PSearchCombo
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, PCombo, java.io.Serializable

public class PSearchCombo
extends javax.swing.JPanel
implements PCombo

Title: $FileName: PSearchCombo.java$

Version:
$VerNum: 2$
Author:
$AuthorName: Rob MacGrogan$

$Description: $
$KeyWordsOff: $

See Also:
Serialized Form

Field Summary
private  PComboBox pcombo
           
private  PSearchPopupWindow popup
           
private  javax.swing.JButton searchButton
           
 
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
PSearchCombo()
          Constructor for PSearchCombo.
PSearchCombo(javax.swing.ComboBoxModel aModel)
          Constructor for PSearchCombo.
PSearchCombo(java.lang.Object[] items)
          Constructor for PSearchCombo.
PSearchCombo(java.util.Vector items)
          Constructor for PSearchCombo.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
           
 void addActionListener(java.awt.event.ActionListener arg0)
           
 void addItem(java.lang.Object arg0)
           
 void addItemListener(java.awt.event.ItemListener arg0)
           
 void addNotify()
           
 void addPopupMenuListener(javax.swing.event.PopupMenuListener arg0)
           
 void buildIndex()
           
private  javax.swing.JButton buildSerachButton()
           
 void configureEditor(javax.swing.ComboBoxEditor arg0, java.lang.Object arg1)
           
 void contentsChanged(javax.swing.event.ListDataEvent arg0)
           
private  java.awt.Component findUltimateParent()
           
 void firePopupMenuCanceled()
           
 void firePopupMenuWillBecomeInvisible()
           
 void firePopupMenuWillBecomeVisible()
           
 javax.accessibility.AccessibleContext getAccessibleContext()
           
 javax.swing.Action getAction()
           
 java.lang.String getActionCommand()
           
 java.awt.event.ActionListener[] getActionListeners()
           
 javax.swing.JComboBox getComboBox()
           
 javax.swing.ComboBoxEditor getEditor()
           
 java.lang.Object getItemAt(int arg0)
           
 int getItemCount()
           
 java.awt.event.ItemListener[] getItemListeners()
           
 javax.swing.JComboBox.KeySelectionManager getKeySelectionManager()
           
 int getMaximumRowCount()
           
 javax.swing.ComboBoxModel getModel()
           
 javax.swing.event.PopupMenuListener[] getPopupMenuListeners()
           
 java.lang.Object getPrototypeDisplayValue()
           
 javax.swing.ListCellRenderer getRenderer()
           
 javax.swing.JButton getSearchButton()
          Returns the searchButton.
 int getSelectedIndex()
           
 java.lang.Object getSelectedItem()
           
 java.lang.Object[] getSelectedObjects()
           
 javax.swing.JTextField getTextField()
           
 java.util.Enumeration getUpperCaseContents()
           
 void hidePopup()
           
protected  void initializeComponent()
           
protected  void initializePSearchCombo()
           
 void insertItemAt(java.lang.Object arg0, int arg1)
           
 void intervalAdded(javax.swing.event.ListDataEvent arg0)
           
 void intervalRemoved(javax.swing.event.ListDataEvent arg0)
           
 boolean isEditable()
           
 boolean isLightWeightPopupEnabled()
           
 boolean isPopupVisible()
           
 void processKeyEvent(java.awt.event.KeyEvent arg0)
           
 void removeActionListener(java.awt.event.ActionListener arg0)
           
 void removeAllItems()
           
 void removeItem(java.lang.Object arg0)
           
 void removeItemAt(int arg0)
           
 void removeItemListener(java.awt.event.ItemListener arg0)
           
 void removePopupMenuListener(javax.swing.event.PopupMenuListener arg0)
           
 int search(java.lang.String search)
           
 boolean selectWithKeyChar(char arg0)
           
 void setAction(javax.swing.Action arg0)
           
 void setActionCommand(java.lang.String arg0)
           
 void setEditable(boolean arg0)
           
 void setEditor(javax.swing.ComboBoxEditor arg0)
           
 void setEnabled(boolean arg0)
           
 void setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager arg0)
           
 void setLightWeightPopupEnabled(boolean arg0)
           
 void setMaximumRowCount(int arg0)
           
 void setModel(javax.swing.ComboBoxModel arg0)
           
 void setPopupVisible(boolean arg0)
           
 void setPrototypeDisplayValue(java.lang.Object arg0)
           
 void setRenderer(javax.swing.ListCellRenderer arg0)
           
 void setSearchButton(javax.swing.JButton searchButton)
          Sets the searchButton.
 void setSelectedIndex(int arg0)
           
 void setSelectedItem(java.lang.Object arg0)
           
 java.lang.Object setSelectedItemByValue(java.lang.Object item)
           
 void setSelectionByDisplay(java.lang.String display)
           
 void setUI(javax.swing.plaf.ComboBoxUI arg0)
           
 void showPopup()
           
 
Methods inherited from class javax.swing.JPanel
getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, 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, 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

popup

private PSearchPopupWindow popup

pcombo

private PComboBox pcombo

searchButton

private javax.swing.JButton searchButton
Constructor Detail

PSearchCombo

public PSearchCombo(javax.swing.ComboBoxModel aModel)
Constructor for PSearchCombo.

Parameters:
aModel -

PSearchCombo

public PSearchCombo(java.lang.Object[] items)
Constructor for PSearchCombo.

Parameters:
items -

PSearchCombo

public PSearchCombo(java.util.Vector items)
Constructor for PSearchCombo.

Parameters:
items -

PSearchCombo

public PSearchCombo()
Constructor for PSearchCombo.

Method Detail

setSelectedItemByValue

public java.lang.Object setSelectedItemByValue(java.lang.Object item)
Specified by:
setSelectedItemByValue in interface PCombo

initializeComponent

protected void initializeComponent()

findUltimateParent

private java.awt.Component findUltimateParent()

addNotify

public void addNotify()
Overrides:
addNotify in class javax.swing.JComponent

getComboBox

public javax.swing.JComboBox getComboBox()

initializePSearchCombo

protected void initializePSearchCombo()

buildSerachButton

private javax.swing.JButton buildSerachButton()

getUpperCaseContents

public java.util.Enumeration getUpperCaseContents()

buildIndex

public void buildIndex()
Specified by:
buildIndex in interface PCombo
See Also:
PComboBox.buildIndex()

getTextField

public javax.swing.JTextField getTextField()
Specified by:
getTextField in interface PCombo
See Also:
PComboBox.getTextField()

search

public int search(java.lang.String search)
Specified by:
search in interface PCombo
See Also:
PComboBox.search(String)

setEditable

public void setEditable(boolean arg0)
See Also:
JComboBox.setEditable(boolean)

setKeySelectionManager

public void setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager arg0)
See Also:
javax.swing.JComboBox#setKeySelectionManager(KeySelectionManager)

setSelectionByDisplay

public void setSelectionByDisplay(java.lang.String display)
Specified by:
setSelectionByDisplay in interface PCombo
See Also:
PComboBox.setSelectionByDisplay(String)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)
See Also:
ActionListener.actionPerformed(ActionEvent)

addActionListener

public void addActionListener(java.awt.event.ActionListener arg0)
See Also:
JComboBox.addActionListener(ActionListener)

addItem

public void addItem(java.lang.Object arg0)
See Also:
JComboBox.addItem(Object)

addItemListener

public void addItemListener(java.awt.event.ItemListener arg0)
See Also:
ItemSelectable.addItemListener(ItemListener)

addPopupMenuListener

public void addPopupMenuListener(javax.swing.event.PopupMenuListener arg0)
See Also:
JComboBox.addPopupMenuListener(PopupMenuListener)

configureEditor

public void configureEditor(javax.swing.ComboBoxEditor arg0,
                            java.lang.Object arg1)
See Also:
JComboBox.configureEditor(ComboBoxEditor, Object)

contentsChanged

public void contentsChanged(javax.swing.event.ListDataEvent arg0)
See Also:
ListDataListener.contentsChanged(ListDataEvent)

firePopupMenuCanceled

public void firePopupMenuCanceled()
See Also:
JComboBox.firePopupMenuCanceled()

firePopupMenuWillBecomeInvisible

public void firePopupMenuWillBecomeInvisible()
See Also:
JComboBox.firePopupMenuWillBecomeInvisible()

firePopupMenuWillBecomeVisible

public void firePopupMenuWillBecomeVisible()
See Also:
JComboBox.firePopupMenuWillBecomeVisible()

getAccessibleContext

public javax.accessibility.AccessibleContext getAccessibleContext()
Specified by:
getAccessibleContext in interface javax.accessibility.Accessible
Overrides:
getAccessibleContext in class javax.swing.JPanel
See Also:
Component.getAccessibleContext()

getAction

public javax.swing.Action getAction()
See Also:
JComboBox.getAction()

getActionCommand

public java.lang.String getActionCommand()
See Also:
JComboBox.getActionCommand()

getActionListeners

public java.awt.event.ActionListener[] getActionListeners()
See Also:
JComboBox.getActionListeners()

getEditor

public javax.swing.ComboBoxEditor getEditor()
See Also:
JComboBox.getEditor()

getItemAt

public java.lang.Object getItemAt(int arg0)
See Also:
JComboBox.getItemAt(int)

getItemCount

public int getItemCount()
See Also:
JComboBox.getItemCount()

getItemListeners

public java.awt.event.ItemListener[] getItemListeners()
See Also:
JComboBox.getItemListeners()

getKeySelectionManager

public javax.swing.JComboBox.KeySelectionManager getKeySelectionManager()
See Also:
JComboBox.getKeySelectionManager()

getMaximumRowCount

public int getMaximumRowCount()
See Also:
JComboBox.getMaximumRowCount()

getModel

public javax.swing.ComboBoxModel getModel()
See Also:
JComboBox.getModel()

getPopupMenuListeners

public javax.swing.event.PopupMenuListener[] getPopupMenuListeners()
See Also:
JComboBox.getPopupMenuListeners()

getPrototypeDisplayValue

public java.lang.Object getPrototypeDisplayValue()
See Also:
JComboBox.getPrototypeDisplayValue()

getRenderer

public javax.swing.ListCellRenderer getRenderer()
See Also:
JComboBox.getRenderer()

getSelectedIndex

public int getSelectedIndex()
Specified by:
getSelectedIndex in interface PCombo
See Also:
JComboBox.getSelectedIndex()

getSelectedItem

public java.lang.Object getSelectedItem()
Specified by:
getSelectedItem in interface PCombo
See Also:
JComboBox.getSelectedItem()

getSelectedObjects

public java.lang.Object[] getSelectedObjects()
See Also:
ItemSelectable.getSelectedObjects()

hidePopup

public void hidePopup()
See Also:
JComboBox.hidePopup()

insertItemAt

public void insertItemAt(java.lang.Object arg0,
                         int arg1)
See Also:
JComboBox.insertItemAt(Object, int)

intervalAdded

public void intervalAdded(javax.swing.event.ListDataEvent arg0)
See Also:
ListDataListener.intervalAdded(ListDataEvent)

intervalRemoved

public void intervalRemoved(javax.swing.event.ListDataEvent arg0)
See Also:
ListDataListener.intervalRemoved(ListDataEvent)

isEditable

public boolean isEditable()
See Also:
JComboBox.isEditable()

isLightWeightPopupEnabled

public boolean isLightWeightPopupEnabled()
See Also:
JComboBox.isLightWeightPopupEnabled()

isPopupVisible

public boolean isPopupVisible()
See Also:
JComboBox.isPopupVisible()

processKeyEvent

public void processKeyEvent(java.awt.event.KeyEvent arg0)
Overrides:
processKeyEvent in class javax.swing.JComponent
See Also:
Component.processKeyEvent(KeyEvent)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener arg0)
See Also:
JComboBox.removeActionListener(ActionListener)

removeAllItems

public void removeAllItems()
See Also:
JComboBox.removeAllItems()

removeItem

public void removeItem(java.lang.Object arg0)
See Also:
JComboBox.removeItem(Object)

removeItemAt

public void removeItemAt(int arg0)
See Also:
JComboBox.removeItemAt(int)

removeItemListener

public void removeItemListener(java.awt.event.ItemListener arg0)
See Also:
ItemSelectable.removeItemListener(ItemListener)

removePopupMenuListener

public void removePopupMenuListener(javax.swing.event.PopupMenuListener arg0)
See Also:
JComboBox.removePopupMenuListener(PopupMenuListener)

selectWithKeyChar

public boolean selectWithKeyChar(char arg0)
See Also:
JComboBox.selectWithKeyChar(char)

setAction

public void setAction(javax.swing.Action arg0)
See Also:
JComboBox.setAction(Action)

setActionCommand

public void setActionCommand(java.lang.String arg0)
See Also:
JComboBox.setActionCommand(String)

setEditor

public void setEditor(javax.swing.ComboBoxEditor arg0)
See Also:
JComboBox.setEditor(ComboBoxEditor)

setEnabled

public void setEnabled(boolean arg0)
Overrides:
setEnabled in class javax.swing.JComponent
See Also:
Component.setEnabled(boolean)

setLightWeightPopupEnabled

public void setLightWeightPopupEnabled(boolean arg0)
See Also:
JComboBox.setLightWeightPopupEnabled(boolean)

setMaximumRowCount

public void setMaximumRowCount(int arg0)
See Also:
JComboBox.setMaximumRowCount(int)

setModel

public void setModel(javax.swing.ComboBoxModel arg0)
See Also:
JComboBox.setModel(ComboBoxModel)

setPopupVisible

public void setPopupVisible(boolean arg0)
See Also:
JComboBox.setPopupVisible(boolean)

setPrototypeDisplayValue

public void setPrototypeDisplayValue(java.lang.Object arg0)
See Also:
JComboBox.setPrototypeDisplayValue(Object)

setRenderer

public void setRenderer(javax.swing.ListCellRenderer arg0)
See Also:
JComboBox.setRenderer(ListCellRenderer)

setSelectedIndex

public void setSelectedIndex(int arg0)
See Also:
JComboBox.setSelectedIndex(int)

setSelectedItem

public void setSelectedItem(java.lang.Object arg0)
See Also:
JComboBox.setSelectedItem(Object)

setUI

public void setUI(javax.swing.plaf.ComboBoxUI arg0)
See Also:
JComboBox.setUI(ComboBoxUI)

showPopup

public void showPopup()
See Also:
JComboBox.showPopup()

getSearchButton

public javax.swing.JButton getSearchButton()
Returns the searchButton.

Returns:
JButton

setSearchButton

public void setSearchButton(javax.swing.JButton searchButton)
Sets the searchButton.

Parameters:
searchButton - The searchButton to set


Copyright © 2003 Pallas Technology.