scg.ac.ni.pmf.newgraph.param
Interface Parametrizable


public interface Parametrizable

If a plug-in requires parameters to be entered by the user, it must implement this interface. Some plug-ins, like grap invariants (Invariant), graph actions (GraphAction), graph generators (GraphGenerator), etc, in the could be "parametrized". This means that some parameters could be set. Managing of the parameters is done in a way to maxiamally simplify it for the programmer who writes invariants. All the parametrizable classes must implement this interface.

Parametrization is done in a way that the system identifies all the JavaBeans in the class. For example, all the pairs of methods of the type getSomething and setSomething are detected, and upon invoking the class, say starting the invariant, a dialog box is automatically build where the end user can type the parameter value. The programmer does not have to deal with the user interface, yet he can only declare a JavaBean.

Currently, the only values for the parameters which are supported are boolean, byte, int and double. Please see the referring classes.

Author:
Vladimir Brankov
See Also:
ParamBoolean, ParamByte, ParamDouble, ParamInt, Parametrizator, "Plug-in Developer Guide"

Method Summary
 java.lang.String checkParameters()
          Each of the object which is parametrized, must have a function which test the value of the parameters.
 java.lang.String getDescription()
          Each of the objects that can be parametrized, must have a description, which is shown on the parametrization dialog.
 java.lang.String getName()
          Each of the objects that can be parametrized, must have a name.
 

Method Detail

getName

java.lang.String getName()
Each of the objects that can be parametrized, must have a name.

Returns:
String The name.

getDescription

java.lang.String getDescription()
Each of the objects that can be parametrized, must have a description, which is shown on the parametrization dialog.

Returns:
String The description.

checkParameters

java.lang.String checkParameters()
Each of the object which is parametrized, must have a function which test the value of the parameters. If the parameters are wrong, it must return the error explanation. Otherwise, it must return null

Returns:
String The message.
See Also:
"Plug-in Developer Guide"


Copyright © 2004 Dragan Stevanovic, Vladimir Brankov.