Class PIAScrollPane

All Implemented Interfaces:
PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ScrollPaneConstants

public class PIAScrollPane extends JScrollPane implements PAppComponent, PComponentAttribute, PCollectDataListener, Serializable
PIAScrollPane is a Swing-compatible, Portal-aware JPanel class. Used to pass certain method calls through to its view component. Otherwise, to traverse components you would have to specifically look for scroll panes and get their view components yourself.
Version:
%version: 18 % %date_modified: Mon Oct 22 09:46:12 2001 %
Author:
Kapono Carter
See Also:
  • Field Details

    • mImpl

      protected transient PComponentDelegate mImpl
    • isTracking

      protected boolean isTracking
  • Constructor Details

    • PIAScrollPane

      public PIAScrollPane()
      Creates a new scrollable panel.
    • PIAScrollPane

      public PIAScrollPane(Component view)
      Creates a new scrollable panel that contains the given component.
      Parameters:
      view - the component to scroll
  • Method Details

    • unregister

      public void unregister() throws RemoteException
      Disassociates the controller from the component
      Specified by:
      unregister in interface PClientComponent
      Throws:
      RemoteException
    • setModelHandle

      public void setModelHandle(PModelHandle data) throws RemoteException
      Establishes the PModelHandle for this component.
      Specified by:
      setModelHandle in interface PComponent
      Parameters:
      data - the new PModelHandle from which to extract information
      Throws:
      RemoteException - thrown for errors
    • getModelHandle

      public PModelHandle getModelHandle() throws RemoteException
      Retrieves the PModelHandle for this component.
      Specified by:
      getModelHandle in interface PComponent
      Returns:
      The PModelHandle associated with this component, or null if this is a lightweight component.
      Throws:
      RemoteException - thrown for errors
    • isLight

      public boolean isLight() throws RemoteException
      Determines if this component defers PModelHandle knowledge to its parent container. If so, the parent container passes the PModelHandle to this component on the server side (by way of the controller), which saves a client/server round trip for data exchange. Containers typically do not defer processing but instead handle it themselves.
      Specified by:
      isLight in interface PComponent
      Returns:
      True if this component defers knowledge, false otherwise.
      Throws:
      RemoteException - thrown for errors
    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Retrieves the class name of this component's controller.
      Specified by:
      getControllerClassName in interface PComponent
      Returns:
      "com.portal.bas.comp.PIAComponentCollectionBean", the default controller for this component.
      Throws:
      RemoteException - thrown for errors
    • getTools

      public Vector getTools()
      Gets a list of actions supported by this component. When subclassed, the overriding class should call its super class version, then add its actions to the returned list. This preserves actions supplied by base classes. The default, supplied here, includes help for this component.
      Specified by:
      getTools in interface PClientComponent
      Returns:
      A Vector that contains Action objects.
    • setResourceName

      public void setResourceName(String name)
      Sets the base resource name used in resource look up. Basically, the resource name is this base, followed by a dot, followed by the local name (label).
      Specified by:
      setResourceName in interface PClientComponent
      Parameters:
      name - the new base resource name
    • getResourceName

      public String getResourceName()
      Gets the base resource name used in resource look up.
      Specified by:
      getResourceName in interface PClientComponent
      Returns:
      A String with the base resource name.
    • getRemoteComponent

      public Remote getRemoteComponent()
      Gets a reference to the remote component for this object. The remote component is used to interface with this component's controller.
      Specified by:
      getRemoteComponent in interface PAppComponent
      Returns:
      A Remote component.
    • togglePrimaryToSecondary

      public Object togglePrimaryToSecondary(int primary, int secondary) throws RemoteException
      Walks through the component hierarchy and, for those components that display currency (isCurrencyDisplay returns true), converts the displayed data to the new currency type.
      Specified by:
      togglePrimaryToSecondary in interface PComponentAttribute
      Parameters:
      primary - the primary Portal currency ID
      secondary - the secondary Portal currency ID
      Returns:
      By default, always returns null.
      Throws:
      RemoteException - thrown for errors
      Since:
      Release 6.2
    • revertToPrimary

      public void revertToPrimary(int primary) throws RemoteException
      Causes the widget to display its data in the primary currency.
      Specified by:
      revertToPrimary in interface PComponentAttribute
      Parameters:
      primary - The primary currency ID for an account.
      Throws:
      RemoteException
    • viewDataChange

      public void viewDataChange(PViewDataChangeEvent event) throws RemoteException
      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 get() methods on the controller to get the data, as the PViewDataChangeEvent parameter is no longer used.
      Specified by:
      viewDataChange in interface PViewDataChangeListener
      Parameters:
      event - the PViewDataChangeEvent event that describes the change. No longer used. By default, the value passed in is always set to null.
      Throws:
      RemoteException - thrown for errors
    • setRequired

      public void setRequired(boolean b)
      Passes the setRequired method call to the view component.
      Specified by:
      setRequired in interface PComponentAttribute
      Parameters:
      b - if true, puts the component in a REQUIRED state
    • isRequired

      public boolean isRequired()
      Determines if the view component is required in its current context.
      Specified by:
      isRequired in interface PComponentAttribute
      Returns:
      True if the view component is marked REQUIRED; false otherwise.
    • setError

      public void setError(boolean b)
      Passes the setError method call to the view component.
      Specified by:
      setError in interface PComponentAttribute
      Parameters:
      b - if true, puts the component in an ERROR state
    • isError

      public boolean isError()
      Determines if the view component's ERROR attribute is set.
      Specified by:
      isError in interface PComponentAttribute
      Returns:
      True if the view component's ERROR attribute is set; false otherwise.
    • isDirty

      public boolean isDirty()
      Determines if the view component's DIRTY attribute is set.
      Specified by:
      isDirty in interface PComponentAttribute
      Returns:
      True if the view component's DIRTY attribute is set; false otherwise.
    • setDefault

      public void setDefault()
      Passes the setDefault() method call to the view component.
      Specified by:
      setDefault in interface PComponentAttribute
    • isClean

      public boolean isClean()
      Determines if the view component is clean. A return of false means that the component's attribute is marked as DIRTY or ERROR.
      Returns:
      True if the view component's DIRTY or ERROR attribute is not set; false otherwise.
    • setClean

      public void setClean()
      A convenience method that marks all PFieldComponent components in this panel as CLEAN. Useful if components are marked DIRTY because inputTracking is on, and the data was modified.
      Specified by:
      setClean in interface PComponentAttribute
    • setInputTracking

      public void setInputTracking(boolean b)
      A convenience method to toggle the inputTracking property for all descendants of this panel.
      Specified by:
      setInputTracking in interface PComponentAttribute
      Parameters:
      b - a flag that indicates if inputTracking should be supported
    • isInputTracking

      public boolean isInputTracking()
      Determines if inputTracking is on for this panel.
      Specified by:
      isInputTracking in interface PComponentAttribute
      Returns:
      True if inputTracking is on; false otherwise.
    • setCurrencyDisplay

      public void setCurrencyDisplay(boolean b)
      Determines if a component currently displays currency data. Widgets that display currency data are capable of automatically toggling their data between a primary and secondary Portal currency type. This method is called on the viewPort component.
      Specified by:
      setCurrencyDisplay in interface PComponentAttribute
      Parameters:
      b - if true, indicates that the widget currently displays currency data
      Since:
      Release 6.2
    • isCurrencyDisplay

      public boolean isCurrencyDisplay()
      Determines whether the viewPort component currently displays currency data.
      Specified by:
      isCurrencyDisplay in interface PComponentAttribute
      Returns:
      True if the viewPort component currently displays currency data; false otherwise.
      Since:
      Release 6.2
    • clear

      public void clear()
      A convenience method that clears every field on the descendants of this panel's viewPort component.
      Specified by:
      clear in interface PComponentAttribute
    • resetToDefault

      public void resetToDefault()
      A convenience method that resets the value of every field on the descendants of this panel's viewPort component.
      Specified by:
      resetToDefault in interface PComponentAttribute
    • collectData

      public void collectData(PCollectDataEvent event)
      Overrides PCollectDataListener. Forwarded to any contained GUI component that is also a PCollectDataListener.
      Specified by:
      collectData in interface PCollectDataListener
      Parameters:
      event - the PCollectDataEvent data event
    • initialize

      protected void initialize()
      Initializes the scrolling behavior for this component. The unit increment for the vertical scrollbar is set to 15, and the unit increment for the horizontal scrollbar is set to 5.