[FIX] arbo
This commit is contained in:
parent
f4224792c0
commit
6c4ac572b6
50
pom.xml
50
pom.xml
@ -1,14 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.atriasoft</groupId>
|
||||
<artifactId>ewol</artifactId>
|
||||
<version>0.1.0</version>
|
||||
<properties>
|
||||
<maven.compiler.version>3.13.0</maven.compiler.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<maven.dependency.version>3.1.1</maven.dependency.version>
|
||||
</properties>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Mozilla Public License 2.0</name>
|
||||
<url>https://opensource.org/licenses/MPL-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>dev1</id>
|
||||
<name>Edouard DUPIN</name>
|
||||
<email>edouard.dupin@proton.me</email>
|
||||
<roles>
|
||||
<role>Lead Developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
@ -66,7 +78,7 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.11.0-M2</version>
|
||||
<version>5.11.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -78,29 +90,33 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<testSourceDirectory>test/src</testSourceDirectory>
|
||||
|
||||
<testSourceDirectory>src/test</testSourceDirectory>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<directory>${basedir}/src/testResources</directory>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.compiler.version}</version>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
|
||||
<source>21</source>
|
||||
<target>21</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Create the source bundle -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
@ -114,7 +130,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
<version>3.2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
@ -133,7 +149,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<show>private</show>
|
||||
<nohelp>true</nohelp>
|
||||
@ -147,7 +163,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<show>public</show>
|
||||
</configuration>
|
||||
|
@ -3,27 +3,38 @@
|
||||
<groupId>org.atriasoft</groupId>
|
||||
<artifactId>ewol-sample</artifactId>
|
||||
<version>0.1.0</version>
|
||||
<properties>
|
||||
<maven.compiler.version>3.13.0</maven.compiler.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<maven.dependency.version>3.1.1</maven.dependency.version>
|
||||
</properties>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Mozilla Public License 2.0</name>
|
||||
<url>https://opensource.org/licenses/MPL-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>dev1</id>
|
||||
<name>Edouard DUPIN</name>
|
||||
<email>edouard.dupin@proton.me</email>
|
||||
<roles>
|
||||
<role>Lead Developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
@ -33,37 +44,46 @@
|
||||
<artifactId>ewol</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
<!-- generic logger of SLF4J to console (in color) -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>2.1.0-alpha1</version>
|
||||
<scope>test</scope>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.5.18</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>janino</artifactId>
|
||||
<version>3.1.12</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
|
||||
<directory>${basedir}/src/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.compiler.version}</version>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
|
||||
<source>21</source>
|
||||
<target>21</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Create the source bundle -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<version>4.0.0-beta-1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
@ -79,7 +99,7 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
@ -91,7 +111,7 @@
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugin>
|
||||
<!-- Java-doc generation for stand-alone site -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -1,6 +0,0 @@
|
||||
module sample.atriasoft.ewol {
|
||||
//exports sample.atriasoft.ewol.simpleWindowsWithImage;
|
||||
requires org.atriasoft.ewol;
|
||||
requires org.atriasoft.etk;
|
||||
requires org.atriasoft.esignal;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,82 +0,0 @@
|
||||
package sample.atriasoft.ewol.ComplexWindiows1;
|
||||
|
||||
import org.atriasoft.etk.Configs;
|
||||
import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.ewol.context.EwolApplication;
|
||||
import org.atriasoft.ewol.context.EwolContext;
|
||||
|
||||
import sample.atriasoft.ewol.Log;
|
||||
|
||||
public class Appl implements EwolApplication {
|
||||
|
||||
//! [ewol_sample_HW_main_application]
|
||||
private void localCreate(final EwolContext context) {
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
// parse all the argument of the application
|
||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||
String tmpppp = context.getCmd().get(iii);
|
||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||
LOGGER.print(" -h/--help display this help");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
// TODO : Remove this: Move if in the windows properties
|
||||
context.setSize(new Vector2f(800, 600));
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
// select font preference of der with a basic application size
|
||||
Configs.getConfigFonts().set("FreeSherif", 12);
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
// Create the windows
|
||||
MainWindows basicWindows = new MainWindows();
|
||||
// configure the ewol context to use the new windows
|
||||
context.setWindows(basicWindows);
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(final EwolContext context) {
|
||||
LOGGER.info("Application onCreate: [BEGIN]");
|
||||
localCreate(context);
|
||||
LOGGER.info("Application onCreate: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(final EwolContext context) {
|
||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onDestroy: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(final EwolContext context) {
|
||||
LOGGER.info("Application onPause: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onPause: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(final EwolContext context) {
|
||||
LOGGER.info("Application onResume: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onResume: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(final EwolContext context) {
|
||||
LOGGER.info("Application onStart: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStart: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop(final EwolContext context) {
|
||||
LOGGER.info("Application onStop: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStop: [ END ]");
|
||||
}
|
||||
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package sample.atriasoft.ewol.ComplexWindiows1;
|
||||
|
||||
import org.atriasoft.etk.Uri;
|
||||
import org.atriasoft.ewol.Ewol;
|
||||
|
||||
public class ComplexeWindows1Main {
|
||||
public static void main(final String[] args) {
|
||||
Ewol.init();
|
||||
//Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/");
|
||||
Uri.setApplication(ComplexeWindows1Main.class);
|
||||
Ewol.run(new Appl(), args);
|
||||
}
|
||||
|
||||
private ComplexeWindows1Main() {}
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
package sample.atriasoft.ewol.ComplexWindiows1;
|
||||
|
||||
import org.atriasoft.etk.Color;
|
||||
import org.atriasoft.etk.Dimension3f;
|
||||
import org.atriasoft.etk.Distance;
|
||||
import org.atriasoft.etk.math.Vector3b;
|
||||
import org.atriasoft.etk.math.Vector3f;
|
||||
import org.atriasoft.ewol.widget.Sizer;
|
||||
import org.atriasoft.ewol.widget.Sizer.DisplayMode;
|
||||
import org.atriasoft.ewol.widget.Spacer;
|
||||
import org.atriasoft.ewol.widget.Windows;
|
||||
|
||||
public class MainWindows extends Windows {
|
||||
|
||||
public MainWindows() {
|
||||
//! [ewol_sample_HW_windows_title]
|
||||
setPropertyTitle("Simple sample test");
|
||||
//EwolObject.getContext().getFontDefault().setName("FreeSans");
|
||||
Sizer sizerMain = new Sizer(DisplayMode.VERTICAL);
|
||||
sizerMain.setPropertyExpand(Vector3b.TRUE);
|
||||
sizerMain.setPropertyFill(Vector3b.TRUE);
|
||||
setSubWidget(sizerMain);
|
||||
|
||||
Sizer sizerHori1 = new Sizer(DisplayMode.HORIZONTAL);
|
||||
sizerHori1.setPropertyExpand(Vector3b.TRUE);
|
||||
sizerHori1.setPropertyFill(Vector3b.TRUE);
|
||||
sizerMain.subWidgetAdd(sizerHori1);
|
||||
|
||||
Sizer sizerHori2 = new Sizer(DisplayMode.HORIZONTAL);
|
||||
sizerHori2.setPropertyExpand(Vector3b.TRUE);
|
||||
sizerHori2.setPropertyFill(Vector3b.TRUE);
|
||||
sizerMain.subWidgetAdd(sizerHori2);
|
||||
|
||||
{
|
||||
Spacer simpleSpacer = new Spacer();
|
||||
simpleSpacer.setPropertyMinSize(new Dimension3f(new Vector3f(100, 100, 100), Distance.PIXEL));
|
||||
simpleSpacer.setPropertyColor(Color.ALICE_BLUE);
|
||||
simpleSpacer.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleSpacer.setPropertyFill(Vector3b.TRUE);
|
||||
sizerHori1.subWidgetAdd(simpleSpacer);
|
||||
}
|
||||
{
|
||||
Spacer simpleSpacer = new Spacer();
|
||||
simpleSpacer.setPropertyColor(Color.DARK_GREEN);
|
||||
simpleSpacer.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleSpacer.setPropertyFill(Vector3b.TRUE);
|
||||
sizerHori1.subWidgetAdd(simpleSpacer);
|
||||
}
|
||||
{
|
||||
Spacer simpleSpacer = new Spacer();
|
||||
simpleSpacer.setPropertyColor(Color.CHOCOLATE);
|
||||
simpleSpacer.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleSpacer.setPropertyFill(Vector3b.TRUE);
|
||||
sizerHori1.subWidgetAdd(simpleSpacer);
|
||||
}
|
||||
{
|
||||
Spacer simpleSpacer = new Spacer();
|
||||
simpleSpacer.setPropertyColor(Color.GREEN_YELLOW);
|
||||
simpleSpacer.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleSpacer.setPropertyFill(Vector3b.TRUE);
|
||||
sizerHori2.subWidgetAdd(simpleSpacer);
|
||||
}
|
||||
{
|
||||
Spacer simpleSpacer = new Spacer();
|
||||
simpleSpacer.setPropertyColor(Color.PINK);
|
||||
simpleSpacer.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleSpacer.setPropertyFill(Vector3b.TRUE);
|
||||
sizerHori2.subWidgetAdd(simpleSpacer);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsLabel;
|
||||
|
||||
import org.atriasoft.etk.Configs;
|
||||
import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.ewol.context.EwolApplication;
|
||||
import org.atriasoft.ewol.context.EwolContext;
|
||||
|
||||
import sample.atriasoft.ewol.Log;
|
||||
|
||||
public class Appl implements EwolApplication {
|
||||
|
||||
//! [ewol_sample_HW_main_application]
|
||||
private void localCreate(final EwolContext context) {
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
// parse all the argument of the application
|
||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||
String tmpppp = context.getCmd().get(iii);
|
||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||
LOGGER.print(" -h/--help display this help");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
// TODO : Remove this: Move if in the windows properties
|
||||
context.setSize(new Vector2f(800, 600));
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
// select font preference of der with a basic application size
|
||||
Configs.getConfigFonts().set("FreeSherif", 12);
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
// Create the windows
|
||||
MainWindows basicWindows = new MainWindows();
|
||||
// configure the ewol context to use the new windows
|
||||
context.setWindows(basicWindows);
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(final EwolContext context) {
|
||||
LOGGER.info("Application onCreate: [BEGIN]");
|
||||
localCreate(context);
|
||||
LOGGER.info("Application onCreate: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(final EwolContext context) {
|
||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onDestroy: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(final EwolContext context) {
|
||||
LOGGER.info("Application onPause: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onPause: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(final EwolContext context) {
|
||||
LOGGER.info("Application onResume: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onResume: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(final EwolContext context) {
|
||||
LOGGER.info("Application onStart: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStart: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop(final EwolContext context) {
|
||||
LOGGER.info("Application onStop: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStop: [ END ]");
|
||||
}
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsLabel;
|
||||
|
||||
import org.atriasoft.etk.math.Vector3b;
|
||||
import org.atriasoft.ewol.widget.Label;
|
||||
import org.atriasoft.ewol.widget.Spacer;
|
||||
|
||||
import sample.atriasoft.ewol.BasicWindows;
|
||||
|
||||
public class MainWindows extends BasicWindows {
|
||||
|
||||
public MainWindows() {
|
||||
//! [ewol_sample_HW_windows_title]
|
||||
setPropertyTitle("Simple sample test");
|
||||
//EwolObject.getContext().getFontDefault().setName("FreeSans");
|
||||
//! [ewol_sample_HW_windows_label]
|
||||
if (true) {
|
||||
//! [ewol_sample_HW_windows_title]
|
||||
final Label simpleLabel = new Label();
|
||||
simpleLabel.setPropertyValue("He<b>llo.</b> <font color='blue'>World</font><br/><br/> - How are You ???<br/> - Not so Well, I break my leg.<br/><br/><center>The end</center>");
|
||||
simpleLabel.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleLabel.setPropertyFill(Vector3b.TRUE);
|
||||
this.setTestWidget(simpleLabel);
|
||||
//! [ewol_sample_HW_windows_label]
|
||||
} else {
|
||||
final Spacer simpleSpacer = new Spacer();
|
||||
simpleSpacer.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleSpacer.setPropertyFill(Vector3b.TRUE);
|
||||
this.setTestWidget(simpleSpacer);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsLabel;
|
||||
|
||||
import org.atriasoft.etk.Uri;
|
||||
import org.atriasoft.ewol.Ewol;
|
||||
|
||||
public class SimpleWindowsLabelMain {
|
||||
public static void main(final String[] args) {
|
||||
Ewol.init();
|
||||
//Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/");
|
||||
Uri.setApplication(SimpleWindowsLabelMain.class);
|
||||
Ewol.run(new Appl(), args);
|
||||
}
|
||||
|
||||
private SimpleWindowsLabelMain() {}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsWithCheckBox;
|
||||
|
||||
import org.atriasoft.etk.Configs;
|
||||
import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.ewol.context.EwolApplication;
|
||||
import org.atriasoft.ewol.context.EwolContext;
|
||||
|
||||
import sample.atriasoft.ewol.Log;
|
||||
|
||||
public class Appl implements EwolApplication {
|
||||
|
||||
//! [ewol_sample_HW_main_application]
|
||||
private void localCreate(final EwolContext context) {
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
// parse all the argument of the application
|
||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||
String tmpppp = context.getCmd().get(iii);
|
||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||
LOGGER.print(" -h/--help display this help");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
// TODO : Remove this: Move if in the windows properties
|
||||
context.setSize(new Vector2f(800, 600));
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
// select font preference of der with a basic application size
|
||||
Configs.getConfigFonts().set("FreeSherif", 12);
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
// Create the windows
|
||||
MainWindows basicWindows = new MainWindows();
|
||||
// configure the ewol context to use the new windows
|
||||
context.setWindows(basicWindows);
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(final EwolContext context) {
|
||||
LOGGER.info("Application onCreate: [BEGIN]");
|
||||
localCreate(context);
|
||||
LOGGER.info("Application onCreate: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(final EwolContext context) {
|
||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onDestroy: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(final EwolContext context) {
|
||||
LOGGER.info("Application onPause: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onPause: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(final EwolContext context) {
|
||||
LOGGER.info("Application onResume: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onResume: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(final EwolContext context) {
|
||||
LOGGER.info("Application onStart: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStart: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop(final EwolContext context) {
|
||||
LOGGER.info("Application onStop: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStop: [ END ]");
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsWithCheckBox;
|
||||
|
||||
import org.atriasoft.etk.math.Vector3b;
|
||||
import org.atriasoft.ewol.widget.CheckBox;
|
||||
|
||||
import sample.atriasoft.ewol.BasicWindows;
|
||||
|
||||
public class MainWindows extends BasicWindows {
|
||||
|
||||
CheckBox testWidget;
|
||||
|
||||
public MainWindows() {
|
||||
//! [ewol_sample_HW_windows_title]
|
||||
setPropertyTitle("Simple CheckBox");
|
||||
|
||||
this.testWidget = new CheckBox("<b>Hello, how Are</b> You?<br/>second-life?");
|
||||
//this.testWidget.setPropertySource(new Uri("DATA", "mireA.png"));
|
||||
this.testWidget.setPropertyExpand(Vector3b.TRUE);
|
||||
this.testWidget.setPropertyFill(Vector3b.TRUE);
|
||||
this.setTestWidget(this.testWidget);
|
||||
/*
|
||||
Button simpleButton = new Button();
|
||||
simpleButton.setPropertyValue("Top Button");
|
||||
simpleButton.setPropertyExpand(Vector3b.TRUE);
|
||||
simpleButton.setPropertyFill(Vector3b.TRUE);
|
||||
this.setTestWidget(simpleButton);
|
||||
*/
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsWithCheckBox;
|
||||
|
||||
import org.atriasoft.etk.Uri;
|
||||
import org.atriasoft.ewol.Ewol;
|
||||
|
||||
public class SimpleWindowsWithCheckBoxMain {
|
||||
public static void main(final String[] args) {
|
||||
Ewol.init();
|
||||
//Uri.addLibrary("test-data", SimpleWindowsWithImageMain.class, "test-ewol/");
|
||||
Uri.setApplication(SimpleWindowsWithCheckBoxMain.class, "test-ewol/");
|
||||
Ewol.run(new Appl(), args);
|
||||
}
|
||||
|
||||
private SimpleWindowsWithCheckBoxMain() {}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsWithImage;
|
||||
|
||||
import org.atriasoft.etk.Configs;
|
||||
import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.ewol.context.EwolApplication;
|
||||
import org.atriasoft.ewol.context.EwolContext;
|
||||
|
||||
import sample.atriasoft.ewol.Log;
|
||||
|
||||
public class Appl implements EwolApplication {
|
||||
|
||||
//! [ewol_sample_HW_main_application]
|
||||
private void localCreate(final EwolContext context) {
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
// parse all the argument of the application
|
||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||
String tmpppp = context.getCmd().get(iii);
|
||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||
LOGGER.print(" -h/--help display this help");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
// TODO : Remove this: Move if in the windows properties
|
||||
context.setSize(new Vector2f(800, 600));
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
// select font preference of der with a basic application size
|
||||
Configs.getConfigFonts().set("FreeSherif", 12);
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
// Create the windows
|
||||
MainWindows basicWindows = new MainWindows();
|
||||
// configure the ewol context to use the new windows
|
||||
context.setWindows(basicWindows);
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(final EwolContext context) {
|
||||
LOGGER.info("Application onCreate: [BEGIN]");
|
||||
localCreate(context);
|
||||
LOGGER.info("Application onCreate: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(final EwolContext context) {
|
||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onDestroy: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(final EwolContext context) {
|
||||
LOGGER.info("Application onPause: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onPause: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(final EwolContext context) {
|
||||
LOGGER.info("Application onResume: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onResume: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(final EwolContext context) {
|
||||
LOGGER.info("Application onStart: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStart: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop(final EwolContext context) {
|
||||
LOGGER.info("Application onStop: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStop: [ END ]");
|
||||
}
|
||||
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsWithImage;
|
||||
|
||||
import org.atriasoft.etk.Dimension3f;
|
||||
import org.atriasoft.etk.Distance;
|
||||
import org.atriasoft.etk.Uri;
|
||||
import org.atriasoft.etk.math.Vector3b;
|
||||
import org.atriasoft.etk.math.Vector3f;
|
||||
import org.atriasoft.ewol.widget.Button;
|
||||
import org.atriasoft.ewol.widget.ImageDisplay;
|
||||
|
||||
import sample.atriasoft.ewol.BasicWindows;
|
||||
|
||||
public class MainWindows extends BasicWindows {
|
||||
|
||||
public static void eventButtonChangeImage(final MainWindows self, final Boolean value) {
|
||||
if (value) {
|
||||
self.testWidget.setPropertySource(new Uri("DATA", "mireC.png"));
|
||||
} else {
|
||||
self.testWidget.setPropertySource(new Uri("DATA", "mireA.png"));
|
||||
}
|
||||
}
|
||||
|
||||
public static void eventButtonChangeKeepRatio(final MainWindows self) {
|
||||
final boolean state = self.testWidget.isPropertyKeepRatio();
|
||||
self.testWidget.setPropertyKeepRatio(!state);
|
||||
//self.buttonAspectRatio.setPropertyValue(state ? "fkeep aspect ratio" : "un-keep aspect ratio");
|
||||
}
|
||||
|
||||
ImageDisplay testWidget;
|
||||
Button buttonAspectRatio;
|
||||
|
||||
public MainWindows() {
|
||||
//! [ewol_sample_HW_windows_title]
|
||||
setPropertyTitle("Simple Image");
|
||||
|
||||
this.testWidget = new ImageDisplay();
|
||||
this.testWidget.setPropertySource(new Uri("DATA", "mireA.png"));
|
||||
this.testWidget.setPropertyExpand(Vector3b.TRUE);
|
||||
this.testWidget.setPropertyFill(Vector3b.TRUE);
|
||||
this.testWidget.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL));
|
||||
this.setTestWidget(this.testWidget);
|
||||
{
|
||||
final Button button = Button.createToggleLabelButton("mireA.png", "mireC.png");
|
||||
button.setPropertyExpand(Vector3b.FALSE);
|
||||
button.setPropertyFill(Vector3b.FALSE);
|
||||
button.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL));
|
||||
this.addButton(button);
|
||||
button.signalValue.connectAuto(this, MainWindows::eventButtonChangeImage);
|
||||
}
|
||||
this.buttonAspectRatio = Button.createLabelButton("keep aspect ratio");
|
||||
this.buttonAspectRatio.setPropertyExpand(Vector3b.FALSE);
|
||||
this.buttonAspectRatio.setPropertyFill(Vector3b.FALSE);
|
||||
this.buttonAspectRatio.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL));
|
||||
this.addButton(this.buttonAspectRatio);
|
||||
this.buttonAspectRatio.signalClick.connectAuto(this, MainWindows::eventButtonChangeKeepRatio);
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsWithImage;
|
||||
|
||||
import org.atriasoft.etk.Uri;
|
||||
import org.atriasoft.ewol.Ewol;
|
||||
|
||||
public class SimpleWindowsWithImageMain {
|
||||
public static void main(final String[] args) {
|
||||
Ewol.init();
|
||||
//Uri.addLibrary("test-data", SimpleWindowsWithImageMain.class, "test-ewol/");
|
||||
Uri.setApplication(SimpleWindowsWithImageMain.class, "test-ewol/");
|
||||
Ewol.run(new Appl(), args);
|
||||
}
|
||||
|
||||
private SimpleWindowsWithImageMain() {}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
package sample.atriasoft.ewol.validationWidget;
|
||||
|
||||
import org.atriasoft.etk.Configs;
|
||||
import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.ewol.context.EwolApplication;
|
||||
import org.atriasoft.ewol.context.EwolContext;
|
||||
|
||||
import sample.atriasoft.ewol.Log;
|
||||
|
||||
public class Appl implements EwolApplication {
|
||||
|
||||
//! [ewol_sample_HW_main_application]
|
||||
private void localCreate(final EwolContext context) {
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
// parse all the argument of the application
|
||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||
final String tmpppp = context.getCmd().get(iii);
|
||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||
LOGGER.print(" -h/--help display this help");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
//! [ewol_sample_HW_main_parse_arguments]
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
// TODO : Remove this: Move if in the windows properties
|
||||
context.setSize(new Vector2f(800, 600));
|
||||
//! [ewol_sample_HW_main_set_windows_size]
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
// select font preference of der with a basic application size
|
||||
Configs.getConfigFonts().set("FreeSherif", 12);
|
||||
//! [ewol_sample_HW_main_set_font_property]
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
// Create the windows
|
||||
final MainWindows basicWindows = new MainWindows();
|
||||
// configure the ewol context to use the new windows
|
||||
context.setWindows(basicWindows);
|
||||
//! [ewol_sample_HW_main_set_windows]
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(final EwolContext context) {
|
||||
LOGGER.info("Application onCreate: [BEGIN]");
|
||||
localCreate(context);
|
||||
LOGGER.info("Application onCreate: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(final EwolContext context) {
|
||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onDestroy: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(final EwolContext context) {
|
||||
LOGGER.info("Application onPause: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onPause: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(final EwolContext context) {
|
||||
LOGGER.info("Application onResume: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onResume: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(final EwolContext context) {
|
||||
LOGGER.info("Application onStart: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStart: [ END ]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop(final EwolContext context) {
|
||||
LOGGER.info("Application onStop: [BEGIN]");
|
||||
|
||||
LOGGER.info("Application onStop: [ END ]");
|
||||
}
|
||||
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
package sample.atriasoft.ewol.validationWidget;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.atriasoft.ewol.widget.Composer;
|
||||
import org.atriasoft.ewol.widget.Widget;
|
||||
|
||||
import sample.atriasoft.ewol.BasicWindows;
|
||||
|
||||
public class MainWindows extends BasicWindows {
|
||||
|
||||
private int index = -1;
|
||||
private final List<String> values = new ArrayList<>();
|
||||
private final List<String> titles = new ArrayList<>();
|
||||
|
||||
public MainWindows() {
|
||||
setPropertyTitle("Test all compositing");
|
||||
|
||||
this.titles.add("test Slider");
|
||||
this.values.add("""
|
||||
<Slider name='My name is Bob' fill='true,false,false' expand='true'/>
|
||||
""");
|
||||
this.titles.add("test Entry");
|
||||
this.values.add("""
|
||||
<Entry name='My name is Bob' fill='true,false,false' expand='true'/>
|
||||
""");
|
||||
|
||||
this.titles.add("test button");
|
||||
this.values.add("""
|
||||
<Button name='My name button' fill='true,false,false' expand='true'>
|
||||
<Label>hello, how are you</Label>
|
||||
</Button>
|
||||
""");
|
||||
|
||||
this.titles.add("test button toogle");
|
||||
this.values.add("""
|
||||
<Button name='My name is Bob' toggle='true' fill='true,false,false' expand='true'>
|
||||
<Label>hello, how are you</Label>
|
||||
<Label>You <br/>Click - Me <b>!?<!--kjlkjlkjlkj-->d</b></Label>
|
||||
</Button>
|
||||
""");
|
||||
this.titles.add("test checkBox");
|
||||
this.values.add("""
|
||||
<CheckBox
|
||||
name='My name button'
|
||||
fill='true,false,false'
|
||||
expand='true'
|
||||
label='<b>Hello, how Are</b> You?<br/>second-life?'>
|
||||
</CheckBox>
|
||||
""");
|
||||
// set first item
|
||||
requestNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestNext() {
|
||||
System.out.print("Request change !!!!");
|
||||
this.index++;
|
||||
setPropertyTitle(this.titles.get(this.index));
|
||||
|
||||
final String dataString = this.values.get(this.index);
|
||||
final Widget data = Composer.composerGenerateString(dataString);
|
||||
this.setTestWidget(data);
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package sample.atriasoft.ewol.validationWidget;
|
||||
|
||||
import org.atriasoft.etk.Uri;
|
||||
import org.atriasoft.ewol.Ewol;
|
||||
|
||||
public class ValidatorMain {
|
||||
public static void main(final String[] args) {
|
||||
Ewol.init();
|
||||
//Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/");
|
||||
Uri.setApplication(MainWindows.class);
|
||||
Ewol.run(new Appl(), args);
|
||||
}
|
||||
|
||||
private ValidatorMain() {}
|
||||
}
|
@ -30,7 +30,7 @@ public class LabelOnSVG extends Widget {
|
||||
protected int colorDefaultFgText = -1; //!< Default color of the text
|
||||
protected ResourceColorFile colorProperty; //!< theme color property
|
||||
protected boolean propertyAutoTranslate = true; //!< if at true the data is translate automaticaly translate.
|
||||
|
||||
|
||||
protected int propertyFontSize = 0; //!< default size of the font.
|
||||
protected String propertyValue = ""; //!< decorated text to display.
|
||||
@AknotSignal
|
||||
@ -39,7 +39,7 @@ public class LabelOnSVG extends Widget {
|
||||
public SignalEmpty signalPressed = new SignalEmpty();
|
||||
protected CompositingText text = new CompositingText(); //!< Compositing text element.
|
||||
protected String value = "";
|
||||
|
||||
|
||||
public LabelOnSVG() {
|
||||
this.colorProperty = ResourceColorFile.create(new Uri("THEME", "/color/Label.json", "ewol"));
|
||||
if (this.colorProperty != null) {
|
||||
@ -49,7 +49,7 @@ public class LabelOnSVG extends Widget {
|
||||
setMouseLimit(1);
|
||||
setPropertyCanFocus(false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param newLabel The displayed decorated text.
|
||||
@ -64,7 +64,7 @@ public class LabelOnSVG extends Widget {
|
||||
setPropertyCanFocus(false);
|
||||
setPropertyValue(newLabel);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void calculateMinMaxSize() {
|
||||
final Vector3f tmpMax = this.propertyMaxSize.getPixel();
|
||||
@ -76,30 +76,30 @@ public class LabelOnSVG extends Widget {
|
||||
}
|
||||
final Vector3f minSize = this.text.calculateSizeDecorated(this.value);
|
||||
LOGGER.debug("[" + getId() + "] {" + getClass().getCanonicalName() + "} minSize : " + minSize);
|
||||
|
||||
|
||||
this.minSize = new Vector3f(FMath.avg(tmpMin.x(), 4 + minSize.x(), tmpMax.x()),
|
||||
FMath.avg(tmpMin.y(), 4 + minSize.y(), tmpMax.y()), FMath.avg(tmpMin.z(), 4 + minSize.z(), tmpMax.z()));
|
||||
LOGGER.trace("[" + getId() + "] {" + getClass().getCanonicalName() + "} Result min size : " + tmpMin + " < "
|
||||
+ this.minSize + " < " + tmpMax);
|
||||
}
|
||||
|
||||
|
||||
public int getPropertyFontSize() {
|
||||
return this.propertyFontSize;
|
||||
}
|
||||
|
||||
|
||||
public String getPropertyValue() {
|
||||
return this.propertyValue;
|
||||
}
|
||||
|
||||
|
||||
public boolean isPropertyAutoTranslate() {
|
||||
return this.propertyAutoTranslate;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDraw() {
|
||||
this.text.draw();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onEventInput(final EventInput event) {
|
||||
//LOGGER.debug("Event on Label ...");
|
||||
@ -112,7 +112,7 @@ public class LabelOnSVG extends Widget {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onRegenerateDisplay() {
|
||||
if (!needRedraw()) {
|
||||
@ -120,24 +120,24 @@ public class LabelOnSVG extends Widget {
|
||||
}
|
||||
this.text.clear();
|
||||
final int paddingSize = 2;
|
||||
|
||||
|
||||
final Vector3f tmpMax = this.propertyMaxSize.getPixel();
|
||||
// to know the size of one line :
|
||||
final Vector3f minSize = this.text.calculateSize('A');
|
||||
|
||||
|
||||
//minSize.setX(etk::max(minSize.x(), this.minSize.x()));
|
||||
//minSize.setY(etk::max(minSize.y(), this.minSize.y()));
|
||||
if (tmpMax.x() <= 999999) {
|
||||
this.text.setTextAlignment(0, tmpMax.x() - 2 * paddingSize, AlignMode.LEFT);
|
||||
}
|
||||
final Vector3f currentTextSize = this.text.calculateSizeDecorated(this.value);
|
||||
|
||||
|
||||
Vector2i localSize = new Vector2i((int) this.minSize.x(), (int) this.minSize.y());
|
||||
|
||||
|
||||
// no change for the text origin :
|
||||
Vector3f tmpTextOrigin = new Vector3f((this.size.x() - this.minSize.x()) / 2.0f,
|
||||
(this.size.y() - this.minSize.y()) / 2.0f, 0);
|
||||
|
||||
|
||||
if (this.propertyFill.x()) {
|
||||
localSize = localSize.withX((int) this.size.x());
|
||||
tmpTextOrigin = tmpTextOrigin.withX(0);
|
||||
@ -148,14 +148,14 @@ public class LabelOnSVG extends Widget {
|
||||
}
|
||||
tmpTextOrigin = tmpTextOrigin.add(paddingSize, paddingSize, 0);
|
||||
localSize = localSize.less(2 * paddingSize, 2 * paddingSize);
|
||||
|
||||
|
||||
tmpTextOrigin = tmpTextOrigin.withY(tmpTextOrigin.y() + (this.minSize.y() - 2 * paddingSize) - minSize.y());
|
||||
|
||||
|
||||
final Vector3f textPos = new Vector3f(tmpTextOrigin.x(), tmpTextOrigin.y(), 0);
|
||||
|
||||
|
||||
final Vector3f drawClippingPos = new Vector3f(paddingSize, paddingSize, -0.5f);
|
||||
final Vector3f drawClippingSize = new Vector3f((this.size.x() - paddingSize), (this.size.y() - paddingSize), 1);
|
||||
|
||||
|
||||
// clean the element
|
||||
this.text.reset();
|
||||
if (this.propertyFontSize != 0) {
|
||||
@ -170,10 +170,10 @@ public class LabelOnSVG extends Widget {
|
||||
this.text.setTextAlignment(tmpTextOrigin.x(), tmpTextOrigin.x() + localSize.x(), AlignMode.LEFT);
|
||||
this.text.setClipping(drawClippingPos, drawClippingSize);
|
||||
this.text.printDecorated(this.value);
|
||||
|
||||
|
||||
this.text.flush();
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName("auto-translate")
|
||||
@ -191,7 +191,7 @@ public class LabelOnSVG extends Widget {
|
||||
markToRedraw();
|
||||
requestUpdateSize();
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName("font-size")
|
||||
@ -204,7 +204,7 @@ public class LabelOnSVG extends Widget {
|
||||
markToRedraw();
|
||||
requestUpdateSize();
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName("value")
|
||||
@ -222,5 +222,5 @@ public class LabelOnSVG extends Widget {
|
||||
requestUpdateSize();
|
||||
this.propertyValue = propertyValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -37,7 +37,7 @@ public class Spin extends SpinBase {
|
||||
protected Connection connectionEntry = new Connection();
|
||||
protected Connection connectionButtonUp = new Connection();
|
||||
protected Connection connectionButtonDown = new Connection();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param _mode mode to display the spin
|
||||
@ -47,14 +47,14 @@ public class Spin extends SpinBase {
|
||||
super(new Uri("THEME", "shape/Spin.json", "ewol"));
|
||||
connectGui();
|
||||
}
|
||||
|
||||
|
||||
public void checkValue(long value) {
|
||||
value = FMath.clamp(this.propertyMin, value, this.propertyMax);
|
||||
this.propertyValue = value;
|
||||
this.widgetEntry.setPropertyValue(Long.toString(value));
|
||||
this.signalValue.emit(this.propertyValue);
|
||||
}
|
||||
|
||||
|
||||
public void connectGui() {
|
||||
LOGGER.warn("updateGui [START]");
|
||||
super.updateGui();
|
||||
@ -70,7 +70,7 @@ public class Spin extends SpinBase {
|
||||
checkValue(this.propertyValue);
|
||||
LOGGER.warn("updateGui [STOP]");
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName("increment")
|
||||
@ -78,7 +78,7 @@ public class Spin extends SpinBase {
|
||||
public long getPropertyIncrement() {
|
||||
return this.propertyIncrement;
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName("mantis")
|
||||
@ -86,7 +86,7 @@ public class Spin extends SpinBase {
|
||||
public int getPropertyMantis() {
|
||||
return this.propertyMantis;
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName(value = "max")
|
||||
@ -94,7 +94,7 @@ public class Spin extends SpinBase {
|
||||
public long getPropertyMax() {
|
||||
return this.propertyMax;
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName("min")
|
||||
@ -102,7 +102,7 @@ public class Spin extends SpinBase {
|
||||
public long getPropertyMin() {
|
||||
return this.propertyMin;
|
||||
}
|
||||
|
||||
|
||||
@AknotManaged
|
||||
@AknotAttribute
|
||||
@AknotName("value")
|
||||
@ -110,7 +110,7 @@ public class Spin extends SpinBase {
|
||||
public long getPropertyValue() {
|
||||
return this.propertyValue;
|
||||
}
|
||||
|
||||
|
||||
protected void onCallbackDown(final Boolean value) {
|
||||
if (value) {
|
||||
return;
|
||||
@ -118,15 +118,19 @@ public class Spin extends SpinBase {
|
||||
final long data = this.propertyValue - this.propertyIncrement;
|
||||
checkValue(data);
|
||||
}
|
||||
|
||||
|
||||
protected void onCallbackModify(final String value) {
|
||||
if (value.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
final long value1 = Long.valueOf(value);
|
||||
checkValue(value1);
|
||||
try {
|
||||
final long value1 = Long.valueOf(value);
|
||||
checkValue(value1);
|
||||
} catch (final NumberFormatException ex) {
|
||||
LOGGER.error("This is not a value {} ==> {}", value, ex.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void onCallbackUp(final Boolean value) {
|
||||
if (value) {
|
||||
return;
|
||||
@ -134,23 +138,23 @@ public class Spin extends SpinBase {
|
||||
final long data = this.propertyValue + this.propertyIncrement;
|
||||
checkValue(data);
|
||||
}
|
||||
|
||||
|
||||
protected void onChangePropertyIncrement() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void onChangePropertyMantis() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void onChangePropertyMax() {
|
||||
checkValue(this.propertyValue);
|
||||
}
|
||||
|
||||
|
||||
protected void onChangePropertyMin() {
|
||||
checkValue(this.propertyValue);
|
||||
}
|
||||
|
||||
|
||||
protected void onChangePropertyValue() {
|
||||
markToRedraw();
|
||||
if (this.widgetEntry == null) {
|
||||
@ -159,7 +163,7 @@ public class Spin extends SpinBase {
|
||||
}
|
||||
checkValue(this.propertyValue);
|
||||
}
|
||||
|
||||
|
||||
public void setPropertyIncrement(final long propertyIncrement) {
|
||||
if (this.propertyIncrement == propertyIncrement) {
|
||||
return;
|
||||
@ -167,7 +171,7 @@ public class Spin extends SpinBase {
|
||||
this.propertyIncrement = propertyIncrement;
|
||||
onChangePropertyIncrement();
|
||||
}
|
||||
|
||||
|
||||
public void setPropertyMantis(final int propertyMantis) {
|
||||
if (this.propertyMantis == propertyMantis) {
|
||||
return;
|
||||
@ -175,7 +179,7 @@ public class Spin extends SpinBase {
|
||||
this.propertyMantis = propertyMantis;
|
||||
onChangePropertyMantis();
|
||||
}
|
||||
|
||||
|
||||
public void setPropertyMax(final long propertyMax) {
|
||||
if (this.propertyMax == propertyMax) {
|
||||
return;
|
||||
@ -183,7 +187,7 @@ public class Spin extends SpinBase {
|
||||
this.propertyMax = propertyMax;
|
||||
onChangePropertyMax();
|
||||
}
|
||||
|
||||
|
||||
public void setPropertyMin(final long propertyMin) {
|
||||
if (this.propertyMin == propertyMin) {
|
||||
return;
|
||||
@ -191,7 +195,7 @@ public class Spin extends SpinBase {
|
||||
this.propertyMin = propertyMin;
|
||||
onChangePropertyMin();
|
||||
}
|
||||
|
||||
|
||||
public void setPropertyValue(final long propertyValue) {
|
||||
if (this.propertyValue == propertyValue) {
|
||||
return;
|
@ -1,28 +0,0 @@
|
||||
/** Basic module interface.
|
||||
*
|
||||
* @author Edouard DUPIN */
|
||||
|
||||
open module org.atriasoft.ewol {
|
||||
exports org.atriasoft.ewol;
|
||||
exports org.atriasoft.ewol.compositing;
|
||||
exports org.atriasoft.ewol.compositing.tools;
|
||||
exports org.atriasoft.ewol.context;
|
||||
exports org.atriasoft.ewol.event;
|
||||
exports org.atriasoft.ewol.object;
|
||||
exports org.atriasoft.ewol.resource;
|
||||
exports org.atriasoft.ewol.resource.font;
|
||||
//exports org.atriasoft.ewol.tools;
|
||||
exports org.atriasoft.ewol.widget;
|
||||
exports org.atriasoft.ewol.widget.meta;
|
||||
|
||||
requires transitive org.atriasoft.esignal;
|
||||
requires transitive org.atriasoft.iogami;
|
||||
requires transitive org.atriasoft.gale;
|
||||
requires transitive org.atriasoft.etk;
|
||||
requires transitive org.atriasoft.esvg;
|
||||
requires transitive org.atriasoft.exml;
|
||||
requires transitive org.atriasoft.ejson;
|
||||
requires org.atriasoft.loader3d;
|
||||
requires org.atriasoft.egami;
|
||||
requires java.base;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user