Package com.portal.app.cc.comp
Class PAccountView
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
com.portal.bas.comp.PIATabbedPane
com.portal.app.cc.comp.PAccountView
- All Implemented Interfaces:
PAccountViewContext
,PClientComponent
,PComponent
,PContextChangedListener
,PViewComponent
,PViewDataChangeListener
,ImageObserver
,MenuContainer
,PropertyChangeListener
,VetoableChangeListener
,Serializable
,EventListener
,Accessible
,ChangeListener
,SwingConstants
public class PAccountView
extends PIATabbedPane
implements PAccountViewContext, PContextChangedListener, PropertyChangeListener, VetoableChangeListener
Contains the various screens displayed for each
account in the system.
- Version:
- %version: 23 % %date_modified: Wed May 08 11:24:33 2002 %
- Author:
- kapono
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener
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.PIATabbedPane
isTracking, MENU_ICONS, MENU_ITEMS, MENU_TIPS, mImpl, mLastTab, mMenu, mMenuIcon, mMouse, MODEL_TYPE, mPopup, SELECTED_INDEX, TO_FRONT_PRIORITY
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
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
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a tabbed pane containing components described in the "custinfo.panel" property. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sends out a property change event indicating the currently selected tab.void
Adds a page to this account view as a tab.void
appletStart
(PContextChangedEvent event) Handles a context change event associated with starting an applet.void
appletStop
(PContextChangedEvent event) Handles a context change event associated with stopping an applet.Retrieves the class that manages the navigation stack (back button)Retrieves the class through which pages register for Refresh notification.getTools()
Returns the set of tools to use for all panels in this panel.Retrieves the encompassing template for the currently visible top-level page.boolean
Determines if this page is a visible tab.boolean
okToExit
(PContextChangedEvent event) Handles a user's exit from this tabbed pane and attempts to save any changes made.void
Looks for notification of property changes on the active tab.void
recycle()
Prepares this component for reuse.void
Refreshes the view with this account's data.void
Locates the tab containing this top-level page and removes that tab.void
setModelHandle
(PModelHandle data) Verifies that each tab is valid for this context.void
setSelectedIndex
(int idx) void
sizeChanged
(PContextChangedEvent event) Handles a user's resizing of this tabbed pane.void
switchToPage
(String tag, PAccountViewPage page) This method searches through the set of drill downs previously added to the current top-level page looking for the given page.boolean
switchToPage
(String tag, PAccountViewPage page, String parentName) This method allows you to simulate drilling down from a different parent.switchToPage
(String tag, Class pageClass) This method searches through the set of drill downs previously added to the current top-level page looking for the given class type.switchToPage
(String tag, Class pageClass, String parentName) This method allows you to simulate drilling down from a different parent.void
switchToPreviousPage
(int idx, Enumeration tags, PAccountViewPage page) Assumes the current tab's position; will either move up one level in the breadcrumb trail (back) or forward if the specified tag/page does not represent the page one level up (back).void
toTop
(PContextChangedEvent event) Handles a context change event, where this tabbed pane is moved to the top.void
Attempts to save changed properties before a tab switch occurs.void
wasOnTop
(PContextChangedEvent event) Handles a context change event, where this tabbed pane is moved from the top.Methods inherited from class com.portal.bas.comp.PIATabbedPane
addTab, addTab, addTab, firePropertyChange, fireVetoableChange, getAllTools, getControllerClassName, getModelHandle, getRemoteComponent, getResourceName, insertTab, isLight, setResourceName, stateChanged, unregister, viewDataChange
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, 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
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, 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, 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
-
Constructor Details
-
PAccountView
public PAccountView()Constructs a tabbed pane containing components described in the "custinfo.panel" property. Components are dynamically instantiated, placed in a scrolled window, and then added as a tab to the tabbed pane.
-
-
Method Details
-
getMinimumSize
- Overrides:
getMinimumSize
in classJComponent
-
setModelHandle
Verifies that each tab is valid for this context. If the tab is not valid for this context, removes it from the view and moves up the next tab in the stack to become the current tab.- Specified by:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIATabbedPane
- Parameters:
data
- the model handle for the account data to display- Throws:
RemoteException
-
refreshModelHandle
Refreshes the view with this account's data.- Parameters:
data
- the model handle for the new account data to display- Throws:
RemoteException
-
getTools
Returns the set of tools to use for all panels in this panel. Individual panels, or even the currently-selected panel, are not queried for their tools. It is currently assumed that they will be queried as they are selected or become active.- Specified by:
getTools
in interfacePClientComponent
- Overrides:
getTools
in classPIATabbedPane
- Returns:
- The global toolkit for the account info panel.
-
propertyChange
Looks for notification of property changes on the active tab. Passes the currentPModelHandle
to update if there is a change.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Parameters:
e
- the property change event
-
vetoableChange
Attempts to save changed properties before a tab switch occurs.- Specified by:
vetoableChange
in interfaceVetoableChangeListener
- Parameters:
evt
- aPropertyChangeEvent
object describing the event source and the property that was changed- Throws:
PropertyVetoException
- thrown if the recipient wants to roll back the property change
-
addNotify
public void addNotify()Sends out a property change event indicating the currently selected tab.- Overrides:
addNotify
in classJComponent
-
recycle
public void recycle()Prepares this component for reuse. Cleans up each tab and makes the first tab visible. -
okToExit
Handles a user's exit from this tabbed pane and attempts to save any changes made.- Specified by:
okToExit
in interfacePContextChangedListener
- Parameters:
event
- the context change event to handle
-
toTop
Handles a context change event, where this tabbed pane is moved to the top.- Specified by:
toTop
in interfacePContextChangedListener
- Parameters:
event
- the context change event to handle
-
wasOnTop
Handles a context change event, where this tabbed pane is moved from the top.- Specified by:
wasOnTop
in interfacePContextChangedListener
- Parameters:
event
- the context change event to handle
-
appletStart
Handles a context change event associated with starting an applet.- Specified by:
appletStart
in interfacePContextChangedListener
- Parameters:
event
- the context change event to handle
-
appletStop
Handles a context change event associated with stopping an applet.- Specified by:
appletStop
in interfacePContextChangedListener
- Parameters:
event
- the context change event to handle
-
sizeChanged
Handles a user's resizing of this tabbed pane.- Specified by:
sizeChanged
in interfacePContextChangedListener
- Parameters:
event
- the context change event to handle
-
switchToPage
Description copied from interface:PAccountViewContext
This method searches through the set of drill downs previously added to the current top-level page looking for the given page. If the given page is found, it is made visible and the breadcrumb trail is updated accordingly. If it is not found then the page is added as a new drill down.
If the 'tag' parameter is null,getLabel()
is called on 'page' to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to name the current drill down- Specified by:
switchToPage
in interfacePAccountViewContext
- Parameters:
tag
-page
-
-
switchToPage
Description copied from interface:PAccountViewContext
This method allows you to simulate drilling down from a different parent. In most cases, you want to drill down from the current page directly. However, there are cases when you need to drill down into an entirely different data area. For instance, you may be on the summary screen and need to drill down into detailed billing data.
This method will atempt to locate the named parent and add the PAccountViewPage as a drill down to it. It will not be added if it was previously added as a drill down - in that case it is simply made visible. If for some reason the parent is not found this method returns false and does not modify the display
If the 'tag' parameter is null,getLabel()
is called on 'page' to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to indicate the current page.- Specified by:
switchToPage
in interfacePAccountViewContext
- Parameters:
tag
-page
-parentName
-- Returns:
- true if the parent was found and the page successfully displayed as a drill down; false otherwise
-
switchToPage
Description copied from interface:PAccountViewContext
This method searches through the set of drill downs previously added to the current top-level page looking for the given class type. If the given type is found, it is made visible and the breadcrumb trail is updated accordingly. Otherwise the Class is instantiated, added as a drill down, and that instance returned to the caller. This means you can call this API over and over and only one instance of the page will be created and added to the view.
If the 'tag' parameter is null,getLabel()
is used to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to name the current drill down- Specified by:
switchToPage
in interfacePAccountViewContext
- Parameters:
tag
-pageClass
-- Returns:
- The new visible page, or null if the switch fails.
-
switchToPage
Description copied from interface:PAccountViewContext
This method allows you to simulate drilling down from a different parent. In most cases, you want to drill down from the current page directly. However, there are cases when you need to drill down into an entirely different data area. For instance, you may be on the General summary screen and need to drill down into detailed billing data.
This method will atempt to locate the named parent and locate an existing drill down of the given Class type. If the Class type exists, that instance is made the current drill down and returned to the caller. Otherwise the Class is instantiated and added as a drill down. This means you can call this method over and over and only one instance of the page will be created and added to the view. If for some reason the parent is not found this method returns false and does not modify the display.
If the 'tag' parameter is null,getLabel()
is used to determine the appropriate breadcrumb tag. Otherwise 'tag' is used in the breadcrumb trail to indicate the current page.- Specified by:
switchToPage
in interfacePAccountViewContext
- Parameters:
tag
-pageClass
-parentName
-- Returns:
- The new visible page, or null if the switch fails.
-
switchToPreviousPage
Assumes the current tab's position; will either move up one level in the breadcrumb trail (back) or forward if the specified tag/page does not represent the page one level up (back).- Specified by:
switchToPreviousPage
in interfacePAccountViewContext
- Parameters:
idx
-tags
-page
-
-
getVisibleTemplate
Description copied from interface:PAccountViewContext
Retrieves the encompassing template for the currently visible top-level page.- Specified by:
getVisibleTemplate
in interfacePAccountViewContext
- Returns:
- The currently visible template.
-
getPageTracker
Description copied from interface:PAccountViewContext
Retrieves the class that manages the navigation stack (back button)- Specified by:
getPageTracker
in interfacePAccountViewContext
- Returns:
- The stack storing the pages; used for the back button.
-
getRefreshManager
Description copied from interface:PAccountViewContext
Retrieves the class through which pages register for Refresh notification. Note that each active account view contains its own refresh manager instance, so an entity (Action) sitting outside the view (i.e. in a toolbar) will need to register each time an account is opened. At the same time, be sure not to register multiple times for the same view.- Specified by:
getRefreshManager
in interfacePAccountViewContext
- Returns:
- The data refresh manager instance.
-
addToView
Adds a page to this account view as a tab. The page being added must have been defined in the configuration file specification for this view or it will be ignored.This is typically used in conjunction with a page that may or may not be valid for a given account context. A page that may have been omitted from the view by returning false in its
isValidContext()
method should use this method to add itself back.- Specified by:
addToView
in interfacePAccountViewContext
- Parameters:
sp
- the page to add as a tab
-
removeFromView
Locates the tab containing this top-level page and removes that tab.This is typically used in conjunction with a page that may or may not be valid for a given account context. If your page suddenly goes out of context due to some event in the account, use this method to remove the tab associated with this page. Note that the specified page must be the top-level page on a tab.
- Specified by:
removeFromView
in interfacePAccountViewContext
- Parameters:
sp
- the top-level page to remove from the view
-
isPartOfView
Determines if this page is a visible tab.- Specified by:
isPartOfView
in interfacePAccountViewContext
- Parameters:
sp
- the page in question- Returns:
- True if this page is currently a visible tab; false otherwise.
-
setSelectedIndex
public void setSelectedIndex(int idx) - Overrides:
setSelectedIndex
in classJTabbedPane
-