Skip to content

MicroEJ/Example-Java-Widget

Repository files navigation

SDK 6 Badge GUI 3 Badge

Overview

This repository contains a demo illustrating the widgets and containers available in the widget library.

Demo overview

At startup, it shows a list of items. Clicking on an item opens a new page showing a widget or a set of widgets. In each of these pages, a button allows to go back to the main list.

For each page, a package exists in the source with the same name. (Example for the Label page: com.microej.demo.widget.label.) The package contains the page and some widgets if necessary.

Each page class contains 2 methods:

  • getContentWidget() that creates the page content (the hierarchy of widgets and containers),
  • populateStylesheet(CascadingStylesheet) that creates the styles for the widgets in the page.

Here are the pages:

  • Label: demonstrates the simple Label widget from the widget library.
  • AutoscrollLabel: demonstrates a label which autoscroll when the label text is longer than label length.
  • Image Widget : demonstrates how to display an image using ImageWidget from the widget library.
  • Animated image: demonstrates an AnimatedImage widget.
  • Slider with value : demonstrates a slider with displayed value.
  • Slider with progress : demonstrates a slider with progress.
  • Circular Slider : demonstrates a circular slider.
  • Double Temperature Slider : demonstrates a double slider with a dynamic gradient.
  • Button: demonstrates different styles of the simple Button widget from the widget library.
  • Checkbox: demonstrates a Checkbox widget.
  • Radio Button: demonstrates a RadioButton widget.
  • Toggle: demonstrates a Toggle widget animated when its state changes.
  • Progress Bar: demonstrates a ProgressBar widget.
  • Indeterminate Progress Bar: demonstrates an IndeterminateProgressBar widget.
  • Keyboard: demonstrates a keyboard widget.
  • Circular Indeterminate Progress: demonstrates a CircularIndeterminateProgress widget.
  • Circular Dotted Progress: demonstrates a CircularDottedProgress widget.
  • Circular Progress: demonstrates a CircularProgress widget.
  • Circular Progress With Gradient: demonstrates a CircularProgressWithGradient widget.
  • Wheel : demonstrates a Wheel widget.
  • WheelWithHighlight : demonstrates a WheelWithHighlight widget, where the selected item is highlighted with a larger font.
  • ScrollingTextOnCircle : demonstrates a ScrollingTextOnCircle widget, which draws a scrolling text on a circle.
  • Carousel: demonstrates a Carousel widget.
  • List: demonstrates the List container from the widget library.
  • Grid: demonstrates the Grid container from the widget library.
  • Fixed Grid: demonstrates the FixedGrid container from the widget library.
  • Flex: demonstrates the Flex container from the widget library.
  • Dock: demonstrates the Dock container from the widget library.
  • Split: demonstrates a Split container.
  • Scrollable List: demonstrates a ScrollableList container.
  • Scrollable Text: demonstrates displaying a long, scrollable text.
  • Snap Scroll: demonstrates a scroll that snaps on its children.
  • Secret Scroll: demonstrates a container with an hidden child that can be shown by scrolling.
  • Buffered Scroll: demonstrates a scroll that uses the display buffer to scroll faster.
  • Alphabet Scroll: demonstrates a scroll that can be navigated using an index.
  • Selectable List: demonstrates a list of items that are selectable with an animation.
  • Line Chart: demonstrates a LineChart widget.
  • Bar Chart: demonstrates a BarChart widget.

Requirements

  • MICROEJ SDK 6.

  • A VEE Port that contains:

    • EDC-1.3 or higher.
    • BON-1.4 or higher.
    • MICROUI-3.4 or higher.
    • DRAWING-1.0 or higher.

This example has been tested on:

  • IntelliJ IDEA 2023.3.3.
  • STM32F7508-DK VEE Port 2.2.0.

Usage

By default, the sample will use the STM32F7508-DK VEE Port.

Refer to the Select a VEE Port documentation for more information.

Configuration

Configuration options can be found in: configuration/common.properties.

  • Make sure the configuration option ej.microui.memory.imagesheap.size is set to 24000 and ej.microui.memory.imagesheap.size is set to 42000.

Run on simulator

In IntelliJ IDEA or Android Studio:

  • Open the Gradle tool window by clicking on the elephant icon on the right side,
  • Expand the Tasks list,
  • From the Tasks list, expand the microej list,
  • Double-click on runOnSimulator,
  • The application starts, the traces are visible in the Run view.

Alternative ways to run in simulation are described in the Run on Simulator documentation.

Run on device

Make sure to properly setup the VEE Port environment before going further. Refer to the VEE Port README for more information.

In IntelliJ IDEA or Android Studio:

  • Open the Gradle tool window by clicking on the elephant on the right side,
  • Expand the Tasks list,
  • From the Tasks list, expand the microej list,
  • Double-Click on runOnDevice.
  • The device is flashed. Use the appropriate tool to retrieve the execution traces.

Alternative ways to run on device are described in the Run on Device documentation.

Dependencies

All dependencies are retrieved transitively by gradle.

Source

N/A

Restrictions

None.


Copyright 2020-2024 MicroEJ Corp. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found with this software.

About

This repository contains examples illustrating the widgets and containers available in the widget library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages