Package com.portal.bas
Class PComponentDelegate
java.lang.Object
com.portal.bas.PComponentDelegate
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PFieldDelegate
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of the implementation object to delegate to thePAppComponentinterface. -
Method Summary
Modifier and TypeMethodDescriptionGets the controller.Gets the name for the controller of this class.getElementOfSpec(String spec, int element) A helper function which, given an array specification string and an index, returns aStringwith the index used in the array.Gets a reference to the remote component for this object.getResource(String tag) A utility method that gets the resource string associated with the parameter.Gets the base resource name.getTools()Gets a list of Actions supported by this component.booleanisLight()Determines whether this is a lightweight component.voidregister()A utility method that retrieves the name of a subclass and registers it as a new GUI component.voidsetController(PControllerBean controller) Internal method called by the server to assign the created controller.voidsetResourceName(String name) void
-
Field Details
-
mDel
-
mComponentController
-
-
Constructor Details
-
PComponentDelegate
Creates an instance of the implementation object to delegate to thePAppComponentinterface. Any implementations ofPAppComponentmust delegate to this object.- Parameters:
comp- the derivitive ofPAppComponentfor which this instance implements remote behavior- Throws:
RemoteException- thrown for all problems
-
-
Method Details
-
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
Remotecomponent.
-
setController
Internal method called by the server to assign the created controller.- Parameters:
controller- new controller object- Throws:
RemoteException- thrown for problems
-
getController
Gets the controller. Sometimes called by a delegator for special direct access.- Returns:
- A
PControllerBeanobject. - 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 thatgetModelHandlealways returns null,setModelHandleis ignored, and no property change events are generated.- Returns:
- True if the component is lightweight; false otherwise.
-
getControllerClassName
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
Stringwith the component's controller class name. - Throws:
RemoteException- thrown for all problems
-
setResourceName
-
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
Stringthat contains the resource base name, if any, null otherwise.
-
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
Vectorthat contains Action objects.
-
getResource
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
Stringresource; if none found, returns the tag. - Throws:
RemoteException- thrown for errors
-
register
A utility method that retrieves the name of a subclass and registers it as a new GUI component.- Throws:
RemoteException- thrown for errors
-
unregister
- Throws:
RemoteException
-
getElementOfSpec
A helper function which, given an array specification string and an index, returns aStringwith the index used in the array.- Parameters:
spec- a field descriptionStringthat describes an arrayelement- a specific element in the array- Returns:
- The specified
String, with the array element replaced by the specified new element.
-