app.preferences
.app.preferences.register
function.java.gen.useTab
, java.gen.indentSpaces
).key
.Combo
or Dropdown
preference items. This property should be defined as an array of objects having two fields: value
and text
. (e.g. [ { value: 0, text: "female" }, { value: 1, text: "male" } ]
)default
property value to null
. It means nothing selected. Additionally, allow to define defaultButton
property like as defaultButton: { text: "Use Default Color" }
. When it defined, a button is shown in front of color widget in Preferences Dialog and changes to default color when it pressed.get
function with key of the preference item. It returns user selected value or default value. If passed undefined key, it returns null
value.set
function with key and value. Note that you have to pass value of correct type conform to the type of preference item. For example, do not pass string value to a preference item of check type.