Class ModuleWrapperIJProperties
java.lang.Object
com.github.JianZhongBerkeley.moduleWrapperIJ.ModuleWrapperIJProperties
Class used to register properties of module, used for automatic value update from GUI and macro
- Version:
- 1.0
- Author:
- jian zhong
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String name, int type, String cmdGUI, String cmdMacro, Object value) add property field to classboolean
containsProperty
(String name) check if class contains a specific propertyString[]
get the names for all the existing propertiesgetPropertyChoices
(String name) get choices for a choice type propertiesgetPropertyCmdGUI
(String name) get the GUI label of a propertygetPropertyCmdMacro
(String name) get the Macro label of a propertyint
getPropertyMode
(String name) get the mode of the propertyint
getPropertyType
(String name) get the type of a propertygetPropertyValue
(String name) get the value of a propertyvoid
rmProperty
(String name) remove a propertyvoid
setPropertyChoices
(String name, Object choices) set choices for a choice type propertiesvoid
setPropertyMode
(String name, int mode) set the mode of the propertyvoid
setPropertyValue
(String name, Object value) set the value of the property
-
Field Details
-
PTYPE_NULL
public static final int PTYPE_NULL- See Also:
-
PTYPE_INT
public static final int PTYPE_INT- See Also:
-
PTYPE_DOUBLE
public static final int PTYPE_DOUBLE- See Also:
-
PTYPE_STRING
public static final int PTYPE_STRING- See Also:
-
PTYPE_WINSTR
public static final int PTYPE_WINSTR- See Also:
-
PTYPE_PLOTSTR
public static final int PTYPE_PLOTSTR- See Also:
-
PTYPE_BOOL
public static final int PTYPE_BOOL- See Also:
-
PTYPE_STRCHOICE
public static final int PTYPE_STRCHOICE- See Also:
-
PMODE_NULL
public static final int PMODE_NULL- See Also:
-
PMODE_SHOW
public static final int PMODE_SHOW- See Also:
-
PMODE_HIDE
public static final int PMODE_HIDE- See Also:
-
-
Constructor Details
-
ModuleWrapperIJProperties
public ModuleWrapperIJProperties()
-
-
Method Details
-
addProperty
add property field to class- Parameters:
name
- name of the property, different properties should have different namestype
- type of the property, it is defined by the PTYPE_* static value of this classcmdGUI
- property label used for GUI inputcmdMacro
- property label used for macro inputvalue
- initial value of the property
-
containsProperty
check if class contains a specific property- Parameters:
name
- name of the property to be checked- Returns:
- boolean value indicates if property exists
-
rmProperty
remove a property- Parameters:
name
- name of the property to be removed
-
getProperties
get the names for all the existing properties- Returns:
- String array of the property names
-
getPropertyType
get the type of a property- Parameters:
name
- property name- Returns:
- int value indicates the property value, which should be one of the public static PTYPE_* value
-
getPropertyCmdGUI
get the GUI label of a property- Parameters:
name
- property name- Returns:
- String of the GUI label
-
getPropertyCmdMacro
get the Macro label of a property- Parameters:
name
- property name- Returns:
- String of the Macro label
-
getPropertyValue
get the value of a property- Parameters:
name
- property name- Returns:
- Object value of the property value, needs to casted to appropriate types
-
setPropertyValue
set the value of the property- Parameters:
name
- property namevalue
- new value of the property
-
getPropertyMode
get the mode of the property- Parameters:
name
- name of the property- Returns:
- int value indicates the mode of the property, it should be one of the public static PMODE_* value
-
setPropertyMode
set the mode of the property- Parameters:
name
- name of the propertymode
- property mode, it should be one of the public static PMODE_* value
-
setPropertyChoices
set choices for a choice type properties- Parameters:
name
- name of the propertychoices
- choices of property
-
getPropertyChoices
get choices for a choice type properties- Parameters:
name
- name of the property- Returns:
- choices for the properties
-