Package com.portal.app.cc.comp
Class PPageTemplate
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
com.portal.app.cc.comp.PPageTemplate
- All Implemented Interfaces:
BillInfoChangeListener
,PaymentChangeListener
,PAppComponent
,PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PViewDataChangeListener
,ContainerListener
,ImageObserver
,MenuContainer
,VetoableChangeListener
,Serializable
,EventListener
,Accessible
public class PPageTemplate
extends PIACustomizablePanel
implements PaymentChangeListener, BillInfoChangeListener, VetoableChangeListener
Used internally as a wrapper around each page/screen in the tabbed pane.
This template creates the PBreadCrumbs component and places it along the
top. It takes care of providing borders around the page as well. The
"real" page/screen to be viewed on a given tabbed pane is added below
the PBreadCrumbs component. This component also supports a simulated
drill down effect which allows the user to change viewed screens while
remaining on the same page.
- Version:
- %version: 19 % %date_modified: Mon Nov 26 13:50:32 2001 %
- Author:
- kapono
- 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
Fields inherited from class com.portal.bas.comp.PIACustomizablePanel
isTracking, mIAList, mImpl, unregList
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
ConstructorsConstructorDescriptionPPageTemplate
(String tag, PAccountViewPage page) Instantiates the template, with the given component being created as the base for this page. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addPage
(String tag, PAccountViewPage page) This method should be called when you want to simulate drilling down from one screen to another.void
listen to billInfoChange eventvoid
Wipes out the existing breadcrumb trail, leaving it empty.Return the base component in this templateRetrieves the current breadcrumb labelgetComponentFrom
(Class type) Retrieves the first instance of the given Class typegetComponentFrom
(String name) Retrieves the page that was added to this template with the given tag.String[]
Returns the names of all previously added drill down components and the name of the base component as well.Class[]
Returns the Class types of all previously added drill down components including the type of the base component as well.Returns the currently visible component in this template.void
gotoExisting
(Enumeration tags, PAccountViewPage page) boolean
gotoPage
(String tag, PAccountViewPage page) This method searches through the set of drill downs previously added to this template looking for the given page.boolean
gotoPage
(String tag, PAccountViewPage page, boolean updateTrail) This method searches through the set of drill downs previously added to this template looking for the given page.void
Mark every page in this template (toplevel, and any drill downs) as needing to be refreshed.void
Called when an event is sent out that impacts the payment type or related billing info (billing frequency, day of month, cycle)void
recycle()
Responsible for cleaning up the component and preparing it for reuse.void
void
A mechanism for passing in a new account for displayvoid
This method gets called before a link switch occursMethods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, collectData, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getControllerClassName, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, resetToDefault, revertToPrimary, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setRequired, setResourceName, togglePrimaryToSecondary, unregister, viewDataChange
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, 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, 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
-
Constructor Details
-
PPageTemplate
Instantiates the template, with the given component being created as the base for this page. The tag will be placed in the breadcrumb trail as the root link in the trail whenever a drilldown from the base page occurs.- Parameters:
tag
- The label to be used in the breadcrumb trail for the given pagepage
- The root/base component
-
-
Method Details
-
setModelHandle
A mechanism for passing in a new account for display- Specified by:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIACustomizablePanel
- Parameters:
pm
- the newPModelHandle
from which to extract informationThe
- model handle for a new account- Throws:
RemoteException
- thrown for errors
-
getBaseComponent
Return the base component in this template- Returns:
- The panel that was originally added as the base component
-
getVisibleComponent
Returns the currently visible component in this template. This may be the base component if that is the component that is visible.- Returns:
- The currently visible component in this template
-
getPageNames
Returns the names of all previously added drill down components and the name of the base component as well. The names returned will be the breadcrumb trail tags associated with each component.- Returns:
- The names of all drill downs previously added to this template
-
getPageTypes
Returns the Class types of all previously added drill down components including the type of the base component as well.- Returns:
- the Class type for every drill down previously added to this template
-
getComponentFrom
Retrieves the page that was added to this template with the given tag.- Parameters:
name
- The tag used when the page was originally added- Returns:
- The page instance, or null if it does not exist
-
getComponentFrom
Retrieves the first instance of the given Class type- Parameters:
The
- Class type to locate- Returns:
- The page instance, or null if it does not exist
-
addPage
This method should be called when you want to simulate drilling down from one screen to another. When used in conjunction with a tabbed pane, this method allows the user to switch to a different page while remaining on the current tab in the tabbed pane.- Parameters:
tag
- The label to be used in the breadcrumb trail for this component.page
- The component which will become the new active page
-
gotoExisting
- Parameters:
tags
-page
- The component which will become the new active page
-
gotoPage
This method searches through the set of drill downs previously added to this template looking for the given page. If the given page is found, it is made visible and the breadcrumb trail is updated accordingly.
If you attempt to goto a page that is already visible, this method is basically a no-op. Nothing will change visually.- Parameters:
tag
- The label to display in the breadcrumb trailpage
- The new screen to display- Returns:
- true if the page if successfully found; false otherwise
-
gotoPage
This method searches through the set of drill downs previously added to this template looking for the given page. If the given page is found, it is made visible and the breadcrumb trail is updated accordingly.
If you attempt to goto a page that is already visible and the 'updateTrial' parameter is true, the breadcrumb trail will be updated to reflect that you are "drilling down" though the page itself will not be updated. This might be useful if you have previously cleared the trail and attempt to switch to the current page.- Parameters:
tag
- The label to display in the breadcrumb trailpage
- The new screen to displayupdateTrail
- If true, add a link to the trail. Otherwise, no update will be made to the breadcrumb trail.- Returns:
- true if the page if successfully found; false otherwise
-
clearBreadCrumbs
public void clearBreadCrumbs()Wipes out the existing breadcrumb trail, leaving it empty. -
getBreadCrumb
Retrieves the current breadcrumb label- Returns:
- The current breadcrumb label
-
getBreadCrumbTrail
- Returns:
- The current breadcrumb trail as an enumeration starting at the beginning of the trail.
-
markAllForRefresh
public void markAllForRefresh()Mark every page in this template (toplevel, and any drill downs) as needing to be refreshed. -
recycle
public void recycle()Responsible for cleaning up the component and preparing it for reuse. -
billInfoChange
listen to billInfoChange event- Specified by:
billInfoChange
in interfaceBillInfoChangeListener
- Parameters:
e
- a ServiceChangeEvent encapsulating the event information
-
paymentChange
Description copied from interface:PaymentChangeListener
Called when an event is sent out that impacts the payment type or related billing info (billing frequency, day of month, cycle)- Specified by:
paymentChange
in interfacePaymentChangeListener
- Parameters:
e
- a PaymentChangeEvent encapsulating the event information
-
addNotify
public void addNotify()- Overrides:
addNotify
in classJComponent
-
removeNotify
public void removeNotify()- Overrides:
removeNotify
in classJComponent
-
vetoableChange
This method gets called before a link switch occurs- Specified by:
vetoableChange
in interfaceVetoableChangeListener
- Parameters:
evt
- aPropertyChangeEvent
object describing the event source and the property that has changed.- Throws:
PropertyVetoException
- if the recipient wishes the property change to be rolled back.
-