Skip to content

Commit e803356

Browse files
author
MicroEJ GitHub Delivery
committed
Version 8.1.0
1 parent f6dbbe8 commit e803356

File tree

28 files changed

+495
-229
lines changed

28 files changed

+495
-229
lines changed

.gh.keep_binary

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
demo.gif
1+
application.gif

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [8.1.0] - 2024-07-01
9+
10+
### Added
11+
12+
- Add methods to move the `Scroll` content to the beginning or the end.
13+
14+
### Fixed
15+
16+
- Run the carousel animation only when the pointer is pressed.
17+
- Use the content bounds instead of the full bounds to split the string in `LineWrappingLabel`.
18+
- Align all the lines of the `LineWrappingLabel` using the vertical alignment.
19+
20+
### Changed
21+
22+
- Do not serialize (with `callSerially()`) the movements of the scroll anymore, but advise to call `scrollTo()` methods
23+
in the UI thread.
24+
825
## [8.0.0] - 2024-03-05
926

1027
### Added

Jenkinsfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright 2024 MicroEJ Corp. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be found with this software.
3+
4+
buildWithGradle {
5+
DOCKER_IMAGE = 'artifactory.cross:18084/microej/jdk11:1.1.2'
6+
ARTIFACTS_DOMAIN = 'public'
7+
8+
CODE_ANALYSIS_RUN_IN_FEATURE = true
9+
}

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33

44
# Overview
55

6-
This repository contains a demo illustrating the widgets and containers available in the widget library.
6+
This repository contains an application with some widget implementations as well as usage examples for these widgets and
7+
for the widgets of the Widget library.
78

8-
![Demo overview](demo.gif)
9+
![Application overview](application.gif)
910

1011
At startup, it shows a list of items.
1112
Clicking on an item opens a new page showing a widget or a set of widgets.
File renamed without changes.

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
}
1111

1212
group = "com.microej.example.ui"
13-
version = "8.0.0"
13+
version = "8.1.0"
1414

1515
microej {
1616
applicationMainClass = "com.microej.demo.widget.common.Navigation"
@@ -20,7 +20,7 @@ dependencies {
2020
implementation("ej.api:edc:1.3.5")
2121
implementation("ej.api:microui:3.1.0")
2222
implementation("ej.api:drawing:1.0.2")
23-
implementation("ej.library.ui:widget:5.1.0")
23+
implementation("ej.library.ui:widget:5.2.0")
2424
implementation("ej.library.runtime:basictool:1.5.0")
2525
implementation("ej.library.runtime:service:1.1.1")
2626
implementation("ej.library.eclasspath:collections:1.4.0")

sonar-project.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Properties
2+
#
3+
# Copyright 2024 MicroEJ Corp. All rights reserved.
4+
# Use of this source code is governed by a BSD-style license that can be found with this software.
5+
sonar.java.source=7

src/main/java/com/microej/demo/widget/autoscrolllabel/AutoscrollLabelPage.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 MicroEJ Corp. All rights reserved.
2+
* Copyright 2020-2024 MicroEJ Corp. All rights reserved.
33
* Use of this source code is governed by a BSD-style license that can be found with this software.
44
*/
55
package com.microej.demo.widget.autoscrolllabel;
@@ -26,7 +26,6 @@ public class AutoscrollLabelPage implements Page {
2626
private static final int AUTOSCROLL_LABEL = 601;
2727

2828
private static final int MARGIN = 10;
29-
private static final int HEIGHT = 30;
3029

3130
@Override
3231
public String getName() {

src/main/java/com/microej/demo/widget/autoscrolllabel/widget/AutoscrollLabel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 MicroEJ Corp. All rights reserved.
2+
* Copyright 2020-2024 MicroEJ Corp. All rights reserved.
33
* Use of this source code is governed by a BSD-style license that can be found with this software.
44
*/
55
package com.microej.demo.widget.autoscrolllabel.widget;
@@ -49,11 +49,11 @@ protected void renderContent(GraphicsContext g, int contentWidth, int contentHei
4949

5050
int textX = 0;
5151
if (this.elapsedTime > 0) {
52-
textX -= (this.elapsedTime / MOVE_RATIO);
52+
textX -= (int) (this.elapsedTime / MOVE_RATIO);
5353
}
5454
if (textX < -this.textWidth - SPACING) {
5555
// Loop: move text at the end of the content bounds.
56-
this.startTime += (this.textWidth + SPACING) * MOVE_RATIO + START_WAIT_PERIOD;
56+
this.startTime += (long) (this.textWidth + SPACING) * MOVE_RATIO + START_WAIT_PERIOD;
5757
}
5858

5959
if (textX + this.textWidth < contentWidth + SPACING) {

src/main/java/com/microej/demo/widget/barchart/widget/BarChart.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/*
2-
* Copyright 2021-2023 MicroEJ Corp. All rights reserved.
2+
* Copyright 2021-2024 MicroEJ Corp. All rights reserved.
33
* Use of this source code is governed by a BSD-style license that can be found with this software.
44
*/
55
package com.microej.demo.widget.barchart.widget;
66

77
import com.microej.demo.widget.common.DottedLinePainter;
88

9-
import ej.annotation.Nullable;
109
import ej.basictool.ArrayTools;
1110
import ej.bon.XMath;
1211
import ej.drawing.ShapePainter;
@@ -187,7 +186,6 @@ private void onPointerMoved(int pointerX) {
187186
* the index of the point to select or -1 to deselect all.
188187
*/
189188
public void selectPoint(int pointIndex) {
190-
@Nullable
191189
ChartPoint[] points = this.points;
192190
// check the index
193191
if (pointIndex > -1) {

0 commit comments

Comments
 (0)