Package com.portal.bas.comp
Class PIACustomizablePanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.pfc.ui.ImagePanel
com.portal.bas.comp.PIACustomizablePanel
- All Implemented Interfaces:
PAppComponent,PClientComponent,PCollectDataListener,PComponent,PComponentAttribute,PViewDataChangeListener,ContainerListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
- Direct Known Subclasses:
AbstractSearchModule,AdjustEventPanel,BrowserPanel,BrowseWin,PAccountsResultsPanel,PAccountTitlePanel,PActiveAccountManager,PARAcctAdjustPanel,PARAllocatePanel,PARBillAdjustPanel,PARConnectionAdjustPanel,PARCreditLimitPanel,PARDebitAllocatePanel,PAREventAdjustPanel,PAREventDisputePanel,PAREventSettlementPanel,PARItemAdjustPanel,PARWriteoffPanel,PAvailableServicesPanel,PBackdateSetupPanel,PBestConfigPanel,PBestPricingSavingsPanel,PBillingPage,PBillUnitDetailsPanel,PBillUnitPanel,PCAConsumerPaymentBillPanel,PChangeAccountStatusOptionPanel,PChargeSharingPanel,PCollectionsMembershipPanel,PCollectionsSharingPanel,PComparePage,PContactPanel,PCreditLimitPage,PCustomerCenterInternals,PCustomizeProductsPanel,PDeviceSearchResultsPanelBase,PDiscountSharingPanel,PEffectiveMoveDatePanel,PGeneralPage,PI18NPanel,PIACAPaymentPanel,PIAExtendedServicesBase,PIASearchPanel,PMaintenancePage,PMapInfoPage,PMembershipPanel,PNCDetailPanel,PNCPanel,PNewServicePage,PNewServiceTable,PNonCurrencyResourcePanel,PNotesPage,PNumberResultsPanel,POwnershipPanel,PPageTemplate,PPaymentWizard,PPlanOptionsPage,PProductAttributesPanel,PProductsViewConfigPanel,PProfileMembershipPanel,PProfileSharingPanel,PPromotionPanel,PPurchasePanel,PRemoveBillInProgressPanel,PRemoveHierarchyPage,PRemovePaymentSetupPanel,PRolloverTransferPanel,PRolloverTransferSearchExtendedWizardPanel,PRolloverTransferTablePanel,PSearchButtonPanel,PSearchExtendedWizardPanel,PServiceTable,PSettopResultsPanel,PSIMResultsPanel,PSummaryPanel,PTelcoPromotionPanel,PVoucherPage,ResultsTablePanel
public class PIACustomizablePanel
extends ImagePanel
implements PAppComponent, PComponentAttribute, PCollectDataListener, ContainerListener, Serializable
- Version:
- %version: 10 % %date_modified: Fri Nov 02 09:26:04 2001 %
- Author:
- larrylf
- 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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected LinkedListprotected PIAComponentCollectionprotected LinkedListFields 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
ConstructorsConstructorDescriptionCreates aPIACustomizablePanelthat contains some knowledge of Portal.PIACustomizablePanel(ImageIcon img, int mode) Creates aPIACustomizablePanelthat contains some knowledge of Portal. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()A convenience method that clears all Portal-aware descendants of this panel.voidcollectData(PCollectDataEvent event) OverridesPCollectDataListener.voidTracks all Portal-aware components that are added to this panel.voidTracks all Portal-aware components that are removed from this panel.booleancontainsError(Object obj) This method is not implemented in this class, but provides a mechanism to pass error data to subclasses.Gets the supplied background image.static ResourceBundleUsed byPIAPanelsubclasses set up for use in Borland JBuilder.Retrieves the class name of this component's controller, in this case, null.Retrieves thePModelHandlefor this component.Gets a reference to the remote component for this object.Gets the base resource name used in resource lookup.getTools()Gets a list of actions supported by this component.booleanisClean()Determines if any descendant is marked DIRTY or ERROR.booleanDetermines whether any component in the widget tree currently displays currency data.booleanisDirty()Determines if any descendant is marked DIRTY in its current context.booleanisError()Determines if any descendant is marked ERROR in its current context.booleanServes as a convenience method to toggle theinputTrackingproperty for all descendants of this panel.booleanisLight()Determines if this component delegatesPModelHandleprocessing to its parent container.booleanDetermines if any descendant is required in its current context.protected ObjectprocessError(PModelHandle err) Provides a hook for subclasses to react to errors.voidA convenience method that resets every field on this panel.voidrevertToPrimary(int primary) Causes previously toggled data to be reverted back to the primary currency.voidsetBackgroundImageMode(int drawMode) Sets the drawing mode for the background image.voidSets the supplied background image.voidsetClean()A convenience method that marks allPFieldComponentcomponents in this panel as CLEAN.voidsetCurrencyDisplay(boolean b) Determines if this component currently displays currency data.voidEstablishes the current value of every Portal-aware descendant as the default value for that component.voidsetError(boolean b) Passes thesetErrormethod call to all Portal-aware descendants.voidsetInputTracking(boolean b) A convenience method to toggle theinputTrackingproperty for all descendants of this panel.voidsetModelHandle(PModelHandle data) Establishes thePModelHandlefor this component and all its descendants.voidsetRequired(boolean b) Delegates thesetRequired()method call to all Portal-aware descendants.voidsetResourceName(String name) Sets the base resource name used in resource lookup.togglePrimaryToSecondary(int pri, int sec) Walks through the component hierarchy and, for those components that display currency (isCurrencyDisplayreturns true), converts the displayed data to the new currency type.voidUsed to disconnect the controller from the component for all child widgets contained within this panel.voidOverridesPViewDataChangeListener.Methods 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, 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, 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, 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
-
Field Details
-
mIAList
-
unregList
-
mImpl
-
isTracking
protected boolean isTracking
-
-
Constructor Details
-
PIACustomizablePanel
public PIACustomizablePanel()Creates aPIACustomizablePanelthat contains some knowledge of Portal. This panel can display a default image centered in the background. -
PIACustomizablePanel
Creates aPIACustomizablePanelthat contains some knowledge of Portal. This panel can display a specified image in the background.- Parameters:
img- the image to displaymode- an indicator of how to display the background image
-
-
Method Details
-
unregister
Used to disconnect the controller from the component for all child widgets contained within this panel.- Specified by:
unregisterin interfacePClientComponent- Throws:
RemoteException
-
setModelHandle
Establishes thePModelHandlefor this component and all its descendants.- Specified by:
setModelHandlein interfacePComponent- Parameters:
data- the newPModelHandlefrom which to extract information- Throws:
RemoteException- thrown for errors
-
getModelHandle
Retrieves thePModelHandlefor this component.- Specified by:
getModelHandlein interfacePComponent- Returns:
- The
PModelHandleassociated with this component. - Throws:
RemoteException- thrown for errors
-
isLight
Determines if this component delegatesPModelHandleprocessing to its parent container. If so, the parent container passes thePModelHandleto this component on the server side (by way of the controller), which saves a client/server round trip for data exchange.If specific processing is required, when
PModelHandleis called subclass this component and override this method. Otherwise,setModelHandle()is not called.- Specified by:
isLightin interfacePComponent- Returns:
- False, by default.
- Throws:
RemoteException- thrown for errors
-
getControllerClassName
Retrieves the class name of this component's controller, in this case, null.- Specified by:
getControllerClassNamein interfacePComponent- Returns:
- A null
String. - Throws:
RemoteException- thrown for errors
-
getTools
Gets a list of actions supported by this component. When subclassed, the overriding class should call its superclass version, then add its actions to the returned list. This preserves actions supplied by base classes. The default, supplied here, includes help for this component.- Specified by:
getToolsin interfacePClientComponent- Returns:
- A
Vectorthat containsActionobjects.
-
setResourceName
Sets the base resource name used in resource lookup. Basically, the resource name is this base, followed by a dot, followed by the local name (label).- Specified by:
setResourceNamein interfacePClientComponent- Parameters:
name- the new base resource name
-
getResourceName
Gets the base resource name used in resource lookup.- Specified by:
getResourceNamein interfacePClientComponent- Returns:
- A
Stringwith the base resource name.
-
getRemoteComponent
Gets a reference to the remote component for this object. The remote component interfaces with this component's controller.- Specified by:
getRemoteComponentin interfacePAppComponent- Returns:
- A
Remotecomponent.
-
viewDataChange
OverridesPViewDataChangeListener. 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 appropriategetmethods on the controller to get the data, because the() PViewDataChangeEventparameter is no longer used.- Specified by:
viewDataChangein interfacePViewDataChangeListener- Parameters:
event- thePViewDataChangeEventevent that describes the change. No longer used. By default, the value passed in is always set to null.- Throws:
RemoteException- thrown for errors
-
setBackgroundImageSource
Sets the supplied background image.- Parameters:
loc- the location of the image source
-
getBackgroundImageSource
Gets the supplied background image.- Returns:
- A
Stringwith the location of the image source.
-
setBackgroundImageMode
public void setBackgroundImageMode(int drawMode) Sets the drawing mode for the background image.- Overrides:
setBackgroundImageModein classImagePanel- Parameters:
drawMode- the mode to use for drawing the background image
-
componentAdded
Tracks all Portal-aware components that are added to this panel.- Specified by:
componentAddedin interfaceContainerListener- Parameters:
e- the event that indicates a child was added
-
componentRemoved
Tracks all Portal-aware components that are removed from this panel.- Specified by:
componentRemovedin interfaceContainerListener- Parameters:
e- the event that indicates a child was removed
-
setRequired
public void setRequired(boolean b) Delegates thesetRequired()method call to all Portal-aware descendants.- Specified by:
setRequiredin interfacePComponentAttribute- Parameters:
b- if true, puts the component in REQUIRED state
-
isRequired
public boolean isRequired()Determines if any descendant is required in its current context.- Specified by:
isRequiredin interfacePComponentAttribute- Returns:
- True if any descendant is marked REQUIRED; false otherwise.
-
setError
public void setError(boolean b) Passes thesetErrormethod call to all Portal-aware descendants.- Specified by:
setErrorin interfacePComponentAttribute- Parameters:
b- if true, puts the component in ERROR state
-
isError
public boolean isError()Determines if any descendant is marked ERROR in its current context.- Specified by:
isErrorin interfacePComponentAttribute- Returns:
- True if any descendant is marked ERROR; false otherwise.
-
isDirty
public boolean isDirty()Determines if any descendant is marked DIRTY in its current context.- Specified by:
isDirtyin interfacePComponentAttribute- Returns:
- True if any descendant is marked DIRTY; false otherwise.
-
setDefault
public void setDefault()Establishes the current value of every Portal-aware descendant as the default value for that component.- Specified by:
setDefaultin interfacePComponentAttribute
-
isCurrencyDisplay
public boolean isCurrencyDisplay()Determines whether any component in the widget tree currently displays currency data.- Specified by:
isCurrencyDisplayin interfacePComponentAttribute- Returns:
- True if a component currently displays currency data; false otherwise.
- Since:
- Release 6.2
-
setCurrencyDisplay
public void setCurrencyDisplay(boolean b) Determines if this component currently displays currency data. Widgets that display currency data are capable of automatically toggling their data between a primary and secondary Portal currency type. This method iterates through the widget tree and callssetCurrencyDisplayon every child component- Specified by:
setCurrencyDisplayin interfacePComponentAttribute- Parameters:
b- if true, indicates that the widget currently displays currency data- Since:
- Release 6.2
-
togglePrimaryToSecondary
Walks through the component hierarchy and, for those components that display currency (isCurrencyDisplayreturns true), converts the displayed data to the new currency type.- Specified by:
togglePrimaryToSecondaryin interfacePComponentAttribute- Parameters:
pri- The primary Portal currency IDsec- The secondary Portal currency IDfrom- the current currency ID used to display the datato- the new currency ID to use to display the data- Throws:
RemoteException- thrown for errors- Since:
- Release 6.2
-
revertToPrimary
Causes previously toggled data to be reverted back to the primary currency.- Specified by:
revertToPrimaryin interfacePComponentAttribute- Parameters:
primary- The primary currency- Throws:
RemoteException
-
isClean
public boolean isClean()Determines if any descendant is marked DIRTY or ERROR.- Returns:
- True if no descendant is marked DIRTY or ERROR, false otherwise.
-
setClean
public void setClean()A convenience method that marks allPFieldComponentcomponents in this panel as CLEAN. Useful if components have been marked DIRTY becauseInputTrackingis enabled, and the data has been modified.- Specified by:
setCleanin interfacePComponentAttribute
-
setInputTracking
public void setInputTracking(boolean b) A convenience method to toggle theinputTrackingproperty for all descendants of this panel.- Specified by:
setInputTrackingin interfacePComponentAttribute- Parameters:
b- a flag indicating whetherinputTrackingshould be supported
-
isInputTracking
public boolean isInputTracking()Serves as a convenience method to toggle theinputTrackingproperty for all descendants of this panel.- Specified by:
isInputTrackingin interfacePComponentAttribute- Parameters:
b- a flag that indicates whetherinputTrackingis supported- Returns:
- True if input tracking is enabled; false otherwise.
-
clear
public void clear()A convenience method that clears all Portal-aware descendants of this panel.- Specified by:
clearin interfacePComponentAttribute
-
resetToDefault
public void resetToDefault()A convenience method that resets every field on this panel.- Specified by:
resetToDefaultin interfacePComponentAttribute
-
collectData
OverridesPCollectDataListener. Forwarded to all contained GUIComponents that are alsoPCollectDataListeners.- Specified by:
collectDatain interfacePCollectDataListener- Parameters:
event- thePCollectDataEventevent
-
containsError
This method is not implemented in this class, but provides a mechanism to pass error data to subclasses. If a subclass contains non-PIA components, that subclass might need to set a flag that indicates those components contain errors. This method provides that mechanism.Typically the argument to this method is an array of
CustomerValErrorDataobjects, but you can use it for other types as well.- Parameters:
obj- a generic parameter used to pass error data to the panel- Returns:
- False by default.
-
getBundle
Used byPIAPanelsubclasses set up for use in Borland JBuilder. JBuilder requires use of theResourceBundle.getBundle()method to statically load resource bundles: however, at runtime the BAS methodology should be used. This method differentiates between design time and run time to ensure the correct methodology is used.- Parameters:
name- the name of theResourceBundleto retrieve- Returns:
- The appropriate
ResourceBundle, if it is design time; otherwise, the resource bundle associated with the currentPClientContext.
-
processError
Provides a hook for subclasses to react to errors. A subclass might need to overridecollectData()to pass along "other" data. If an error occurs, the subclass needs to check if it is the cause of the error and respond to it appropriately.- Parameters:
err- the error model handle- Returns:
- Another hook in case data needs to be returned.
-