How-to use the Widget Library

This library contains simple examples to understand how to use the main Widgets library APIs.
HOWTO for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
# Overview
This library contains simple examples to understand how to use the main Widgets library APIs. It is recommended to study them in the following order :

- [com.microej.howto.mwt.colors.Gradient](Widgets-Get-Started/src/main/java/com/microej/howto/mwt/colors/Gradient.java)

![Gradient](screenshots/Gradient.png)


# Usage
For each example:
## Run on MicroEJ Simulator
1. Right Click on the example to run `.java` file
2. Select **Run as -> MicroEJ Application**
3. Select your platform 
4. Press **Ok**


## Run on device
### Build
1. Right Click on the example to build `.java` file
2. Select **Run as -> Run Configuration** 
3. Select **MicroEJ Application** configuration kind
4. Click on **New launch configuration** icon
5. In **Execution** tab
	1. In **Target** frame, in **Platform** field, select a relevant platform (but not a virtual device)
	2. In **Execution** frame
		1. Select **Execute on Device**
		2. In **Settings** field, select **Build & Deploy**
6. Press **Apply**
7. Press **Run**
8. Copy the generated `.out` file path
	
# Requirements
* MicroEJ Studio or SDK 4.0 or later
* A platform with at least:
	* EDC-1.2 or later
	* BON-1.2 or later
	* MICROUI-2.0 or later
	* MWT-2.1 or later

* Add the following line to your `module.ivy` or your `ivy.xml`:
> `<dependency org="ej.library.ui" name="widget" rev="2.0.0-alpha.10"/>`


# Dependencies
_All dependencies are retrieved transitively by Ivy resolver_.


# Source
N/A

# Restrictions
None.

How-to use the MicroUI Library

This library contains simple examples to understand how to use the main MicroUI library APIs.
HOWTO for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
<!--
	Markdown
	Copyright 2016 IS2T. All rights reserved.
	Use of this source code is governed by a BSD-style license that can be found at http://www.is2t.com/open-source-bsd-license/.
-->

# Overview
This library contains simple examples to understand how to use the main MicroUI library APIs. It is recommended to study them in the following order :


- [com.microej.howto.microui.drawing.Primitives](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/drawing/Primitives.java)

![Primitives](screenshots/Primitives.png)

- [com.microej.howto.microui.drawing.PrimitivesAntiAliased](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/drawing/PrimitivesAntiAliased.java)

![PrimitivesAntiAliased](screenshots/PrimitivesAntiAliased.png)

- [com.microej.howto.microui.font.Text](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/font/Text.java)

![Text](screenshots/Text.png)

- [com.microej.howto.microui.font.PictosWithCustomFont](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/font/PictosWithCustomFont.java)

![PictosWithCustomFont](screenshots/PictosWithCustomFont.png)

- [com.microej.howto.microui.image.TransparentImages](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/image/TransparentImages.java)

![TransparentImages](screenshots/TransparentImages.png)

- [com.microej.howto.microui.image.FlippedImages](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/image/FlippedImages.java)

![FlippedImages](screenshots/FlippedImages.png)

- [com.microej.howto.microui.image.RotatedImages](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/image/RotatedImages.java)

![RotatedImages](screenshots/RotatedImages.png)

- [com.microej.howto.microui.image.ScaledImages](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/image/ScaledImages.java)

![ScaledImages](screenshots/ScaledImages.png)

- [com.microej.howto.microui.image.TilingWithImages](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/image/TilingWithImages.java)

![TilingWithImages](screenshots/TilingWithImages.png)

- [com.microej.howto.microui.image.DeformedImages](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/image/DeformedImages.java)

![DeformedImages](screenshots/DeformedImages.png)

- [com.microej.howto.microui.events.InputEvents](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/events/InputEvents.java)

![InputEvents](screenshots/InputEvents.png)

- [com.microej.howto.microui.animation.AnimationSampleWithFullRepaint](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/animation/AnimationSampleWithFullRepaint.java)

- [com.microej.howto.microui.animation.AnimationSampleWithFlyingImage](/MicroUI-Get-Started/src/main/java/com/microej/howto/microui/animation/AnimationSampleWithFlyingImage.java)


Note that the same set of resources (images and fonts) is used across all of the examples.

# Usage
For each example:
## Run on MicroEJ Simulator
1. Right Click on the example to run `.java` file
2. Select **Run as -> MicroEJ Application**
3. Select your platform 
4. Press **Ok**


## Run on device
### Build
1. Right Click on the example to build `.java` file
2. Select **Run as -> Run Configuration** 
3. Select **MicroEJ Application** configuration kind
4. Click on **New launch configuration** icon
5. In **Execution** tab
	1. In **Target** frame, in **Platform** field, select a relevant platform (but not a virtual device)
	2. In **Execution** frame
		1. Select **Execute on Device**
		2. In **Settings** field, select **Build & Deploy**
6. Press **Apply**
7. Press **Run**
8. Copy the generated `.out` file path
	
# Requirements
* MicroEJ Studio or SDK 4.0 or later
* A platform with at least:
	* EDC-1.2 or higher
	* BON-1.2 or higher
	* MICROUI-2.0 or higher

# Dependencies
_All dependencies are retrieved transitively by Ivy resolver_.

# Credits


| <p align="center">Font</p> | <p align="center">Author</p> | <p align="center">License</p> |
| --- | :---: | --- |
| Font Awesome | Dave Gandy <br/> http://fontawseome.io  | [SIL OFL 1.1 license - http://scripts.sil.org/OFL](/MicroUI-Get-Started/src/main/resources/fonts/OFL.txt)|
| Sans | Adobe |[SIL Open Font License.txt](/MicroUI-Get-Started/src/main/resources/fonts/Adobe-Source-SIL-Open-Font-License.txt)|


# Source
N/A

# Restrictions
None.

Arabic Font (Standalone)

Example that shows how to use arabic fonts.
EXAMPLE for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
# Overview
This example shows how to use the arabic fonts.

# Usage

1. First of all, you must have a font containing the characters of the unicode block called `Arabic Presentation Forms-B` i.e. the range `0xFE70-0xFEFF`.

2. Then your strings must be formed with the characters of this range too (as you can see with the strings of HowToUseArabicFontDisplayable.TITLE and HowToUseArabicFontDisplayable.AVAILABLE_TEXTS, /u0020 corresponds to the space character).
3. Finally the order of the strings must be reversed.

## Run on MicroEJ Simulator
1. Right Click on the project
1. Select **Run as -> MicroEJ Application**
1. Select your platform 
1. Press **Ok**

## Run on device
### Build
1. Right Click on [HowToUseArabicFont.java](HowToUseArabicFont/src/main/java/com/microej/example/arabicfont/HowToUseArabicFont.java)
1. Select **Run as -> Run Configuration**
1. Select **MicroEJ Application** configuration kind
1. Click on **New launch configuration** icon
1. Select **Execute on Device**
1. Select **Build & Deploy**
1. Go to **Execution** tab
	* Select your platform 
1. Press **Apply**
1. Press **Run**
1. Copy the generated `.out` file path

### Flash
1. Use the appropriate flashing tool.

# Requirements
* MicroEJ Studio or SDK 4.0 or later
* A platform with at least:
	* EDC-1.2 or higher
	* MICROUI-2.0 or higher
	
## Dependencies
_All dependencies are retrieved transitively by Ivy resolver_.

# Source
N/A

# Restrictions
None.
Motion library, providing animated tasks and a set of defined motions.
LIBRARY for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: Studio & SDK
Last updated:
6 July 2017
<!--
	Markdown
	Copyright 2014-2016 IS2T. All rights reserved.
	IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->

# Overview
A motion library, providing animated tasks and a set of defined motions 
(linear, elastic, bounce, etc.), useful for HMI animations.

# Usage
Add the following line to your `module.ivy` or your `ivy.xml`:
> `<dependency org="ej.library.runtime" name="components" rev="3.+"/>`

# Requirements
  - EDC-1.2 or higher
  - BON-1.2 or higher

# Dependencies
None.

# Source
N/A

# Restrictions
None.
Widget library.
LIBRARY for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: Studio & SDK
Last updated:
6 July 2017
<!--
	Markdown
	Copyright 2015-2016 IS2T. All rights reserved.
	IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->

# Overview
This library contains all that is necessary to create an HMI on MWT 2:
- a dynamic style resolution (_ej.style_),
- a set of widgets (_ej.widget_),
- a set of containers (_ej.widget.container_),
- an animation framework (_ej.animation_),
- a navigation framework (_ej.widget.navigation_),
- some color utilities (_ej.color_).

# Style
The style framework is used to customize a user interface.

A style is a set of attributes to apply to an element (spacing, coloring, font, size, etc.).

The stylesheet is augmented with rules: a selector associated with a partial style. The rules are ordered from the most specific to the least one. The resolution of an element style is done by applying the rules matching the element (in order), then inheriting a part of its parents style (recursively), then completing it by the default style. 

# Widgets
The widgets are graphical elements on which a style can be applied.

The framework contains a set of predefined widgets: label, image, button, toggle, radio, check, switch, text, slider, scrollbar, progress bar.

It is also possible to create its own widgets by subclassing StyledWidget.

# Containers
The containers are graphical elements on which a style can be applied and that can contain other elements (widgets or containers). Each container defines a policy to lay out its children.

The framework contains a set of predefined layout policies: canvas, dock, grid, list, scroll, split.

It is also possible to create its own layout policies by subclassing StyledComposite.

# Animation
The animation framework provides an animator that can schedule several animations at the same framerate.

# Navigation
The navigation framework provides the capability to navigate from one page to another and going back to pages history.

The pages are composed of widgets and containers. A page is represented by a URL.

A URL resolver is responsible for creating the pages from a URL.

A pages stack manages the history of pages. It can either keep the pages in cache or create it again while going back to history.

The navigation desktop associates a URL resolver and a pages stack to navigate between the pages. It may also animate the transition between the pages.

# Color
The color utilities provide some convenient functions to manipulate the colors.

The color helper manipulates (decompose, recompose) the color components red, green, blue.

The light helper computes and modifies the level of light in a color.

# Usage
Add the following line to your `module.ivy` or your `ivy.xml`:
> `<dependency org="ej.library.ui" name="widget" rev="2.2.0"/>`
	
# Requirements
  - EDC 1.2 or later
  - BON 1.2 or later
  - MICROUI 2 or later
  - MWT 2 or later

# Dependencies
_All dependencies are retrieved transitively by Ivy resolver_.

# Source
N/A

# Restrictions
None.

MicroUI (Foundation Library API)

The MicroEJ User Interface and User eXperience API.
LIBRARY for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: Studio & SDK
Last updated:
5 July 2017
<!--
	Markdown
	Copyright 2015-2016 IS2T. All rights reserved.
	IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->

# Overview
This library contains classes and interfaces stubs of Micro User Interface API (ESR002).

# Usage
Add the following line to your `module.ivy` or your `ivy.xml`:
> `<dependency org="ej.api" name="microui" rev="2.+"/>`

# Requirements
  - EDC-1.2 or higher
  - BON-1.2 or higher

# Dependencies
None.

# Source
N/A

# Restrictions
None.
This library contains all that is necessary to create an HMI with widgets.
LIBRARY for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: Studio & SDK
Last updated:
5 July 2017
<!--
	Markdown
	Copyright 2015-2017 IS2T. All rights reserved.
	IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->

# Overview
This library contains all that is necessary to create an HMI with widgets.

# Usage
Add the following line to your `module.ivy` or your `ivy.xml`:
> `<dependency org="ej.library.ui" name="mwt" rev="2.2.0"/>`
	
# Requirements
  - EDC 1.2 or later
  - BON 1.2 or later
  - MICROUI 2 or later

# Dependencies
_All dependencies are retrieved transitively by Ivy resolver_.

# Source
N/A

# Restrictions
None.