From d8cd67062b8de6e8398dc6dfd00d201200c82414 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 9 Feb 2018 13:40:35 +0100 Subject: API doc and readme --- .../api/pl.treksoft.kvision.form/-form/-init-.html | 24 ++++ docs/api/pl.treksoft.kvision.form/-form/add.html | 28 +++++ .../pl.treksoft.kvision.form/-form/clear-data.html | 15 +++ .../-form/get-control.html | 20 ++++ .../-form/get-data-json.html | 17 +++ .../pl.treksoft.kvision.form/-form/get-data.html | 17 +++ docs/api/pl.treksoft.kvision.form/-form/get.html | 20 ++++ docs/api/pl.treksoft.kvision.form/-form/index.html | 123 +++++++++++++++++++++ .../pl.treksoft.kvision.form/-form/remove-all.html | 17 +++ .../api/pl.treksoft.kvision.form/-form/remove.html | 20 ++++ .../pl.treksoft.kvision.form/-form/set-data.html | 18 +++ .../pl.treksoft.kvision.form/-form/validate.html | 17 +++ 12 files changed, 336 insertions(+) create mode 100644 docs/api/pl.treksoft.kvision.form/-form/-init-.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/add.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/clear-data.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/get-control.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/get-data-json.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/get-data.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/get.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/index.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/remove-all.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/remove.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/set-data.html create mode 100644 docs/api/pl.treksoft.kvision.form/-form/validate.html (limited to 'docs/api/pl.treksoft.kvision.form/-form') diff --git a/docs/api/pl.treksoft.kvision.form/-form/-init-.html b/docs/api/pl.treksoft.kvision.form/-form/-init-.html new file mode 100644 index 00000000..b703eeca --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/-init-.html @@ -0,0 +1,24 @@ + + + +Form.<init> - kvision + + + +kvision / pl.treksoft.kvision.form / Form / <init>
+
+

<init>

+ +Form(panel: FormPanel<K>? = null, modelFactory: (Map<String, Any?>) -> K) +

Creates a form with a given modelFactory function

+

Parameters

+

+K - model class type

+

+panel - optional instance of FormPanel

+

+modelFactory - function transforming a Map<String, Any?> to a data model of class K

+

Constructor
+Creates a form with a given modelFactory function

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/add.html b/docs/api/pl.treksoft.kvision.form/-form/add.html new file mode 100644 index 00000000..c17affd8 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/add.html @@ -0,0 +1,28 @@ + + + +Form.add - kvision + + + +kvision / pl.treksoft.kvision.form / Form / add
+
+

add

+ +fun <C : FormControl> add(key: String, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +

Adds a control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the form control

+

+required - determines if the control is required

+

+validatorMessage - optional function returning validation message

+

+validator - optional validation function

+

Return
+current form

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/clear-data.html b/docs/api/pl.treksoft.kvision.form/-form/clear-data.html new file mode 100644 index 00000000..cc02df05 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/clear-data.html @@ -0,0 +1,15 @@ + + + +Form.clearData - kvision + + + +kvision / pl.treksoft.kvision.form / Form / clearData
+
+

clearData

+ +fun clearData(): Unit +

Sets the values of all controls to null.

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/get-control.html b/docs/api/pl.treksoft.kvision.form/-form/get-control.html new file mode 100644 index 00000000..66a7180a --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/get-control.html @@ -0,0 +1,20 @@ + + + +Form.getControl - kvision + + + +kvision / pl.treksoft.kvision.form / Form / getControl
+
+

getControl

+ +fun getControl(key: String): FormControl? +

Returns a control of given key.

+

Parameters

+

+key - key identifier of the control

+

Return
+selected control

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/get-data-json.html b/docs/api/pl.treksoft.kvision.form/-form/get-data-json.html new file mode 100644 index 00000000..4c327ae8 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/get-data-json.html @@ -0,0 +1,17 @@ + + + +Form.getDataJson - kvision + + + +kvision / pl.treksoft.kvision.form / Form / getDataJson
+
+

getDataJson

+ +fun getDataJson(): Json +

Returns current data model as JSON.

+

Return
+data model as JSON

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/get-data.html b/docs/api/pl.treksoft.kvision.form/-form/get-data.html new file mode 100644 index 00000000..bc3e0f12 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/get-data.html @@ -0,0 +1,17 @@ + + + +Form.getData - kvision + + + +kvision / pl.treksoft.kvision.form / Form / getData
+
+

getData

+ +fun getData(): K +

Returns current data model.

+

Return
+data model

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/get.html b/docs/api/pl.treksoft.kvision.form/-form/get.html new file mode 100644 index 00000000..0a7b70fb --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/get.html @@ -0,0 +1,20 @@ + + + +Form.get - kvision + + + +kvision / pl.treksoft.kvision.form / Form / get
+
+

get

+ +operator fun get(key: String): Any? +

Returns a value of the control of given key.

+

Parameters

+

+key - key identifier of the control

+

Return
+value of the control

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/index.html b/docs/api/pl.treksoft.kvision.form/-form/index.html new file mode 100644 index 00000000..678f3d2b --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/index.html @@ -0,0 +1,123 @@ + + + +Form - kvision + + + +kvision / pl.treksoft.kvision.form / Form
+
+

Form

+class Form<K> +

The form definition class. Can be used directly or indirectly inside a FormPanel.

+

Constructors

+ + + + + + + +
+

<init>

+
+Form(panel: FormPanel<K>? = null, modelFactory: (Map<String, Any?>) -> K) +

Creates a form with a given modelFactory function

+
+

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

add

+
+fun <C : FormControl> add(key: String, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +

Adds a control to the form.

+
+

clearData

+
+fun clearData(): Unit +

Sets the values of all controls to null.

+
+

get

+
+operator fun get(key: String): Any? +

Returns a value of the control of given key.

+
+

getControl

+
+fun getControl(key: String): FormControl? +

Returns a control of given key.

+
+

getData

+
+fun getData(): K +

Returns current data model.

+
+

getDataJson

+
+fun getDataJson(): Json +

Returns current data model as JSON.

+
+

remove

+
+fun remove(key: String): Form<K> +

Removes a control from the form.

+
+

removeAll

+
+fun removeAll(): Form<K> +

Removes all controls from the form.

+
+

setData

+
+fun setData(model: K): Unit +

Sets the values of all the controls from the model.

+
+

validate

+
+fun validate(): Boolean +

Invokes validator function and validates the form.

+
+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/remove-all.html b/docs/api/pl.treksoft.kvision.form/-form/remove-all.html new file mode 100644 index 00000000..1b454ea5 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/remove-all.html @@ -0,0 +1,17 @@ + + + +Form.removeAll - kvision + + + +kvision / pl.treksoft.kvision.form / Form / removeAll
+
+

removeAll

+ +fun removeAll(): Form<K> +

Removes all controls from the form.

+

Return
+current form

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/remove.html b/docs/api/pl.treksoft.kvision.form/-form/remove.html new file mode 100644 index 00000000..4a410154 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/remove.html @@ -0,0 +1,20 @@ + + + +Form.remove - kvision + + + +kvision / pl.treksoft.kvision.form / Form / remove
+
+

remove

+ +fun remove(key: String): Form<K> +

Removes a control from the form.

+

Parameters

+

+key - key identifier of the control

+

Return
+current form

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/set-data.html b/docs/api/pl.treksoft.kvision.form/-form/set-data.html new file mode 100644 index 00000000..c4c01463 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/set-data.html @@ -0,0 +1,18 @@ + + + +Form.setData - kvision + + + +kvision / pl.treksoft.kvision.form / Form / setData
+
+

setData

+ +fun setData(model: K): Unit +

Sets the values of all the controls from the model.

+

Parameters

+

+model - data model

+ + diff --git a/docs/api/pl.treksoft.kvision.form/-form/validate.html b/docs/api/pl.treksoft.kvision.form/-form/validate.html new file mode 100644 index 00000000..7bfbbd87 --- /dev/null +++ b/docs/api/pl.treksoft.kvision.form/-form/validate.html @@ -0,0 +1,17 @@ + + + +Form.validate - kvision + + + +kvision / pl.treksoft.kvision.form / Form / validate
+
+

validate

+ +fun validate(): Boolean +

Invokes validator function and validates the form.

+

Return
+validation result

+ + -- cgit