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

    • PamParameterData

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

      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

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

    • setShortName

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

      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

      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

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

      public Object getParentObject()
      Returns:
      the parentObject
    • getFieldName

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

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

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

      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

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

      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

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

      public String getPostTitle()
      Returns:
      the postTitle
    • setPostTitle

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

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

      public int getFieldLength()
      Returns:
      the fieldLength
    • setFieldLength

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