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.ToggleButtonModel
Nested classes/interfaces inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
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 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_PROPERTY
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
ConstructorsConstructorDescriptionCreates a new navigation button component initially blank -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when contact information is changedvoid
firePropertyChange
(String prop, Object oldV, Object newV) void
fireVetoableChange
(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.boolean
isLight()
Determines whether this is a lightweight component.void
void
revertToPrimary
(int primary) Reverts converted currency data back to the primary representation.void
setAssociatedClass
(String name) Technically a no-op for this componentvoid
Set the description of the field(s) in the data model that this component will displayvoid
Sets the java.text.MessageFormat-type format used to display data in this component.void
Sets the value of the field referred to in themodelFieldDescription
.void
Sets the help ID for this component.void
setLightData
(Object field) Sets the lightweight data object.void
Set the description of the field in the data model that this component is interested in.void
Establishes the data (PModelHandle) for this objectvoid
setResourceName
(String name) Sets the base resource name used in resource lookup.void
Called 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.void
Causes the component's remote component (Controller) to be disassociated from the component);void
OverridesPViewDataChangeListener
.Methods inherited from class javax.swing.JToggleButton
getAccessibleContext, paramString, requestFocus, requestFocusInWindow, updateUI
Methods 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, setVerticalTextPosition
Methods 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, update
Methods 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, 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, 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:
getUIClassID
in classJToggleButton
- Returns:
- String "NavigationButtonUI"
-
unregister
Description copied from interface:PClientComponent
Causes the component's remote component (Controller) to be disassociated from the component);- Specified by:
unregister
in interfacePClientComponent
- Throws:
RemoteException
-
setModelHandle
Establishes the data (PModelHandle) for this object- Specified by:
setModelHandle
in interfacePComponent
- Parameters:
pm
-- Throws:
RemoteException
- thrown for errors
-
getModelHandle
Description copied from interface:PComponent
Gets the data for the component to use.- Specified by:
getModelHandle
in interfacePComponent
- Returns:
- pm
- Throws:
RemoteException
- thrown for errors
-
isLight
Description copied from interface:PComponent
Determines whether this is a lightweight component. Lightweight components do not have their own model. Instead, they use the model of their container. This means thatgetModelHandle
always returns null,setModelHandle
is ignored, and no property change events are generated.- Specified by:
isLight
in interfacePComponent
- Returns:
- true
- Throws:
RemoteException
- thrown for errors
-
getControllerClassName
Description copied from interface:PComponent
Gets the class name for the controller of this class.- Specified by:
getControllerClassName
in interfacePComponent
- Returns:
- "com.portal.bas.comp.PIAFieldBean"
- Throws:
RemoteException
- thrown for errors
-
getTools
Description copied from interface:PClientComponent
Gets 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:
getTools
in interfacePClientComponent
- Returns:
- null
-
setResourceName
Description copied from interface:PClientComponent
Sets 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:
setResourceName
in interfacePClientComponent
- Parameters:
name
-
-
getResourceName
Description copied from interface:PClientComponent
Gets the base resource name used in resource lookup.- Specified by:
getResourceName
in interfacePClientComponent
- Returns:
- The resource name for this component
-
firePropertyChange
- Overrides:
firePropertyChange
in classComponent
- Parameters:
prop
-oldV
-newV
-
-
fireVetoableChange
- Overrides:
fireVetoableChange
in classJComponent
- Parameters:
prop
-oldV
-newV
-- Throws:
PropertyVetoException
-
getRemoteComponent
Description copied from interface:PAppComponent
Gets a reference to the remote component (controller) for this object.- Specified by:
getRemoteComponent
in 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:
setModelFieldDescription
in interfacePFieldBean
- Parameters:
s
- aString
that 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:
getModelFieldDescription
in 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:
setDisplayFieldDescription
in interfacePFieldBean
- Parameters:
s
- aString
that 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:
getDisplayFieldDescription
in 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:
setDisplayFieldFormat
in 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:
getDisplayFieldFormat
in interfacePAppFieldComponent
- Returns:
- a String representation of the display field format
- Throws:
RemoteException
-
setAssociatedClass
Technically a no-op for this component- Specified by:
setAssociatedClass
in 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:
getAssociatedClass
in interfacePFieldBean
- Returns:
- The name of the storable class this component represents
- Throws:
RemoteException
- thrown for errors
-
setField
Description copied from interface:PFieldBean
Sets the value of the field referred to in themodelFieldDescription
.- Specified by:
setField
in interfacePFieldBean
- Parameters:
field
-- Throws:
RemoteException
- thrown for errors
-
getField
Description copied from interface:PFieldBean
Gets the value of the field referred to in thedisplayFieldDescription
.- Specified by:
getField
in interfacePFieldBean
- Returns:
- field
- Throws:
RemoteException
- thrown for errors
-
setLightData
Description copied from interface:PLightComponent
Sets the lightweight data object. This is usually called by framework support as part of the lightweight component implementation.- Specified by:
setLightData
in interfacePLightComponent
- Parameters:
field
-
-
getLightData
Description copied from interface:PLightComponent
Gets 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:
getLightData
in interfacePLightComponent
- Returns:
- field
-
getDataDescriptor
Description copied from interface:PLightComponent
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. For field components, this can be the model description.- Specified by:
getDataDescriptor
in interfacePLightComponent
- Returns:
- The displayFieldDescription
-
setHelpID
Description copied from interface:PAppFieldComponent
Sets the help ID for this component.- Specified by:
setHelpID
in interfacePAppFieldComponent
- Parameters:
id
-
-
getHelpID
Description copied from interface:PAppFieldComponent
Gets the current help ID for this component.- Specified by:
getHelpID
in 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:
togglePrimaryToSecondary
in interfacePFieldBean
- Parameters:
from
- The current currencyto
- The new display currency- Returns:
- The converted value.
- Throws:
RemoteException
-
revertToPrimary
Description copied from interface:PFieldBean
Reverts converted currency data back to the primary representation.- Specified by:
revertToPrimary
in interfacePFieldBean
- Parameters:
primary
- the primary currency IDThe
- primary currency- Throws:
RemoteException
-
viewDataChange
Description copied from interface:PViewDataChangeListener
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 appropriate
getProperty
methods on the controller to get the data, as thePViewDataChangeEvent
parameter is no longer used.- Specified by:
viewDataChange
in interfacePViewDataChangeListener
- Parameters:
e
-- Throws:
RemoteException
- thrown for errors
-
contactChange
Description copied from interface:ContactChangeListener
Called when contact information is changed- Specified by:
contactChange
in interfaceContactChangeListener
- Parameters:
e
- The contact change event
-
statusChange
Description copied from interface:StatusChangeListener
Called when status information is changed- Specified by:
statusChange
in interfaceStatusChangeListener
- Parameters:
e
- The status change event
-
removeNotify
public void removeNotify()- Overrides:
removeNotify
in classAbstractButton
-