public class PIASimpleSearch extends JButton implements PViewComponent, ActionListener, Serializable
PIASimpleSearch is a Swing-compatible, generic search
button. Uses a PCollectDataEvent to
collect search data. Its data is the results of the search.JButton.AccessibleJButtonAbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListenerJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyactionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTYlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WESTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
PIASimpleSearch()
Constructs a generic search button and adds an
ActionListener to it. |
PIASimpleSearch(String label)
Constructs a generic search button with a label and adds
an
ActionListener to it. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent evt)
Invoked when a search
Action occurs. |
void |
addCollectDataListener(PCollectDataListener l)
Adds a collect data event listener.
|
protected Vector |
collectData() |
void |
firePropertyChange(String prop,
Object oldV,
Object newV)
Fires a property change event.
|
void |
fireVetoableChange(String prop,
Object oldV,
Object newV)
Fires a vetoable property change event.
|
String |
getControllerClassName()
Gets the class name for the controller of this class.
|
PModelHandle |
getModelHandle()
Gets the data for the component to use.
|
PRemoteComponent |
getRemoteComponent()
Gets a reference to the remote component for this object.
|
String |
getResourceName()
Gets the base resource name used in resource look up.
|
String |
getStorableClass()
Gets the storable class searched for by this component.
|
Vector |
getTools()
Gets a list of actions supported by this component.
|
boolean |
isLight()
Determines whether this is a lightweight component.
|
void |
removeCollectDataListener(PCollectDataListener l)
Removes a collect data event listener from the list.
|
void |
setModelHandle(PModelHandle data)
Sets the data for the component to use.
|
void |
setResourceName(String name)
Sets the base resource name used in resource look up.
|
void |
setStorableClass(String sclass)
Sets the class used by the component for searches.
|
void |
unregister()
Used to disassociate this component from its delegate (controller)
|
void |
viewDataChange(PViewDataChangeEvent event)
Overrides
PViewDataChangeListener. |
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUIactionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPositionaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, 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, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, 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, 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, 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, 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 PIASimpleSearch()
ActionListener to it.public PIASimpleSearch(String label)
ActionListener to it.label - the String to use for the labelpublic void unregister()
throws RemoteException
unregister in interface PClientComponentRemoteExceptionpublic void setModelHandle(PModelHandle data) throws RemoteException
setModelHandle in interface PComponentdata - the new flist to display fromRemoteException - thrown for errorspublic PModelHandle getModelHandle() throws RemoteException
getModelHandle in interface PComponentRemoteException - thrown for errorspublic boolean isLight()
throws RemoteException
getModelHandle always
returns null, setModelHandle is ignored, and no
property change events are generated.isLight in interface PComponentRemoteException - thrown for errorspublic String getControllerClassName() throws RemoteException
getControllerClassName in interface PComponentString with the component's controller class name.RemoteException - thrown for errorspublic Vector getTools()
Action supplied
includes help for this component.getTools in interface PClientComponentVector that contains Action objects.public void setResourceName(String name)
setResourceName in interface PClientComponentname - a String that contains the new base resource namepublic String getResourceName()
getResourceName in interface PClientComponentString with the base resource namepublic void firePropertyChange(String prop, Object oldV, Object newV)
firePropertyChange in interface PViewComponentfirePropertyChange in class Componentprop - the property being changedoldV - the old valuenewV - the new valuepublic void fireVetoableChange(String prop, Object oldV, Object newV) throws PropertyVetoException
fireVetoableChange in interface PViewComponentfireVetoableChange in class JComponentprop - the property being changedoldV - the old valuenewV - the new valuePropertyVetoException - thrown if the proposed change represents
an unacceptable valuepublic PRemoteComponent getRemoteComponent()
getRemoteComponent in interface PViewComponentPRemoteComponent reference to the object.public void viewDataChange(PViewDataChangeEvent event) throws RemoteException
PViewDataChangeListener. This method is
no longer called by the controller itself. To ensure backward compatibility,
it is called after the model is set, by any operation that causes a change in
the display data. The client code should call the appropriate
get() methods on the controller to get the data, as the
PViewDataChangeEvent parameter is no longer used.viewDataChange in interface PViewDataChangeListenerevent - the PViewDataChangeEvent event that
describes the change. No longer used. By default, the value
passed in is always set to null.RemoteException - thrown for errorspublic void addCollectDataListener(PCollectDataListener l)
l - the new collect data event listener to addpublic void removeCollectDataListener(PCollectDataListener l)
l - the collect data event listener to removepublic void setStorableClass(String sclass) throws RemoteException
class - the storable class name to search forRemoteException - thrown for errorspublic String getStorableClass() throws RemoteException
RemoteException - thrown for errorspublic void actionPerformed(ActionEvent evt)
Action occurs.actionPerformed in interface ActionListenerevt - the search ActionEventprotected Vector collectData() throws RemoteException
RemoteExceptionCopyright © 2003, 2023, Oracle and/or its affiliates.