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.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 boolean
protected LinkedList
protected PIAComponentCollection
protected LinkedList
Fields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImage
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 aPIACustomizablePanel
that contains some knowledge of Portal.PIACustomizablePanel
(ImageIcon img, int mode) Creates aPIACustomizablePanel
that contains some knowledge of Portal. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
A convenience method that clears all Portal-aware descendants of this panel.void
collectData
(PCollectDataEvent event) OverridesPCollectDataListener
.void
Tracks all Portal-aware components that are added to this panel.void
Tracks all Portal-aware components that are removed from this panel.boolean
containsError
(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 ResourceBundle
Used byPIAPanel
subclasses set up for use in Borland JBuilder.Retrieves the class name of this component's controller, in this case, null.Retrieves thePModelHandle
for 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.boolean
isClean()
Determines if any descendant is marked DIRTY or ERROR.boolean
Determines whether any component in the widget tree currently displays currency data.boolean
isDirty()
Determines if any descendant is marked DIRTY in its current context.boolean
isError()
Determines if any descendant is marked ERROR in its current context.boolean
Serves as a convenience method to toggle theinputTracking
property for all descendants of this panel.boolean
isLight()
Determines if this component delegatesPModelHandle
processing to its parent container.boolean
Determines if any descendant is required in its current context.protected Object
processError
(PModelHandle err) Provides a hook for subclasses to react to errors.void
A convenience method that resets every field on this panel.void
revertToPrimary
(int primary) Causes previously toggled data to be reverted back to the primary currency.void
setBackgroundImageMode
(int drawMode) Sets the drawing mode for the background image.void
Sets the supplied background image.void
setClean()
A convenience method that marks allPFieldComponent
components in this panel as CLEAN.void
setCurrencyDisplay
(boolean b) Determines if this component currently displays currency data.void
Establishes the current value of every Portal-aware descendant as the default value for that component.void
setError
(boolean b) Passes thesetError
method call to all Portal-aware descendants.void
setInputTracking
(boolean b) A convenience method to toggle theinputTracking
property for all descendants of this panel.void
setModelHandle
(PModelHandle data) Establishes thePModelHandle
for this component and all its descendants.void
setRequired
(boolean b) Delegates thesetRequired()
method call to all Portal-aware descendants.void
setResourceName
(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 (isCurrencyDisplay
returns true), converts the displayed data to the new currency type.void
Used to disconnect the controller from the component for all child widgets contained within this panel.void
OverridesPViewDataChangeListener
.Methods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIcon
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods 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, 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, 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 aPIACustomizablePanel
that contains some knowledge of Portal. This panel can display a default image centered in the background. -
PIACustomizablePanel
Creates aPIACustomizablePanel
that 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:
unregister
in interfacePClientComponent
- Throws:
RemoteException
-
setModelHandle
Establishes thePModelHandle
for this component and all its descendants.- Specified by:
setModelHandle
in interfacePComponent
- Parameters:
data
- the newPModelHandle
from which to extract information- Throws:
RemoteException
- thrown for errors
-
getModelHandle
Retrieves thePModelHandle
for this component.- Specified by:
getModelHandle
in interfacePComponent
- Returns:
- The
PModelHandle
associated with this component. - Throws:
RemoteException
- thrown for errors
-
isLight
Determines if this component delegatesPModelHandle
processing to its parent container. If so, the parent container passes thePModelHandle
to 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
PModelHandle
is called subclass this component and override this method. Otherwise,setModelHandle()
is not called.- Specified by:
isLight
in 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:
getControllerClassName
in 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:
getTools
in interfacePClientComponent
- Returns:
- A
Vector
that containsAction
objects.
-
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:
setResourceName
in interfacePClientComponent
- Parameters:
name
- the new base resource name
-
getResourceName
Gets the base resource name used in resource lookup.- Specified by:
getResourceName
in interfacePClientComponent
- Returns:
- A
String
with 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:
getRemoteComponent
in interfacePAppComponent
- Returns:
- A
Remote
component.
-
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 appropriateget
methods on the controller to get the data, because the() PViewDataChangeEvent
parameter is no longer used.- Specified by:
viewDataChange
in interfacePViewDataChangeListener
- Parameters:
event
- thePViewDataChangeEvent
event 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
String
with the location of the image source.
-
setBackgroundImageMode
public void setBackgroundImageMode(int drawMode) Sets the drawing mode for the background image.- Overrides:
setBackgroundImageMode
in 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:
componentAdded
in 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:
componentRemoved
in 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:
setRequired
in 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:
isRequired
in interfacePComponentAttribute
- Returns:
- True if any descendant is marked REQUIRED; false otherwise.
-
setError
public void setError(boolean b) Passes thesetError
method call to all Portal-aware descendants.- Specified by:
setError
in 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:
isError
in 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:
isDirty
in 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:
setDefault
in interfacePComponentAttribute
-
isCurrencyDisplay
public boolean isCurrencyDisplay()Determines whether any component in the widget tree currently displays currency data.- Specified by:
isCurrencyDisplay
in 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 callssetCurrencyDisplay
on every child component- Specified by:
setCurrencyDisplay
in 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 (isCurrencyDisplay
returns true), converts the displayed data to the new currency type.- Specified by:
togglePrimaryToSecondary
in 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:
revertToPrimary
in 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 allPFieldComponent
components in this panel as CLEAN. Useful if components have been marked DIRTY becauseInputTracking
is enabled, and the data has been modified.- Specified by:
setClean
in interfacePComponentAttribute
-
setInputTracking
public void setInputTracking(boolean b) A convenience method to toggle theinputTracking
property for all descendants of this panel.- Specified by:
setInputTracking
in interfacePComponentAttribute
- Parameters:
b
- a flag indicating whetherinputTracking
should be supported
-
isInputTracking
public boolean isInputTracking()Serves as a convenience method to toggle theinputTracking
property for all descendants of this panel.- Specified by:
isInputTracking
in interfacePComponentAttribute
- Parameters:
b
- a flag that indicates whetherinputTracking
is 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:
clear
in interfacePComponentAttribute
-
resetToDefault
public void resetToDefault()A convenience method that resets every field on this panel.- Specified by:
resetToDefault
in interfacePComponentAttribute
-
collectData
OverridesPCollectDataListener
. Forwarded to all contained GUIComponents that are alsoPCollectDataListeners
.- Specified by:
collectData
in interfacePCollectDataListener
- Parameters:
event
- thePCollectDataEvent
event
-
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
CustomerValErrorData
objects, 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 byPIAPanel
subclasses 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 theResourceBundle
to 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.
-