Package com.portal.app.cc
Class PSearchBasePanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.app.cc.PSearchBasePanel
- All Implemented Interfaces:
PIASelectionListener
,ActionListener
,ItemListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
public class PSearchBasePanel
extends JPanel
implements ActionListener, ItemListener, PIASelectionListener
Main search panel that is responsible for handling three functions: it hosts
different search type panels in a card layout fashion. It also lays out
controls (radio buttons/combo box) to select different cards. Finally, it shows the
status of search progress.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PAccountsEntryPanel
protected PAccountsResultsPanel
protected PBillsEntryPanel
protected PBillsResultsPanel
protected JComboBox
protected JPanel
protected JLabel
protected JPanel
protected JPanel
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
ConstructorsConstructorDescriptionCreates the search base panel without any search type panelsPSearchBasePanel
(PSearchComponents[] comps) Creates the search base panel using the data found in PSearchComponents.PSearchBasePanel
(String ep, String rp) Creates the search panels and controls -
Method Summary
Modifier and TypeMethodDescriptionvoid
Event handler for All Brands check box.void
void
Adds the given search components to the panel.void
Call this method to revert the search scope back to global after conducting a singel db search.void
conductSingleDBSearch
(long dbID) Enables the search in a single known DB with the specified id; by default, the search is performed as global.void
Creates and adds the branding widget adjecent to the search type control.void
Creates search type selection control: a combo box.void
Create and configure a component panel that holds the control buttonsvoid
Create a status panel with a status label and an animation icon.Retrieves the accounts entry panel that has been assigned.Retrieves the accounts results panel that has been assigned.Retrieves the bills entry panel that has been assigned.Retrieves the bills results panel that has been assigned.getHelpButton returns the help button referenceRetrieves p-model handle for the selected item in the results tablevoid
boolean
Returns the disabled state of the brand control widgetboolean
isPinned()
Retrieves the push pin statusvoid
Event handler for combo box.void
loadSearchTypePanels
(String ep, String rp) Creates the search entry panel and search results panel for each type and adds them to the cardlayout in the search type panel.void
removes brand selection controlsvoid
Removes the search type combo box, and retains only the accounts seach panel for displayvoid
Removes the search type selection labelvoid
Selection handler that navigates to the selected account.void
Allows to change the branding scope by assigning the new brand directly on the brand tree object.void
setBrandSelectionControlsDisabled
(boolean status) Disables brand selection controlsvoid
setPinned
(boolean b) Assign a boolean pin status, true for pinning or else falsevoid
setPinVisible
(boolean b) setPinVisible set if pin toggle button should be visible or notvoid
Before start new search set the previous selection to nullvoid
setSearchButtonsEnable
(boolean resetState, boolean stopState, boolean searchState) Enables or disables the search buttons based on the boolean value passed.void
setSearchButtonsVisible
(boolean resetState, boolean stopState, boolean searchState, boolean closeState) void
setSearchTypeControlDisabled
(boolean status) Disables search type combo box, which retains only the accounts seach panel for displayvoid
setSingleDBSearchID
(long id) Specifies the database ID to conduct single db searchvoid
Sets the status panel status.void
Displays the current account in the application main window.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, 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
-
Field Details
-
compsPanel
-
searchTypeLabel
-
cBox
-
stPanel
-
statusPanel
-
accountsEntryPanel
-
billsEntryPanel
-
accountsResultsPanel
-
billsResultsPanel
-
-
Constructor Details
-
PSearchBasePanel
public PSearchBasePanel()Creates the search base panel without any search type panels -
PSearchBasePanel
Creates the search base panel using the data found in PSearchComponents.- Parameters:
comps
- an array of search panels to load into the window
-
PSearchBasePanel
Creates the search panels and controls- Parameters:
ep
- String identifier for entry panelsrp
- String identifier for results panels for example, see the calling class
-
-
Method Details
-
addSearchComponent
Adds the given search components to the panel. It takes care of connecting the entry panel to the results panel if it exists.- Parameters:
comps
- an array of search panels to load into the window
-
createCompsPanel
public void createCompsPanel()Create and configure a component panel that holds the control buttons -
loadSearchTypePanels
Creates the search entry panel and search results panel for each type and adds them to the cardlayout in the search type panel.- Parameters:
ep
- properties string of entry panelsrp
- properties string of results panels
-
createComboBoxControl
public void createComboBoxControl()Creates search type selection control: a combo box. -
itemStateChanged
Event handler for combo box.- Specified by:
itemStateChanged
in interfaceItemListener
-
conductSingleDBSearch
public void conductSingleDBSearch(long dbID) Enables the search in a single known DB with the specified id; by default, the search is performed as global. Call the setSingleDBSearchID() to reassign a new database ID.- Parameters:
dbID
- database id
-
conductGlobalSearch
public void conductGlobalSearch()Call this method to revert the search scope back to global after conducting a singel db search. -
setSingleDBSearchID
public void setSingleDBSearchID(long id) Specifies the database ID to conduct single db search- Parameters:
id
- database id
-
actionPerformed
Event handler for All Brands check box.- Specified by:
actionPerformed
in interfaceActionListener
-
createBrandControl
public void createBrandControl()Creates and adds the branding widget adjecent to the search type control. -
addNotify
public void addNotify()- Overrides:
addNotify
in classJComponent
-
setBrandingScope
Allows to change the branding scope by assigning the new brand directly on the brand tree object.- Parameters:
ep
- scope entry point
-
setSearchTypeControlDisabled
public void setSearchTypeControlDisabled(boolean status) Disables search type combo box, which retains only the accounts seach panel for display -
removeSearchTypeControl
public void removeSearchTypeControl()Removes the search type combo box, and retains only the accounts seach panel for display -
removeSearchTypeLabel
public void removeSearchTypeLabel()Removes the search type selection label -
isBrandSelectionControlsDisabled
public boolean isBrandSelectionControlsDisabled()Returns the disabled state of the brand control widget- Returns:
- true if the tree is disabled; false if enabled; false if the brand tree is not being used.
-
setBrandSelectionControlsDisabled
public void setBrandSelectionControlsDisabled(boolean status) Disables brand selection controls -
removeBrandSelectionControls
public void removeBrandSelectionControls()removes brand selection controls -
createStatusPanel
public void createStatusPanel()Create a status panel with a status label and an animation icon. -
setStatus
Sets the status panel status.- Parameters:
text
- status textaccountStatus
- true means account status else bills status
-
selectionChanged
Selection handler that navigates to the selected account.- Specified by:
selectionChanged
in interfacePIASelectionListener
- Parameters:
event
- the event to handle
-
setPreviousSelectionNull
public void setPreviousSelectionNull()Before start new search set the previous selection to null -
showCurrentAccount
public void showCurrentAccount()Displays the current account in the application main window. -
getSelectedAccount
Retrieves p-model handle for the selected item in the results table -
hideDialog
public void hideDialog() -
getAccountsEntryPanel
Retrieves the accounts entry panel that has been assigned. -
getAccountsResultsPanel
Retrieves the accounts results panel that has been assigned. -
getBillsEntryPanel
Retrieves the bills entry panel that has been assigned. -
getBillsResultsPanel
Retrieves the bills results panel that has been assigned. -
isPinned
public boolean isPinned()Retrieves the push pin status -
setPinned
public void setPinned(boolean b) Assign a boolean pin status, true for pinning or else false -
setPinVisible
public void setPinVisible(boolean b) setPinVisible set if pin toggle button should be visible or not- Parameters:
b
- boolean
-
setSearchButtonsVisible
public void setSearchButtonsVisible(boolean resetState, boolean stopState, boolean searchState, boolean closeState) -
setSearchButtonsEnable
public void setSearchButtonsEnable(boolean resetState, boolean stopState, boolean searchState) Enables or disables the search buttons based on the boolean value passed.- Parameters:
resetState
- boolean true means enables the reset button else disables it.stopState
- boolean true means enables the stop button else disables it.searchState
- boolean true means enables the search button else disables it.
-
getHelpButton
getHelpButton returns the help button reference- Returns:
- JButton
-
getStatusPanel
-