Class PNavigationButton

All Implemented Interfaces:
ContactChangeListener, StatusChangeListener, PAppComponent, PAppFieldComponent, PClientComponent, PComponent, PFieldBean, PLightComponent, PViewDataChangeListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, Remote, EventListener, Accessible, SwingConstants

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}");
Version:
%version: 8 % %date_modified: Mon Oct 22 09:45:03 2001 %
Author:
kapono
See Also:
  • Constructor Details

    • PNavigationButton

      public PNavigationButton()
      Creates a new navigation button component initially blank
  • Method Details

    • getUIClassID

      public String getUIClassID()
      Returns a string that specifies the name of the linvalid input: '&f' class that renders this component.
      Overrides:
      getUIClassID in class JToggleButton
      Returns:
      String "NavigationButtonUI"
    • unregister

      public void unregister() throws RemoteException
      Description copied from interface: PClientComponent
      Causes the component's remote component (Controller) to be disassociated from the component);
      Specified by:
      unregister in interface PClientComponent
      Throws:
      RemoteException
    • setModelHandle

      public void setModelHandle(PModelHandle pm) throws RemoteException
      Establishes the data (PModelHandle) for this object
      Specified by:
      setModelHandle in interface PComponent
      Parameters:
      pm -
      Throws:
      RemoteException - thrown for errors
    • getModelHandle

      public PModelHandle getModelHandle() throws RemoteException
      Description copied from interface: PComponent
      Gets the data for the component to use.
      Specified by:
      getModelHandle in interface PComponent
      Returns:
      pm
      Throws:
      RemoteException - thrown for errors
    • isLight

      public boolean isLight() throws RemoteException
      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 that getModelHandle always returns null, setModelHandle is ignored, and no property change events are generated.
      Specified by:
      isLight in interface PComponent
      Returns:
      true
      Throws:
      RemoteException - thrown for errors
    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Description copied from interface: PComponent
      Gets the class name for the controller of this class.
      Specified by:
      getControllerClassName in interface PComponent
      Returns:
      "com.portal.bas.comp.PIAFieldBean"
      Throws:
      RemoteException - thrown for errors
    • getTools

      public Vector 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 interface PClientComponent
      Returns:
      null
    • setResourceName

      public void setResourceName(String name)
      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 interface PClientComponent
      Parameters:
      name -
    • getResourceName

      public String getResourceName()
      Description copied from interface: PClientComponent
      Gets the base resource name used in resource lookup.
      Specified by:
      getResourceName in interface PClientComponent
      Returns:
      The resource name for this component
    • firePropertyChange

      public void firePropertyChange(String prop, Object oldV, Object newV)
      Overrides:
      firePropertyChange in class Component
      Parameters:
      prop -
      oldV -
      newV -
    • fireVetoableChange

      public void fireVetoableChange(String prop, Object oldV, Object newV) throws PropertyVetoException
      Overrides:
      fireVetoableChange in class JComponent
      Parameters:
      prop -
      oldV -
      newV -
      Throws:
      PropertyVetoException
    • getRemoteComponent

      public Remote getRemoteComponent()
      Description copied from interface: PAppComponent
      Gets a reference to the remote component (controller) for this object.
      Specified by:
      getRemoteComponent in interface PAppComponent
      Returns:
      A handle to the remote component (controller)
    • setModelFieldDescription

      public void setModelFieldDescription(String s) throws RemoteException
      Set the description of the field in the data model that this component is interested in.
      Specified by:
      setModelFieldDescription in interface PFieldBean
      Parameters:
      s - a String that describes the field(s) used by this component
      fieldDesc - A String describing the field used by this component.
      Throws:
      RemoteException
    • getModelFieldDescription

      public String getModelFieldDescription() throws RemoteException
      Get the data field description used by the component
      Specified by:
      getModelFieldDescription in interface PFieldBean
      Returns:
      a string description of the field used by this component
      Throws:
      RemoteException
    • setDisplayFieldDescription

      public void setDisplayFieldDescription(String s) throws RemoteException
      Set the description of the field(s) in the data model that this component will display
      Specified by:
      setDisplayFieldDescription in interface PFieldBean
      Parameters:
      s - a String that describes the field
      fieldDesc - A String describing the field displayed by this component.
      Throws:
      RemoteException
    • getDisplayFieldDescription

      public String getDisplayFieldDescription() throws RemoteException
      Get the data field description used by the component
      Specified by:
      getDisplayFieldDescription in interface PFieldBean
      Returns:
      a string description of the field used by this component
      Throws:
      RemoteException
    • setDisplayFieldFormat

      public void setDisplayFieldFormat(String s) throws RemoteException
      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 interface PAppFieldComponent
      Parameters:
      s - the format to use for display of the field
      fieldForm - the format used when displaying the data
      Throws:
      RemoteException
    • getDisplayFieldFormat

      public String getDisplayFieldFormat() throws RemoteException
      Gets the display field format used by this component
      Specified by:
      getDisplayFieldFormat in interface PAppFieldComponent
      Returns:
      a String representation of the display field format
      Throws:
      RemoteException
    • setAssociatedClass

      public void setAssociatedClass(String name) throws RemoteException
      Technically a no-op for this component
      Specified by:
      setAssociatedClass in interface PFieldBean
      Parameters:
      name - the class name
      The - name of the storable class this component represents
      Throws:
      RemoteException - thrown for errors
    • getAssociatedClass

      public String getAssociatedClass() throws RemoteException
      Technically a no-op for this component
      Specified by:
      getAssociatedClass in interface PFieldBean
      Returns:
      The name of the storable class this component represents
      Throws:
      RemoteException - thrown for errors
    • setField

      public void setField(Object field) throws RemoteException
      Description copied from interface: PFieldBean
      Sets the value of the field referred to in the modelFieldDescription.
      Specified by:
      setField in interface PFieldBean
      Parameters:
      field -
      Throws:
      RemoteException - thrown for errors
    • getField

      public Object getField() throws RemoteException
      Description copied from interface: PFieldBean
      Gets the value of the field referred to in the displayFieldDescription.
      Specified by:
      getField in interface PFieldBean
      Returns:
      field
      Throws:
      RemoteException - thrown for errors
    • setLightData

      public void setLightData(Object field)
      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 interface PLightComponent
      Parameters:
      field -
    • getLightData

      public Object 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 interface PLightComponent
      Returns:
      field
    • getDataDescriptor

      public String 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 interface PLightComponent
      Returns:
      The displayFieldDescription
    • setHelpID

      public void setHelpID(String id)
      Description copied from interface: PAppFieldComponent
      Sets the help ID for this component.
      Specified by:
      setHelpID in interface PAppFieldComponent
      Parameters:
      id -
    • getHelpID

      public String getHelpID()
      Description copied from interface: PAppFieldComponent
      Gets the current help ID for this component.
      Specified by:
      getHelpID in interface PAppFieldComponent
      Returns:
      id
    • togglePrimaryToSecondary

      public Object togglePrimaryToSecondary(int from, int to) throws RemoteException
      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 interface PFieldBean
      Parameters:
      from - The current currency
      to - The new display currency
      Returns:
      The converted value.
      Throws:
      RemoteException
    • revertToPrimary

      public void revertToPrimary(int primary) throws RemoteException
      Description copied from interface: PFieldBean
      Reverts converted currency data back to the primary representation.
      Specified by:
      revertToPrimary in interface PFieldBean
      Parameters:
      primary - the primary currency ID
      The - primary currency
      Throws:
      RemoteException
    • viewDataChange

      public void viewDataChange(PViewDataChangeEvent e) throws RemoteException
      Description copied from interface: PViewDataChangeListener
      Overrides PViewDataChangeListener. 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 the PViewDataChangeEvent parameter is no longer used.

      Specified by:
      viewDataChange in interface PViewDataChangeListener
      Parameters:
      e -
      Throws:
      RemoteException - thrown for errors
    • contactChange

      public void contactChange(ContactChangeEvent e)
      Description copied from interface: ContactChangeListener
      Called when contact information is changed
      Specified by:
      contactChange in interface ContactChangeListener
      Parameters:
      e - The contact change event
    • statusChange

      public void statusChange(StatusChangeEvent e)
      Description copied from interface: StatusChangeListener
      Called when status information is changed
      Specified by:
      statusChange in interface StatusChangeListener
      Parameters:
      e - The status change event
    • removeNotify

      public void removeNotify()
      Overrides:
      removeNotify in class AbstractButton