Package com.portal.app.cc
Class PAccountNavigator
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.app.cc.PAccountNavigator
- All Implemented Interfaces:
ActionListener,ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible
A navigator component which allows the user to select one account
from a list of many. The data displayed for each account is configurable.
This component also contains a command menu which allows the user to
perform various actions on the accounts in the navigator.
- Version:
- %version: 20 % %date_modified: Wed Dec 12 09:00:15 2001 %
- Author:
- kapono
- 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
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_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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInternal listener for entry selectionsvoidAdds a new entry/account to the navigatorOverridden to establish our desired widthRetrieves the currently selected entry/accountbooleanRetrieves the minimized state of the navigatorbooleanReturns the state of the minimizeOnSelection propertyvoidInternal listener for changes to the current account.voidRemoves the entry/account associated with the given PModelHandlevoidEstablish the data that will be displayed for each account listedvoidEstablish the format for the data displayed for each account listed If you are displaying multiple fields, you should initiate a line break between fields by using a "
" between fields.voidsetMinimized(boolean minimizeIt) Used to minimize/maximize the navigatorvoidsetMinimizedOnSelection(boolean minimizeIt) Used to automatically minimize the account navigator whenever an account is selected for viewing.voidSelects the entry/account represented by the given PModelHandleMethods 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, 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, 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, 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
-
PAccountNavigator
public PAccountNavigator()Instantiates the navigator component
-
-
Method Details
-
isMinimizedOnSelection
public boolean isMinimizedOnSelection()Returns the state of the minimizeOnSelection property- Returns:
- true if the navigator should be minimized when an item is selected in it; false otherwise
-
setMinimizedOnSelection
public void setMinimizedOnSelection(boolean minimizeIt) Used to automatically minimize the account navigator whenever an account is selected for viewing. By default, the navigator does not minimize it.- Parameters:
minimizeIt- If true, the navigator will be minimized when an item in the navigator is selected.
-
isMinimized
public boolean isMinimized()Retrieves the minimized state of the navigator- Returns:
- The minimized state of the navigator
-
setMinimized
public void setMinimized(boolean minimizeIt) Used to minimize/maximize the navigator- Parameters:
minimizeIt- If true, minimize the navigator; if false; maxmize it
-
getPreferredSize
Overridden to establish our desired width- Overrides:
getPreferredSizein classJComponent- Returns:
- The desired size for this component
-
setDisplayFieldDescription
Establish the data that will be displayed for each account listed- Parameters:
s- The string describing the Portal fields to display
-
setDisplayFieldFormat
Establish the format for the data displayed for each account listed If you are displaying multiple fields, you should initiate a line break between fields by using a "
" between fields.
For example "{0}
{1}
{2}"
would result in three separate lines being displayed for each account.- Parameters:
s- The string describing the format used when displaying data
-
removeAccount
Removes the entry/account associated with the given PModelHandle- Parameters:
pm- Represents the account to remove
-
addAccount
Adds a new entry/account to the navigator- Parameters:
pm- Represents the account to add
-
setSelected
Selects the entry/account represented by the given PModelHandle- Parameters:
pm- Represents the account to select
-
getSelected
Retrieves the currently selected entry/account- Returns:
- The selected account
-
actionPerformed
Internal listener for entry selections- Specified by:
actionPerformedin interfaceActionListener- Parameters:
ae-
-
propertyChange
Internal listener for changes to the current account. Takes care of adding a new entry to represent the new current account.
This also listens for properties indicating an account is being closed and removes that account from the navigation list.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
The- property change event
-