Package PamModel.parametermanager
Class PamParameterData
java.lang.Object
PamModel.parametermanager.PamParameterData
- Direct Known Subclasses:
FieldlessPamParameterData
,PrivatePamParameterData
Description of data within a field in a class
- Author:
- Doug Gillespie
-
Constructor Summary
ConstructorDescriptionPamParameterData
(Object parentObject, Field field) PamParameterData
(Object parentObject, Field field, String shortName, String toolTip) PamParameterData
(Object parentObject, Field field, String shortName, String toolTip, int fieldLength) -
Method Summary
Modifier and TypeMethodDescriptionabstract Object
getData()
getField()
int
A short name for the data.abstract boolean
Set the data in the field.void
setFieldLength
(int fieldLength) void
Set info about a parametervoid
Set info about a parametervoid
setPostTitle
(String postTitle) void
setShortName
(String shortName) void
setToolTip
(String toolTip) toString()
-
Constructor Details
-
PamParameterData
- 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
- Parameters:
parentObject
-field
-shortName
-toolTip
-
-
-
Method Details
-
setShortName
- Parameters:
shortName
- the shortName to set
-
setInfo
Set info about a parameter- Parameters:
shortName
- short name, e.g. to use in a dialogpostTitle
- post title, e.g. text coming after a data entry field in a dialogtoolTip
- tool tip to display over the component in a dialog.fieldLength
- length of text in automatic dialogs.
-
setInfo
Set info about a parameter- Parameters:
shortName
- short name, e.g. to use in a dialogpostTitle
- post title, e.g. text coming after a data entry field in a dialogtoolTip
- tool tip to display over the component in a dialog.
-
setToolTip
- Parameters:
toolTip
- the toolTip to set
-
getParentObject
- Returns:
- the parentObject
-
getFieldName
- Returns:
- The name of the field
-
getField
- Returns:
- The field object describing this parameter
-
getData
- 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
- Returns:
- The data class
-
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
- Returns:
- Longer descriptive text for a field. Suitable for use in tooltips. Can be null.
-
getPostTitle
- Returns:
- the postTitle
-
setPostTitle
- Parameters:
postTitle
- the postTitle to set
-
toString
-
getFieldLength
public int getFieldLength()- Returns:
- the fieldLength
-
setFieldLength
public void setFieldLength(int fieldLength) - Parameters:
fieldLength
- the fieldLength to set
-