Package com.portal.app.cc.comp
Class PNavigationButton
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JToggleButton
com.portal.app.cc.comp.PNavigationButton
- All Implemented Interfaces:
ContactChangeListener,StatusChangeListener,PAppComponent,PAppFieldComponent,PClientComponent,PComponent,PFieldBean,PLightComponent,PViewDataChangeListener,ImageObserver,ItemSelectable,MenuContainer,Serializable,Remote,EventListener,Accessible,SwingConstants
public class PNavigationButton
extends JToggleButton
implements PAppFieldComponent, PLightComponent, StatusChangeListener, ContactChangeListener, Serializable
Represents an active account in the PAccountNavigator component.
This is technically a BAS PIA widget, but it is specific to Customer
Center so it is being delivered as part of the client.
This component, when run under the Portal Lookinvalid input: '&Feel', supports rendering
multiple lines. You can enter a complex display field specification
and a '\n' separated format specification to accomplish this.
For example,
setDisplayFieldDescription( "FldNameinfo[1].FldLastName,FldNameinfo[1].FldCompanyName");
setDisplayFieldFormat("{0}\n{1}");
For example,
setDisplayFieldDescription( "FldNameinfo[1].FldLastName,FldNameinfo[1].FldCompanyName");
setDisplayFieldFormat("{0}\n{1}");
- Version:
- %version: 8 % %date_modified: Mon Oct 22 09:45:03 2001 %
- Author:
- kapono
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JToggleButton
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModelNested classes/interfaces inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListenerNested 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.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTYFields 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, WIDTHFields 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
ConstructorsConstructorDescriptionCreates a new navigation button component initially blank -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when contact information is changedvoidfirePropertyChange(String prop, Object oldV, Object newV) voidfireVetoableChange(String prop, Object oldV, Object newV) Technically a no-op for this componentGets the class name for the controller of this class.Returns a string guaranteed to be unique among the lightweight components that can be used to describe the data, and acts as a key for it.Get the data field description used by the componentGets the display field format used by this componentgetField()Gets the value of the field referred to in thedisplayFieldDescription.Gets the current help ID for this component.Gets the lightweight data object itself.Get the data field description used by the componentGets the data for the component to use.Gets a reference to the remote component (controller) for this object.Gets the base resource name used in resource lookup.getTools()Gets a list of actions supported by this component.Returns a string that specifies the name of the linvalid input: '&f' class that renders this component.booleanisLight()Determines whether this is a lightweight component.voidvoidrevertToPrimary(int primary) Reverts converted currency data back to the primary representation.voidsetAssociatedClass(String name) Technically a no-op for this componentvoidSet the description of the field(s) in the data model that this component will displayvoidSets the java.text.MessageFormat-type format used to display data in this component.voidSets the value of the field referred to in themodelFieldDescription.voidSets the help ID for this component.voidsetLightData(Object field) Sets the lightweight data object.voidSet the description of the field in the data model that this component is interested in.voidEstablishes the data (PModelHandle) for this objectvoidsetResourceName(String name) Sets the base resource name used in resource lookup.voidCalled when status information is changedtogglePrimaryToSecondary(int from, int to) Causes the widget to convert its data using the BEIDManager.
This is a no-op for this component as currency data should not typically be displayed here.
This is a no-op.voidCauses the component's remote component (Controller) to be disassociated from the component);voidOverridesPViewDataChangeListener.Methods inherited from class javax.swing.JToggleButton
getAccessibleContext, paramString, requestFocus, requestFocusInWindow, updateUIMethods inherited from class javax.swing.AbstractButton
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPositionMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, 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, 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, paintChildren, paintComponent, 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, 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, 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, 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, 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, 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
-
PNavigationButton
public PNavigationButton()Creates a new navigation button component initially blank
-
-
Method Details
-
getUIClassID
Returns a string that specifies the name of the linvalid input: '&f' class that renders this component.- Overrides:
getUIClassIDin classJToggleButton- Returns:
- String "NavigationButtonUI"
-
unregister
Description copied from interface:PClientComponentCauses the component's remote component (Controller) to be disassociated from the component);- Specified by:
unregisterin interfacePClientComponent- Throws:
RemoteException
-
setModelHandle
Establishes the data (PModelHandle) for this object- Specified by:
setModelHandlein interfacePComponent- Parameters:
pm-- Throws:
RemoteException- thrown for errors
-
getModelHandle
Description copied from interface:PComponentGets the data for the component to use.- Specified by:
getModelHandlein interfacePComponent- Returns:
- pm
- Throws:
RemoteException- thrown for errors
-
isLight
Description copied from interface:PComponentDetermines whether this is a lightweight component. Lightweight components do not have their own model. Instead, they use the model of their container. This means thatgetModelHandlealways returns null,setModelHandleis ignored, and no property change events are generated.- Specified by:
isLightin interfacePComponent- Returns:
- true
- Throws:
RemoteException- thrown for errors
-
getControllerClassName
Description copied from interface:PComponentGets the class name for the controller of this class.- Specified by:
getControllerClassNamein interfacePComponent- Returns:
- "com.portal.bas.comp.PIAFieldBean"
- Throws:
RemoteException- thrown for errors
-
getTools
Description copied from interface:PClientComponentGets a list of actions supported by this component. When overloading this method, be sure to call the super class method, then add its actions to the returned list. This preserves actions supplied by base classes. The default Action supplied includes help for this component.- Specified by:
getToolsin interfacePClientComponent- Returns:
- null
-
setResourceName
Description copied from interface:PClientComponentSets the base resource name used in resource lookup. A resource name is this base, followed by a dot, followed by the local name (label).- Specified by:
setResourceNamein interfacePClientComponent- Parameters:
name-
-
getResourceName
Description copied from interface:PClientComponentGets the base resource name used in resource lookup.- Specified by:
getResourceNamein interfacePClientComponent- Returns:
- The resource name for this component
-
firePropertyChange
- Overrides:
firePropertyChangein classComponent- Parameters:
prop-oldV-newV-
-
fireVetoableChange
- Overrides:
fireVetoableChangein classJComponent- Parameters:
prop-oldV-newV-- Throws:
PropertyVetoException
-
getRemoteComponent
Description copied from interface:PAppComponentGets a reference to the remote component (controller) for this object.- Specified by:
getRemoteComponentin interfacePAppComponent- Returns:
- A handle to the remote component (controller)
-
setModelFieldDescription
Set the description of the field in the data model that this component is interested in.- Specified by:
setModelFieldDescriptionin interfacePFieldBean- Parameters:
s- aStringthat describes the field(s) used by this componentfieldDesc- A String describing the field used by this component.- Throws:
RemoteException
-
getModelFieldDescription
Get the data field description used by the component- Specified by:
getModelFieldDescriptionin interfacePFieldBean- Returns:
- a string description of the field used by this component
- Throws:
RemoteException
-
setDisplayFieldDescription
Set the description of the field(s) in the data model that this component will display- Specified by:
setDisplayFieldDescriptionin interfacePFieldBean- Parameters:
s- aStringthat describes the fieldfieldDesc- A String describing the field displayed by this component.- Throws:
RemoteException
-
getDisplayFieldDescription
Get the data field description used by the component- Specified by:
getDisplayFieldDescriptionin interfacePFieldBean- Returns:
- a string description of the field used by this component
- Throws:
RemoteException
-
setDisplayFieldFormat
Sets the java.text.MessageFormat-type format used to display data in this component. This is typically (but not necessarily) directly tied to the DisplayFieldDescription. For example, the DisplayFieldDescription might be "FldNameinfo[any].FldFirstName, FldNameinfo[any].FldLastName" and the DisplayFieldFormat for that might be "{1}, {0}" to display the last name followed by a comma and then the first name.- Specified by:
setDisplayFieldFormatin interfacePAppFieldComponent- Parameters:
s- the format to use for display of the fieldfieldForm- the format used when displaying the data- Throws:
RemoteException
-
getDisplayFieldFormat
Gets the display field format used by this component- Specified by:
getDisplayFieldFormatin interfacePAppFieldComponent- Returns:
- a String representation of the display field format
- Throws:
RemoteException
-
setAssociatedClass
Technically a no-op for this component- Specified by:
setAssociatedClassin interfacePFieldBean- Parameters:
name- the class nameThe- name of the storable class this component represents- Throws:
RemoteException- thrown for errors
-
getAssociatedClass
Technically a no-op for this component- Specified by:
getAssociatedClassin interfacePFieldBean- Returns:
- The name of the storable class this component represents
- Throws:
RemoteException- thrown for errors
-
setField
Description copied from interface:PFieldBeanSets the value of the field referred to in themodelFieldDescription.- Specified by:
setFieldin interfacePFieldBean- Parameters:
field-- Throws:
RemoteException- thrown for errors
-
getField
Description copied from interface:PFieldBeanGets the value of the field referred to in thedisplayFieldDescription.- Specified by:
getFieldin interfacePFieldBean- Returns:
- field
- Throws:
RemoteException- thrown for errors
-
setLightData
Description copied from interface:PLightComponentSets the lightweight data object. This is usually called by framework support as part of the lightweight component implementation.- Specified by:
setLightDatain interfacePLightComponent- Parameters:
field-
-
getLightData
Description copied from interface:PLightComponentGets the lightweight data object itself. Lightweight components are allowed only one data item. This is likely to be a duplicate of another method of the component, and can be delegated to it.- Specified by:
getLightDatain interfacePLightComponent- Returns:
- field
-
getDataDescriptor
Description copied from interface:PLightComponentReturns a string guaranteed to be unique among the lightweight components that can be used to describe the data, and acts as a key for it. For field components, this can be the model description.- Specified by:
getDataDescriptorin interfacePLightComponent- Returns:
- The displayFieldDescription
-
setHelpID
Description copied from interface:PAppFieldComponentSets the help ID for this component.- Specified by:
setHelpIDin interfacePAppFieldComponent- Parameters:
id-
-
getHelpID
Description copied from interface:PAppFieldComponentGets the current help ID for this component.- Specified by:
getHelpIDin interfacePAppFieldComponent- Returns:
- id
-
togglePrimaryToSecondary
Causes the widget to convert its data using the BEIDManager.
This is a no-op for this component as currency data should not typically be displayed here.
This is a no-op. Currency display not truly supported in this widget.- Specified by:
togglePrimaryToSecondaryin interfacePFieldBean- Parameters:
from- The current currencyto- The new display currency- Returns:
- The converted value.
- Throws:
RemoteException
-
revertToPrimary
Description copied from interface:PFieldBeanReverts converted currency data back to the primary representation.- Specified by:
revertToPrimaryin interfacePFieldBean- Parameters:
primary- the primary currency IDThe- primary currency- Throws:
RemoteException
-
viewDataChange
Description copied from interface:PViewDataChangeListenerOverridesPViewDataChangeListener. 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 appropriate
getPropertymethods on the controller to get the data, as thePViewDataChangeEventparameter is no longer used.- Specified by:
viewDataChangein interfacePViewDataChangeListener- Parameters:
e-- Throws:
RemoteException- thrown for errors
-
contactChange
Description copied from interface:ContactChangeListenerCalled when contact information is changed- Specified by:
contactChangein interfaceContactChangeListener- Parameters:
e- The contact change event
-
statusChange
Description copied from interface:StatusChangeListenerCalled when status information is changed- Specified by:
statusChangein interfaceStatusChangeListener- Parameters:
e- The status change event
-
removeNotify
public void removeNotify()- Overrides:
removeNotifyin classAbstractButton
-