Package com.portal.bas
Class PFieldDelegate
java.lang.Object
com.portal.bas.PComponentDelegate
com.portal.bas.PFieldDelegate
- All Implemented Interfaces:
Serializable
PFieldDelegate
is a helper class for components that implement the
PFieldBean
interface. It can be used by delegating
the PFieldBean
interface methods to their corresponding
PFieldDelegate
methods. Ordinarily, most UI components are derived from a
Swing
class and implement the methods of an
interface.- Version:
- %version: 5 % %date_modified: Fri Feb 08 09:58:26 2002 %
- Author:
- larrylf
- See Also:
-
Field Summary
Fields inherited from class com.portal.bas.PComponentDelegate
mComponentController, mDel
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the default instance ofPFieldDelegate
. -
Method Summary
Modifier and TypeMethodDescriptionformatData
(Object val) Formats data for the component.Gets the display format.Gets a formatter for the component's data.Gets the current help ID for this component.Gets a renderer for this component.void
setCurrencyFormat
(NumberFormat newFormat) Changes the currency format.void
setDisplayFieldFormat
(String fieldForm) Sets the format used to display the field(s) described by theDisplayFieldDescription
.void
setFormatter
(PInfranetMessageFormat format) Sets the format for component data.void
Sets the help ID for this component.Methods inherited from class com.portal.bas.PComponentDelegate
getController, getControllerClassName, getElementOfSpec, getRemoteComponent, getResource, getResourceName, getTools, isLight, register, setController, setResourceName, unregister
-
Constructor Details
-
PFieldDelegate
Creates the default instance ofPFieldDelegate
.- Parameters:
comp
- the field component- Throws:
RemoteException
- thrown for all problems
-
-
Method Details
-
setDisplayFieldFormat
Sets the format used to display the field(s) described by theDisplayFieldDescription
. This is a standard JavaMessageFormat
string.- Parameters:
fieldForm
- the format string, or resource tag for the format- Throws:
RemoteException
- thrown for all problems
-
getDisplayFieldFormat
Gets the display format.- Returns:
- A
String
with the message format. - Throws:
RemoteException
- thrown for all problems
-
setHelpID
Sets the help ID for this component.- Parameters:
id
- the new help ID
-
getHelpID
Gets the current help ID for this component.- Returns:
- A
String
with the help ID.
-
getFormatter
Gets a formatter for the component's data.- Returns:
- A
PInfranetMessageFormat
object that can deal with permissions. - Throws:
IllegalComponentStateException
- thrown if the component is not yet a child of a valid view tree, for example, beforeaddNotify()
is called
-
setFormatter
Sets the format for component data.- Parameters:
format
- a newPInfranetMessageFormat
object
-
formatData
Formats data for the component.- Parameters:
val
- the data to be formatted. If the format needs multiple parameters, thenval
should be aVector
or anObject
array.- Returns:
- A formatted
String
. - Throws:
IllegalComponentStateException
- thrown if the component is not yet a child of a valid view tree, for example, beforeaddNotify()
is called
-
setCurrencyFormat
Changes the currency format.- Parameters:
newFormat
- the new currency format
-
getRenderer
Gets a renderer for this component. The renderer uses an Portal-aware, permissions-based formatter, and is suitable for lists or tables.- Returns:
- A
PFieldComponentRenderer
object. - Throws:
IllegalComponentStateException
- thrown if the component is not yet a child of a valid view tree, for example, beforeaddNotify()
is called
-