Class PComponentDelegate

java.lang.Object
com.portal.bas.PComponentDelegate
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PFieldDelegate

public class PComponentDelegate extends Object implements Serializable
PComponentDelegate is a distributed class that provides the base functionality needed for a new UI control to support display and editing of Portal database information. PAppComponent uses this class as a delegate to work around multiple inheritance problems. New components should inherit from the PAppComponent class.
Version:
%version: 6 % %date_modified: Tue Dec 18 11:12:56 2001 %
Author:
larrylf
See Also:
  • Field Details

  • Constructor Details

    • PComponentDelegate

      public PComponentDelegate(PAppComponent comp) throws RemoteException
      Creates an instance of the implementation object to delegate to the PAppComponent interface. Any implementations of PAppComponent must delegate to this object.
      Parameters:
      comp - the derivitive of PAppComponent for which this instance implements remote behavior
      Throws:
      RemoteException - thrown for all problems
  • Method Details

    • getRemoteComponent

      public Remote getRemoteComponent()
      Gets a reference to the remote component for this object. The remote component is used when interfacing with this component's controller.
      Returns:
      A Remote component.
    • setController

      public void setController(PControllerBean controller) throws RemoteException
      Internal method called by the server to assign the created controller.
      Parameters:
      controller - new controller object
      Throws:
      RemoteException - thrown for problems
    • getController

      public PControllerBean getController() throws RemoteException
      Gets the controller. Sometimes called by a delegator for special direct access.
      Returns:
      A PControllerBean object.
      Throws:
      RemoteException - thrown for all problems
    • isLight

      public boolean isLight()
      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.
      Returns:
      True if the component is lightweight; false otherwise.
    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Gets the name for the controller of this class. The default is to add the word "Controller" to the component's class name. This should be overridden by the delegator to use other names.
      Returns:
      A String with the component's controller class name.
      Throws:
      RemoteException - thrown for all problems
    • setResourceName

      public void setResourceName(String name)
    • getResourceName

      public String getResourceName()
      Gets the base resource name. If one has not been set for this component specifically, it returns the resource name as defined in a parent object.
      Returns:
      A String that contains the resource base name, if any, null otherwise.
    • getTools

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

      public String getResource(String tag) throws RemoteException
      A utility method that gets the resource string associated with the parameter. Takes the base resource name into account.
      Parameters:
      tag - the resource tag
      Returns:
      A String resource; if none found, returns the tag.
      Throws:
      RemoteException - thrown for errors
    • register

      public void register() throws RemoteException
      A utility method that retrieves the name of a subclass and registers it as a new GUI component.
      Throws:
      RemoteException - thrown for errors
    • unregister

      public void unregister() throws RemoteException
      Throws:
      RemoteException
    • getElementOfSpec

      public String getElementOfSpec(String spec, int element)
      A helper function which, given an array specification string and an index, returns a String with the index used in the array.
      Parameters:
      spec - a field description String that describes an array
      element - a specific element in the array
      Returns:
      The specified String, with the array element replaced by the specified new element.