Package com.portal.search
Class SearchPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.pfc.ui.ImagePanel
com.portal.bas.comp.PIAPanel
com.portal.search.SearchPanel
- All Implemented Interfaces:
PClientComponent,PCollectDataListener,PComponent,PComponentAttribute,PViewComponent,PViewDataChangeListener,ContainerListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
Panel for doing searches. It contains two modes: one for displaying a
single search template, one for displaying a group of templates in a
tabbed pane for layered searching.
- Version:
- %version: 23 % %date_modified: Thu Feb 07 11:44:42 2002 %
- Author:
- mgaines
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class com.portal.bas.comp.PIAPanel
collectDataFromInvisiblePanels, isTracking, mIAList, mImplFields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImageFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a search panel using a tabbed pane for selecting search templates.SearchPanel(Properties p, boolean b) Constructs a search panel using either a tabbed pane, which will allow the user to select from a list of templates, or a panel that displays a single template.SearchPanel(Properties p, boolean b, String[] data, oracle.help.CSHManager cshManager) Constructs a search panel using either a tabbed pane, which will allow the user to select from a list of templates, or a panel that displays a single template.SearchPanel(Properties p, boolean b, String tmpl, oracle.help.CSHManager cshManager) Constructs a search panel using either a tabbed pane, which will allow the user to select from a list of templates, or a panel that displays a single template. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an action listener to the buttons of the dialog.voidAdd a search listener for the search results.voidAdd a SearchInfoListener.voidConnects the search panel to a class that is interested in the results of the search.voidcollectData(PCollectDataEvent event) Override collectData(), turning it into a no-op.protected voidfireSearchProgress(Integer prog) Sends a SearchEvent which contains the progress of the search.protected voidfireSearchResultData(ResultData[] res) Sends a SearchEvent which contains the results of the search.protected voidfireSearchResults(PModelHandle[] res) Sends a SearchEvent which contains the results of the search.Gets the class name for this panel's controller.voidRemoves the given action listener from the dialog.voidRemove a search listener.voidRemoves a SearchInfoListener.voidDisconnects the search panel to a class that is interested in the results of the search.voidsetCurrentTemplate(String tmpl) Updates the UI with the given template.voidsetInitialData(String[] data) Sets the initial data to be displayed in the panel.voidsetResultFields(String[] fields) Set the 'resultFields' property, which is used in the search.voidsetTabbedPane(boolean b) Sets the property tabbedPane to the given value.voidThis method will initialize the SearchTemplates for the panel and it's controller.voidListens for change events from the controller.Methods inherited from class com.portal.bas.comp.PIAPanel
clear, componentAdded, componentRemoved, containsError, firePropertyChange, fireVetoableChange, getBackgroundImageSource, getBundle, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, resetToDefault, revertToPrimary, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setModelHandle, setRequired, setResourceName, togglePrimaryToSecondary, unregisterMethods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIconMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, 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, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods 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, transferFocusDownCycle, validate, validateTreeMethods 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
SearchPanel
public SearchPanel() -
SearchPanel
Constructs a search panel using a tabbed pane for selecting search templates.- Parameters:
p- the search template definition
-
SearchPanel
Constructs a search panel using either a tabbed pane, which will allow the user to select from a list of templates, or a panel that displays a single template.- Parameters:
p- the search template definitionb- indicates whether the panel should use a tabbed pane
-
SearchPanel
Constructs a search panel using either a tabbed pane, which will allow the user to select from a list of templates, or a panel that displays a single template. The given template is then loaded in by default.- Parameters:
p- the search template definitionb- indicates whether the panel should use a tabbed panetmpl- the template to load in by defaultcshManager- context Sensitive help manager
-
SearchPanel
Constructs a search panel using either a tabbed pane, which will allow the user to select from a list of templates, or a panel that displays a single template. The given data is then loaded in by default.- Parameters:
p- the search template definitionb- indicates whether the panel should use a tabbed panedata- the inital data to display in the windowcshManager- context Sensitive help manager
-
-
Method Details
-
setCurrentTemplate
Updates the UI with the given template. If the tabbed pane is showing, then the given panel is added to the pane, otherwise it replaces the exisiting panel.- Parameters:
tmpl- the template to load in the panel
-
setInitialData
Sets the initial data to be displayed in the panel.- Parameters:
data- any initial data to be loaded into the panel
-
setTabbedPane
public void setTabbedPane(boolean b) Sets the property tabbedPane to the given value. If the value is false, than a single template will be shown. Note: this method will update the panel if possible.- Parameters:
b- if false, displays a single template
-
setTemplates
This method will initialize the SearchTemplates for the panel and it's controller. These templates are used to formulate searches and the controls displayed in the panel.- Parameters:
p- the new set of Properties to use.
-
addSearchEventListener
Add a search listener for the search results.- Parameters:
l- the listener to add
-
removeSearchEventListener
Remove a search listener.- Parameters:
l- the listener to remove
-
addSearchInfoListener
Add a SearchInfoListener. This listener will get information about the search excluding result information. As a side effect, if there are any remote listeners defined, they will be added to the remote listener list. The remote listeners will recieve information about the search results.- Parameters:
l- the listener to add.
-
removeSearchInfoListener
Removes a SearchInfoListener. As a side effect, if there are any remote listeners defined, they will be released from the remote listener list.- Parameters:
l- the listener to add.
-
addActionListener
Adds an action listener to the buttons of the dialog. The listener will be notified if one of the dialog buttons is pressed.- Parameters:
l- the action listener to be added
-
removeActionListener
Removes the given action listener from the dialog.- Parameters:
l- the action listener to be removed
-
addSearchResultsListener
Connects the search panel to a class that is interested in the results of the search.- Parameters:
l- the class interested in the search
-
removeSearchResultsListener
Disconnects the search panel to a class that is interested in the results of the search.- Parameters:
l- the class disinterested in the search
-
getControllerClassName
Gets the class name for this panel's controller.- Specified by:
getControllerClassNamein interfacePComponent- Overrides:
getControllerClassNamein classPIAPanel- Returns:
- the controller's class name
- Throws:
RemoteException- thrown for errors
-
collectData
Override collectData(), turning it into a no-op. This panel uses it's own mechanism for collecting search criteria.- Specified by:
collectDatain interfacePCollectDataListener- Overrides:
collectDatain classPIAPanel- Parameters:
event- thePCollectDataEventdata event
-
viewDataChange
Listens for change events from the controller.- Specified by:
viewDataChangein interfacePViewDataChangeListener- Overrides:
viewDataChangein classPIAPanel- Parameters:
event- the data change event- Throws:
RemoteException- thrown for errors
-
setResultFields
Set the 'resultFields' property, which is used in the search. This will ensure that these fields are returned from the search results regardless of the fields that are defined in the search template.- Parameters:
fields- the new list of fields expected for each found result
-
fireSearchProgress
Sends a SearchEvent which contains the progress of the search.- Parameters:
prog- the number of items found in the search
-
fireSearchResults
Sends a SearchEvent which contains the results of the search.- Parameters:
event- the search event
-
fireSearchResultData
Sends a SearchEvent which contains the results of the search.- Parameters:
event- the search event
-