Class PamParameterData

java.lang.Object
PamModel.parametermanager.PamParameterData
Direct Known Subclasses:
FieldlessPamParameterData, PrivatePamParameterData

public abstract class PamParameterData extends Object
Description of data within a field in a class
Author:
Doug Gillespie
  • Constructor Details Link icon

    • PamParameterData Link icon

      public PamParameterData(Object parentObject, Field field)
      Parameters:
      parentObject -
      field -
    • PamParameterData Link icon

      public PamParameterData(Object parentObject, Field field, String shortName, String toolTip, int fieldLength)
      Parameters:
      parentObject -
      field -
      shortName -
      toolTip -
      fieldLength - length of text in automatic dialogs.
    • PamParameterData Link icon

      public PamParameterData(Object parentObject, Field field, String shortName, String toolTip)
      Parameters:
      parentObject -
      field -
      shortName -
      toolTip -
  • Method Details Link icon

    • setShortName Link icon

      public void setShortName(String shortName)
      Parameters:
      shortName - the shortName to set
    • setInfo Link icon

      public void setInfo(String shortName, String postTitle, String toolTip, int fieldLength)
      Set info about a parameter
      Parameters:
      shortName - short name, e.g. to use in a dialog
      postTitle - post title, e.g. text coming after a data entry field in a dialog
      toolTip - tool tip to display over the component in a dialog.
      fieldLength - length of text in automatic dialogs.
    • setInfo Link icon

      public void setInfo(String shortName, String postTitle, String toolTip)
      Set info about a parameter
      Parameters:
      shortName - short name, e.g. to use in a dialog
      postTitle - post title, e.g. text coming after a data entry field in a dialog
      toolTip - tool tip to display over the component in a dialog.
    • setToolTip Link icon

      public void setToolTip(String toolTip)
      Parameters:
      toolTip - the toolTip to set
    • getParentObject Link icon

      public Object getParentObject()
      Returns:
      the parentObject
    • getFieldName Link icon

      public String getFieldName()
      Returns:
      The name of the field
    • getField Link icon

      public Field getField()
      Returns:
      The field object describing this parameter
    • getData Link icon

      public abstract Object getData() throws IllegalArgumentException, IllegalAccessException
      Returns:
      The data. Primitives will be wrapped as an object.
      Throws:
      IllegalArgumentException
      IllegalAccessException
    • setData Link icon

      public abstract boolean setData(Object data) throws IllegalArgumentException, IllegalAccessException
      Set the data in the field.
      Parameters:
      data -
      Returns:
      true if successful, false if null, Exception if data are wrong type
      Throws:
      IllegalArgumentException
      IllegalAccessException
    • getDataClass Link icon

      public Class getDataClass()
      Returns:
      The data class
    • getShortName Link icon

      public String getShortName()
      A short name for the data. May default to the field name if it's not been explicitly set.
      Returns:
      a short name for the field, suitable for use in dialogs.
    • getToolTip Link icon

      public String getToolTip()
      Returns:
      Longer descriptive text for a field. Suitable for use in tooltips. Can be null.
    • getPostTitle Link icon

      public String getPostTitle()
      Returns:
      the postTitle
    • setPostTitle Link icon

      public void setPostTitle(String postTitle)
      Parameters:
      postTitle - the postTitle to set
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • getFieldLength Link icon

      public int getFieldLength()
      Returns:
      the fieldLength
    • setFieldLength Link icon

      public void setFieldLength(int fieldLength)
      Parameters:
      fieldLength - the fieldLength to set