|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GpadParm
The GpadParm
class is a container for parameters added
to a GraphicPad component. The class contains constants that
define Gpad parameter types.
GpadComponent
Field Summary | |
static int |
ALIGNMENT
Deprecated. No replacement |
static int |
BOOLEAN
Boolean parameter type |
static int |
HEIGHT
The height of the Paintlet canvas. |
static int |
IMAGE
Image parameter type. |
static int |
INT
Integer parameter type |
static int |
JAVACOLOR
Java color parameter type. |
static int |
RGBCOLOR
RGB color parameter type. |
static int |
SOCKET
Socket parameter type. |
static int |
STRING
String parameter type |
static int |
VARIABLE
Variable parameter type. |
static int |
WIDTH
The width of the Paintlet canvas. |
Constructor Summary | |
GpadParm()
Constructs a new GpadParm object. |
Method Summary | |
void |
addParm(java.lang.String parmName,
int parmType)
Adds a parameter name-type to this GpadParm object. |
java.util.Map |
getParmMap()
Gets the map containing the parameter types that have been added to this GpadParm object. |
java.lang.Object |
getParmValue(java.lang.String parmName)
Returns the value of a named component parameter as an Object type. |
void |
setParm(java.lang.String parmName,
java.lang.Object parmVal)
Sets the value of the named parameter to the specified Object . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STRING
public static final int INT
public static final int BOOLEAN
public static final int JAVACOLOR
Color
class.Color
public static final int RGBCOLOR
Color
public static final int IMAGE
public static final int ALIGNMENT
public static final int SOCKET
Socket
public static final int VARIABLE
GpadComponent.getVariableChoice(String)
public static final int WIDTH
public static final int HEIGHT
Constructor Detail |
public GpadParm()
GpadParm
object.Method Detail |
public java.util.Map getParmMap()
GpadParm
object. This method should not be used by
component developers.public void addParm(java.lang.String parmName, int parmType)
GpadParm
object.
Component developers should use the addParameter method in the
GpadComponent
class.parmName
- the name of the parameterparmType
- the type of the parameterGpadComponent.addParameter(String,int)
public void setParm(java.lang.String parmName, java.lang.Object parmVal)
Object
.
This method is called by the gpad application. It associates the
user-specified parameter value to the specified parameter name. These
parameter values are made available to the component developer
with the getParmValue
method.
The getParmValue
method is normally invoked within
the runComponent
method of a component.parmName
- the name of the parameterparmValue
- the value of the parameterGpadComponent.addParameter(String,int)
,
getParmValue(String)
public java.lang.Object getParmValue(java.lang.String parmName) throws GpadParmException
Object
type.
This method is normally called in the runComponent
method of
a GpadComponent
. The caller of this method must cast the returned object to
the appropriate type. A GpadParmException
is thrown if no
value has been assigned to the named parameter.parmName
- the name of the parameterGpadParmException
- if a named parameter has a null valueGpadComponent.runComponent()
,
GpadParmException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |