Class PFieldDelegate

All Implemented Interfaces:
Serializable

public class PFieldDelegate extends PComponentDelegate implements 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:
  • Constructor Details

  • Method Details

    • setDisplayFieldFormat

      public void setDisplayFieldFormat(String fieldForm) throws RemoteException
      Sets the format used to display the field(s) described by the DisplayFieldDescription. This is a standard Java MessageFormat string.
      Parameters:
      fieldForm - the format string, or resource tag for the format
      Throws:
      RemoteException - thrown for all problems
    • getDisplayFieldFormat

      public String getDisplayFieldFormat() throws RemoteException
      Gets the display format.
      Returns:
      A String with the message format.
      Throws:
      RemoteException - thrown for all problems
    • setHelpID

      public void setHelpID(String id)
      Sets the help ID for this component.
      Parameters:
      id - the new help ID
    • getHelpID

      public String 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, before addNotify() is called
    • setFormatter

      public void setFormatter(PInfranetMessageFormat format)
      Sets the format for component data.
      Parameters:
      format - a new PInfranetMessageFormat object
    • formatData

      public String formatData(Object val) throws IllegalComponentStateException
      Formats data for the component.
      Parameters:
      val - the data to be formatted. If the format needs multiple parameters, then val should be a Vector or an Object array.
      Returns:
      A formatted String.
      Throws:
      IllegalComponentStateException - thrown if the component is not yet a child of a valid view tree, for example, before addNotify() is called
    • setCurrencyFormat

      public void setCurrencyFormat(NumberFormat newFormat)
      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, before addNotify() is called