Compare commits
2 Commits
f4224792c0
...
2743abe410
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2743abe410 | ||
![]() |
6c4ac572b6 |
40
.classpath
Normal file
40
.classpath
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/testResources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
23
.project
Normal file
23
.project
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>ewol</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.atriasoft</groupId>
|
<groupId>org.atriasoft</groupId>
|
||||||
<artifactId>ewol</artifactId>
|
<artifactId>ewol</artifactId>
|
||||||
<version>0.1.0</version>
|
<version>0.1.0</version>
|
||||||
<properties>
|
<licenses>
|
||||||
<maven.compiler.version>3.13.0</maven.compiler.version>
|
<license>
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<name>Mozilla Public License 2.0</name>
|
||||||
<maven.compiler.target>21</maven.compiler.target>
|
<url>https://opensource.org/licenses/MPL-2.0</url>
|
||||||
<maven.dependency.version>3.1.1</maven.dependency.version>
|
<distribution>repo</distribution>
|
||||||
</properties>
|
</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>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
@ -66,7 +78,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>5.11.0-M2</version>
|
<version>5.11.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -78,29 +90,33 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>src</sourceDirectory>
|
<sourceDirectory>src/main</sourceDirectory>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>${basedir}/src/resources</directory>
|
<directory>${basedir}/src/resources</directory>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<testSourceDirectory>test/src</testSourceDirectory>
|
<testSourceDirectory>src/test</testSourceDirectory>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>${basedir}/src/testResources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>${maven.compiler.version}</version>
|
<version>3.14.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${maven.compiler.source}</source>
|
<source>21</source>
|
||||||
<target>${maven.compiler.target}</target>
|
<target>21</target>
|
||||||
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Create the source bundle -->
|
<!-- Create the source bundle -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>3.3.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-sources</id>
|
<id>attach-sources</id>
|
||||||
@ -114,7 +130,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>3.0.0-M5</version>
|
<version>3.2.5</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
@ -133,7 +149,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.3.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<show>private</show>
|
<show>private</show>
|
||||||
<nohelp>true</nohelp>
|
<nohelp>true</nohelp>
|
||||||
@ -147,7 +163,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.3.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<show>public</show>
|
<show>public</show>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
40
samples/.classpath
Normal file
40
samples/.classpath
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
23
samples/.project
Normal file
23
samples/.project
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>ewol-sample</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
8
samples/.settings/org.eclipse.jdt.core.prefs
Normal file
8
samples/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=21
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=21
|
4
samples/.settings/org.eclipse.m2e.core.prefs
Normal file
4
samples/.settings/org.eclipse.m2e.core.prefs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
@ -3,27 +3,38 @@
|
|||||||
<groupId>org.atriasoft</groupId>
|
<groupId>org.atriasoft</groupId>
|
||||||
<artifactId>ewol-sample</artifactId>
|
<artifactId>ewol-sample</artifactId>
|
||||||
<version>0.1.0</version>
|
<version>0.1.0</version>
|
||||||
<properties>
|
<licenses>
|
||||||
<maven.compiler.version>3.13.0</maven.compiler.version>
|
<license>
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<name>Mozilla Public License 2.0</name>
|
||||||
<maven.compiler.target>21</maven.compiler.target>
|
<url>https://opensource.org/licenses/MPL-2.0</url>
|
||||||
<maven.dependency.version>3.1.1</maven.dependency.version>
|
<distribution>repo</distribution>
|
||||||
</properties>
|
</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>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>gitea</id>
|
<id>gitea</id>
|
||||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>gitea</id>
|
<id>gitea</id>
|
||||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||||
</repository>
|
</repository>
|
||||||
<snapshotRepository>
|
<snapshotRepository>
|
||||||
<id>gitea</id>
|
<id>gitea</id>
|
||||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||||
</snapshotRepository>
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
@ -33,37 +44,46 @@
|
|||||||
<artifactId>ewol</artifactId>
|
<artifactId>ewol</artifactId>
|
||||||
<version>0.1.0</version>
|
<version>0.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- generic logger of SLF4J to console (in color) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<version>2.1.0-alpha1</version>
|
<version>1.5.18</version>
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
</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>
|
<build>
|
||||||
<sourceDirectory>src</sourceDirectory>
|
<sourceDirectory>src/main</sourceDirectory>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
|
<directory>${basedir}/src/resources</directory>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>${maven.compiler.version}</version>
|
<version>3.14.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${maven.compiler.source}</source>
|
<source>21</source>
|
||||||
<target>${maven.compiler.target}</target>
|
<target>21</target>
|
||||||
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Create the source bundle -->
|
<!-- Create the source bundle -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
<version>3.3.1</version>
|
<version>4.0.0-beta-1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-sources</id>
|
<id>attach-sources</id>
|
||||||
@ -79,7 +99,7 @@
|
|||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>3.0.0-M5</version>
|
<version>3.0.0-M5</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
@ -91,7 +111,7 @@
|
|||||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||||
</descriptorRefs>
|
</descriptorRefs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Java-doc generation for stand-alone site -->
|
<!-- Java-doc generation for stand-alone site -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
@ -36,8 +36,11 @@ import org.atriasoft.ewol.widget.Spacer;
|
|||||||
import org.atriasoft.ewol.widget.Spin;
|
import org.atriasoft.ewol.widget.Spin;
|
||||||
import org.atriasoft.ewol.widget.Widget;
|
import org.atriasoft.ewol.widget.Widget;
|
||||||
import org.atriasoft.ewol.widget.Windows;
|
import org.atriasoft.ewol.widget.Windows;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class BasicWindows extends Windows {
|
public class BasicWindows extends Windows {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(BasicWindows.class);
|
||||||
private static final String LABEL_GRAVITY = "gravity: ";
|
private static final String LABEL_GRAVITY = "gravity: ";
|
||||||
|
|
||||||
public static void staticRequestNext(final BasicWindows self) {
|
public static void staticRequestNext(final BasicWindows self) {
|
||||||
@ -133,7 +136,7 @@ public class BasicWindows extends Windows {
|
|||||||
checkBox.setPropertyFill(Vector3b.TRUE);
|
checkBox.setPropertyFill(Vector3b.TRUE);
|
||||||
checkBox.setPropertyValue(value);
|
checkBox.setPropertyValue(value);
|
||||||
this.sizerMenu.subWidgetAdd(checkBox);
|
this.sizerMenu.subWidgetAdd(checkBox);
|
||||||
final Connection con = checkBox.signalValue.connect((valueButton) -> {
|
final Connection con = checkBox.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
pojo.setExistingValue(widget, valueButton);
|
pojo.setExistingValue(widget, valueButton);
|
||||||
} catch (final AknotException e) {
|
} catch (final AknotException e) {
|
||||||
@ -173,11 +176,12 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.size().x());
|
spin.setPropertyValue((int) value.size().x());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Dimension2f castedValue) {
|
if (oldValue instanceof final Dimension2f castedValue) {
|
||||||
LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withX(valueButton)));
|
LOGGER.warn("Set new value: {}",
|
||||||
|
castedValue.withSize(castedValue.size().withX(valueButton)));
|
||||||
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withX(valueButton)));
|
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withX(valueButton)));
|
||||||
}
|
}
|
||||||
} catch (final AknotException e) {
|
} catch (final AknotException e) {
|
||||||
@ -205,11 +209,12 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.size().y());
|
spin.setPropertyValue((int) value.size().y());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Dimension2f castedValue) {
|
if (oldValue instanceof final Dimension2f castedValue) {
|
||||||
LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withY(valueButton)));
|
LOGGER.warn("Set new value: {}",
|
||||||
|
castedValue.withSize(castedValue.size().withY(valueButton)));
|
||||||
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withY(valueButton)));
|
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withY(valueButton)));
|
||||||
}
|
}
|
||||||
} catch (final AknotException e) {
|
} catch (final AknotException e) {
|
||||||
@ -249,11 +254,12 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.size().x());
|
spin.setPropertyValue((int) value.size().x());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Dimension3f castedValue) {
|
if (oldValue instanceof final Dimension3f castedValue) {
|
||||||
LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withX(valueButton)));
|
LOGGER.warn("Set new value: {}",
|
||||||
|
castedValue.withSize(castedValue.size().withX(valueButton)));
|
||||||
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withX(valueButton)));
|
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withX(valueButton)));
|
||||||
}
|
}
|
||||||
} catch (final AknotException e) {
|
} catch (final AknotException e) {
|
||||||
@ -281,11 +287,12 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.size().y());
|
spin.setPropertyValue((int) value.size().y());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Dimension3f castedValue) {
|
if (oldValue instanceof final Dimension3f castedValue) {
|
||||||
LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withY(valueButton)));
|
LOGGER.warn("Set new value: {}",
|
||||||
|
castedValue.withSize(castedValue.size().withY(valueButton)));
|
||||||
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withY(valueButton)));
|
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withY(valueButton)));
|
||||||
}
|
}
|
||||||
} catch (final AknotException e) {
|
} catch (final AknotException e) {
|
||||||
@ -313,11 +320,12 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.size().z());
|
spin.setPropertyValue((int) value.size().z());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Dimension3f castedValue) {
|
if (oldValue instanceof final Dimension3f castedValue) {
|
||||||
LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withZ(valueButton)));
|
LOGGER.warn("Set new value: {}",
|
||||||
|
castedValue.withSize(castedValue.size().withZ(valueButton)));
|
||||||
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withZ(valueButton)));
|
pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withZ(valueButton)));
|
||||||
}
|
}
|
||||||
} catch (final AknotException e) {
|
} catch (final AknotException e) {
|
||||||
@ -344,7 +352,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) (double) value);
|
spin.setPropertyValue((int) (double) value);
|
||||||
this.sizerMenu.subWidgetAdd(spin);
|
this.sizerMenu.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
LOGGER.warn("Set new value: {}", valueButton);
|
LOGGER.warn("Set new value: {}", valueButton);
|
||||||
pojo.setExistingValue(widget, (double) valueButton);
|
pojo.setExistingValue(widget, (double) valueButton);
|
||||||
@ -371,7 +379,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) (float) value);
|
spin.setPropertyValue((int) (float) value);
|
||||||
this.sizerMenu.subWidgetAdd(spin);
|
this.sizerMenu.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
LOGGER.warn("Set new value: {}", valueButton);
|
LOGGER.warn("Set new value: {}", valueButton);
|
||||||
pojo.setExistingValue(widget, (float) valueButton);
|
pojo.setExistingValue(widget, (float) valueButton);
|
||||||
@ -456,7 +464,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue(value);
|
spin.setPropertyValue(value);
|
||||||
this.sizerMenu.subWidgetAdd(spin);
|
this.sizerMenu.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
LOGGER.warn("Set new value: {}", valueButton);
|
LOGGER.warn("Set new value: {}", valueButton);
|
||||||
pojo.setExistingValue(widget, (int) (long) valueButton);
|
pojo.setExistingValue(widget, (int) (long) valueButton);
|
||||||
@ -484,7 +492,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue(value);
|
spin.setPropertyValue(value);
|
||||||
this.sizerMenu.subWidgetAdd(spin);
|
this.sizerMenu.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
LOGGER.warn("Set new value: {}", valueButton);
|
LOGGER.warn("Set new value: {}", valueButton);
|
||||||
pojo.setExistingValue(widget, valueButton);
|
pojo.setExistingValue(widget, valueButton);
|
||||||
@ -511,7 +519,7 @@ public class BasicWindows extends Windows {
|
|||||||
element.setPropertyFill(Vector3b.TRUE);
|
element.setPropertyFill(Vector3b.TRUE);
|
||||||
element.setPropertyValue(value);
|
element.setPropertyValue(value);
|
||||||
this.sizerMenu.subWidgetAdd(element);
|
this.sizerMenu.subWidgetAdd(element);
|
||||||
final Connection con = element.signalModify.connect((valueButton) -> {
|
final Connection con = element.signalModify.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
LOGGER.warn("Set new value: {}", valueButton);
|
LOGGER.warn("Set new value: {}", valueButton);
|
||||||
pojo.setExistingValue(widget, valueButton);
|
pojo.setExistingValue(widget, valueButton);
|
||||||
@ -538,7 +546,7 @@ public class BasicWindows extends Windows {
|
|||||||
element.setPropertyFill(Vector3b.TRUE);
|
element.setPropertyFill(Vector3b.TRUE);
|
||||||
element.setPropertyValue(value.toString());
|
element.setPropertyValue(value.toString());
|
||||||
this.sizerMenu.subWidgetAdd(element);
|
this.sizerMenu.subWidgetAdd(element);
|
||||||
final Connection con = element.signalModify.connect((valueButton) -> {
|
final Connection con = element.signalModify.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
LOGGER.warn("Set new value: {}", valueButton);
|
LOGGER.warn("Set new value: {}", valueButton);
|
||||||
pojo.setExistingValue(widget, Uri.valueOf(valueButton));
|
pojo.setExistingValue(widget, Uri.valueOf(valueButton));
|
||||||
@ -570,7 +578,7 @@ public class BasicWindows extends Windows {
|
|||||||
checkBox.setPropertyFill(Vector3b.TRUE);
|
checkBox.setPropertyFill(Vector3b.TRUE);
|
||||||
checkBox.setPropertyValue(value.x());
|
checkBox.setPropertyValue(value.x());
|
||||||
lineSizer.subWidgetAdd(checkBox);
|
lineSizer.subWidgetAdd(checkBox);
|
||||||
final Connection con = checkBox.signalValue.connect((valueButton) -> {
|
final Connection con = checkBox.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector2b castedValue) {
|
if (oldValue instanceof final Vector2b castedValue) {
|
||||||
@ -590,7 +598,7 @@ public class BasicWindows extends Windows {
|
|||||||
checkBox.setPropertyFill(Vector3b.TRUE);
|
checkBox.setPropertyFill(Vector3b.TRUE);
|
||||||
checkBox.setPropertyValue(value.y());
|
checkBox.setPropertyValue(value.y());
|
||||||
lineSizer.subWidgetAdd(checkBox);
|
lineSizer.subWidgetAdd(checkBox);
|
||||||
final Connection con = checkBox.signalValue.connect((valueButton) -> {
|
final Connection con = checkBox.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector2b castedValue) {
|
if (oldValue instanceof final Vector2b castedValue) {
|
||||||
@ -634,7 +642,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.x());
|
spin.setPropertyValue((int) value.x());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector2f castedValue) {
|
if (oldValue instanceof final Vector2f castedValue) {
|
||||||
@ -666,7 +674,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.y());
|
spin.setPropertyValue((int) value.y());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector2f castedValue) {
|
if (oldValue instanceof final Vector2f castedValue) {
|
||||||
@ -710,7 +718,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue(value.x());
|
spin.setPropertyValue(value.x());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector2i castedValue) {
|
if (oldValue instanceof final Vector2i castedValue) {
|
||||||
@ -742,7 +750,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue(value.y());
|
spin.setPropertyValue(value.y());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector2i castedValue) {
|
if (oldValue instanceof final Vector2i castedValue) {
|
||||||
@ -778,7 +786,7 @@ public class BasicWindows extends Windows {
|
|||||||
checkBox.setPropertyFill(Vector3b.TRUE);
|
checkBox.setPropertyFill(Vector3b.TRUE);
|
||||||
checkBox.setPropertyValue(value.x());
|
checkBox.setPropertyValue(value.x());
|
||||||
lineSizer.subWidgetAdd(checkBox);
|
lineSizer.subWidgetAdd(checkBox);
|
||||||
final Connection con = checkBox.signalValue.connect((valueButton) -> {
|
final Connection con = checkBox.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3b castedValue) {
|
if (oldValue instanceof final Vector3b castedValue) {
|
||||||
@ -798,7 +806,7 @@ public class BasicWindows extends Windows {
|
|||||||
checkBox.setPropertyFill(Vector3b.TRUE);
|
checkBox.setPropertyFill(Vector3b.TRUE);
|
||||||
checkBox.setPropertyValue(value.y());
|
checkBox.setPropertyValue(value.y());
|
||||||
lineSizer.subWidgetAdd(checkBox);
|
lineSizer.subWidgetAdd(checkBox);
|
||||||
final Connection con = checkBox.signalValue.connect((valueButton) -> {
|
final Connection con = checkBox.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3b castedValue) {
|
if (oldValue instanceof final Vector3b castedValue) {
|
||||||
@ -817,7 +825,7 @@ public class BasicWindows extends Windows {
|
|||||||
checkBox.setPropertyFill(Vector3b.TRUE);
|
checkBox.setPropertyFill(Vector3b.TRUE);
|
||||||
checkBox.setPropertyValue(value.z());
|
checkBox.setPropertyValue(value.z());
|
||||||
lineSizer.subWidgetAdd(checkBox);
|
lineSizer.subWidgetAdd(checkBox);
|
||||||
final Connection con = checkBox.signalValue.connect((valueButton) -> {
|
final Connection con = checkBox.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3b castedValue) {
|
if (oldValue instanceof final Vector3b castedValue) {
|
||||||
@ -861,7 +869,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.x());
|
spin.setPropertyValue((int) value.x());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3f castedValue) {
|
if (oldValue instanceof final Vector3f castedValue) {
|
||||||
@ -893,7 +901,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.y());
|
spin.setPropertyValue((int) value.y());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3f castedValue) {
|
if (oldValue instanceof final Vector3f castedValue) {
|
||||||
@ -925,7 +933,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue((int) value.z());
|
spin.setPropertyValue((int) value.z());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3f castedValue) {
|
if (oldValue instanceof final Vector3f castedValue) {
|
||||||
@ -969,7 +977,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue(value.x());
|
spin.setPropertyValue(value.x());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3i castedValue) {
|
if (oldValue instanceof final Vector3i castedValue) {
|
||||||
@ -1001,7 +1009,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue(value.y());
|
spin.setPropertyValue(value.y());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3i castedValue) {
|
if (oldValue instanceof final Vector3i castedValue) {
|
||||||
@ -1033,7 +1041,7 @@ public class BasicWindows extends Windows {
|
|||||||
spin.setPropertyFill(Vector3b.TRUE);
|
spin.setPropertyFill(Vector3b.TRUE);
|
||||||
spin.setPropertyValue(value.z());
|
spin.setPropertyValue(value.z());
|
||||||
lineSizer.subWidgetAdd(spin);
|
lineSizer.subWidgetAdd(spin);
|
||||||
final Connection con = spin.signalValue.connect((valueButton) -> {
|
final Connection con = spin.signalValue.connect(valueButton -> {
|
||||||
try {
|
try {
|
||||||
final Object oldValue = pojo.getValue(widget);
|
final Object oldValue = pojo.getValue(widget);
|
||||||
if (oldValue instanceof final Vector3i castedValue) {
|
if (oldValue instanceof final Vector3i castedValue) {
|
||||||
@ -1059,7 +1067,8 @@ public class BasicWindows extends Windows {
|
|||||||
LOGGER.warn(" ==> type='{}'", pojo.getType());
|
LOGGER.warn(" ==> type='{}'", pojo.getType());
|
||||||
LOGGER.warn(" ==> sub-type='{}'", pojo.getSubType());
|
LOGGER.warn(" ==> sub-type='{}'", pojo.getSubType());
|
||||||
|
|
||||||
final String eventName = pojo.getNames() != null && pojo.getNames().length != 0 ? pojo.getNames()[0] : pojo.getBeanName();
|
final String eventName = pojo.getNames() != null && pojo.getNames().length != 0 ? pojo.getNames()[0]
|
||||||
|
: pojo.getBeanName();
|
||||||
|
|
||||||
if (pojo.getSubType() != null && pojo.getType() == Signal.class) {
|
if (pojo.getSubType() != null && pojo.getType() == Signal.class) {
|
||||||
LOGGER.warn(" ** Signal<{}>", pojo.getSubType());
|
LOGGER.warn(" ** Signal<{}>", pojo.getSubType());
|
||||||
@ -1070,8 +1079,8 @@ public class BasicWindows extends Windows {
|
|||||||
final String valueNameOfSignal = eventName;
|
final String valueNameOfSignal = eventName;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
final Signal<Object> tmp = (Signal<Object>) signalObject;
|
final Signal<Object> tmp = (Signal<Object>) signalObject;
|
||||||
tmp.connect((object) -> {
|
tmp.connect(object -> {
|
||||||
LOGGER.print("Get event from '{}' value='{}'", valueNameOfSignal, object);
|
LOGGER.info("Get event from '{}' value='{}'", valueNameOfSignal, object);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1084,7 +1093,7 @@ public class BasicWindows extends Windows {
|
|||||||
final String valueNameOfSignal = eventName;
|
final String valueNameOfSignal = eventName;
|
||||||
final SignalEmpty tmp = (SignalEmpty) signalObject;
|
final SignalEmpty tmp = (SignalEmpty) signalObject;
|
||||||
tmp.connect(() -> {
|
tmp.connect(() -> {
|
||||||
LOGGER.print("Get event from '{}'", valueNameOfSignal);
|
LOGGER.info("Get event from '{}'", valueNameOfSignal);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1100,7 +1109,8 @@ public class BasicWindows extends Windows {
|
|||||||
LOGGER.warn(" ==> description='{}'", pojo.getDescription());
|
LOGGER.warn(" ==> description='{}'", pojo.getDescription());
|
||||||
LOGGER.warn(" ==> type='{}'", pojo.getType());
|
LOGGER.warn(" ==> type='{}'", pojo.getType());
|
||||||
LOGGER.warn(" ==> sub-type='{}'", pojo.getSubType());
|
LOGGER.warn(" ==> sub-type='{}'", pojo.getSubType());
|
||||||
final String propertyName = pojo.getNames() != null && pojo.getNames().length != 0 ? pojo.getNames()[0] : pojo.getBeanName();
|
final String propertyName = pojo.getNames() != null && pojo.getNames().length != 0 ? pojo.getNames()[0]
|
||||||
|
: pojo.getBeanName();
|
||||||
if (pojo.getType() == int.class || pojo.getType() == Integer.class) {
|
if (pojo.getType() == int.class || pojo.getType() == Integer.class) {
|
||||||
addMenuInt(widget, pojo);
|
addMenuInt(widget, pojo);
|
||||||
} else if (pojo.getType() == long.class || pojo.getType() == Long.class) {
|
} else if (pojo.getType() == long.class || pojo.getType() == Long.class) {
|
@ -4,19 +4,20 @@ import org.atriasoft.etk.Configs;
|
|||||||
import org.atriasoft.etk.math.Vector2f;
|
import org.atriasoft.etk.math.Vector2f;
|
||||||
import org.atriasoft.ewol.context.EwolApplication;
|
import org.atriasoft.ewol.context.EwolApplication;
|
||||||
import org.atriasoft.ewol.context.EwolContext;
|
import org.atriasoft.ewol.context.EwolContext;
|
||||||
|
import org.slf4j.Logger;
|
||||||
import sample.atriasoft.ewol.Log;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class Appl implements EwolApplication {
|
public class Appl implements EwolApplication {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(Appl.class);
|
||||||
|
|
||||||
//! [ewol_sample_HW_main_application]
|
//! [ewol_sample_HW_main_application]
|
||||||
private void localCreate(final EwolContext context) {
|
private void localCreate(final EwolContext context) {
|
||||||
//! [ewol_sample_HW_main_parse_arguments]
|
//! [ewol_sample_HW_main_parse_arguments]
|
||||||
// parse all the argument of the application
|
// parse all the argument of the application
|
||||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||||
String tmpppp = context.getCmd().get(iii);
|
final String tmpppp = context.getCmd().get(iii);
|
||||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||||
LOGGER.print(" -h/--help display this help");
|
LOGGER.info(" -h/--help display this help");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,7 +32,7 @@ public class Appl implements EwolApplication {
|
|||||||
//! [ewol_sample_HW_main_set_font_property]
|
//! [ewol_sample_HW_main_set_font_property]
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
// Create the windows
|
// Create the windows
|
||||||
MainWindows basicWindows = new MainWindows();
|
final MainWindows basicWindows = new MainWindows();
|
||||||
// configure the ewol context to use the new windows
|
// configure the ewol context to use the new windows
|
||||||
context.setWindows(basicWindows);
|
context.setWindows(basicWindows);
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
@ -4,19 +4,20 @@ import org.atriasoft.etk.Configs;
|
|||||||
import org.atriasoft.etk.math.Vector2f;
|
import org.atriasoft.etk.math.Vector2f;
|
||||||
import org.atriasoft.ewol.context.EwolApplication;
|
import org.atriasoft.ewol.context.EwolApplication;
|
||||||
import org.atriasoft.ewol.context.EwolContext;
|
import org.atriasoft.ewol.context.EwolContext;
|
||||||
|
import org.slf4j.Logger;
|
||||||
import sample.atriasoft.ewol.Log;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class Appl implements EwolApplication {
|
public class Appl implements EwolApplication {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(Appl.class);
|
||||||
|
|
||||||
//! [ewol_sample_HW_main_application]
|
//! [ewol_sample_HW_main_application]
|
||||||
private void localCreate(final EwolContext context) {
|
private void localCreate(final EwolContext context) {
|
||||||
//! [ewol_sample_HW_main_parse_arguments]
|
//! [ewol_sample_HW_main_parse_arguments]
|
||||||
// parse all the argument of the application
|
// parse all the argument of the application
|
||||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||||
String tmpppp = context.getCmd().get(iii);
|
final String tmpppp = context.getCmd().get(iii);
|
||||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||||
LOGGER.print(" -h/--help display this help");
|
LOGGER.info(" -h/--help display this help");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,52 +32,52 @@ public class Appl implements EwolApplication {
|
|||||||
//! [ewol_sample_HW_main_set_font_property]
|
//! [ewol_sample_HW_main_set_font_property]
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
// Create the windows
|
// Create the windows
|
||||||
MainWindows basicWindows = new MainWindows();
|
final MainWindows basicWindows = new MainWindows();
|
||||||
// configure the ewol context to use the new windows
|
// configure the ewol context to use the new windows
|
||||||
context.setWindows(basicWindows);
|
context.setWindows(basicWindows);
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(final EwolContext context) {
|
public void onCreate(final EwolContext context) {
|
||||||
LOGGER.info("Application onCreate: [BEGIN]");
|
LOGGER.info("Application onCreate: [BEGIN]");
|
||||||
localCreate(context);
|
localCreate(context);
|
||||||
LOGGER.info("Application onCreate: [ END ]");
|
LOGGER.info("Application onCreate: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy(final EwolContext context) {
|
public void onDestroy(final EwolContext context) {
|
||||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onDestroy: [ END ]");
|
LOGGER.info("Application onDestroy: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause(final EwolContext context) {
|
public void onPause(final EwolContext context) {
|
||||||
LOGGER.info("Application onPause: [BEGIN]");
|
LOGGER.info("Application onPause: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onPause: [ END ]");
|
LOGGER.info("Application onPause: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume(final EwolContext context) {
|
public void onResume(final EwolContext context) {
|
||||||
LOGGER.info("Application onResume: [BEGIN]");
|
LOGGER.info("Application onResume: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onResume: [ END ]");
|
LOGGER.info("Application onResume: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(final EwolContext context) {
|
public void onStart(final EwolContext context) {
|
||||||
LOGGER.info("Application onStart: [BEGIN]");
|
LOGGER.info("Application onStart: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStart: [ END ]");
|
LOGGER.info("Application onStart: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop(final EwolContext context) {
|
public void onStop(final EwolContext context) {
|
||||||
LOGGER.info("Application onStop: [BEGIN]");
|
LOGGER.info("Application onStop: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStop: [ END ]");
|
LOGGER.info("Application onStop: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -4,19 +4,20 @@ import org.atriasoft.etk.Configs;
|
|||||||
import org.atriasoft.etk.math.Vector2f;
|
import org.atriasoft.etk.math.Vector2f;
|
||||||
import org.atriasoft.ewol.context.EwolApplication;
|
import org.atriasoft.ewol.context.EwolApplication;
|
||||||
import org.atriasoft.ewol.context.EwolContext;
|
import org.atriasoft.ewol.context.EwolContext;
|
||||||
|
import org.slf4j.Logger;
|
||||||
import sample.atriasoft.ewol.Log;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class Appl implements EwolApplication {
|
public class Appl implements EwolApplication {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(Appl.class);
|
||||||
|
|
||||||
//! [ewol_sample_HW_main_application]
|
//! [ewol_sample_HW_main_application]
|
||||||
private void localCreate(final EwolContext context) {
|
private void localCreate(final EwolContext context) {
|
||||||
//! [ewol_sample_HW_main_parse_arguments]
|
//! [ewol_sample_HW_main_parse_arguments]
|
||||||
// parse all the argument of the application
|
// parse all the argument of the application
|
||||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||||
String tmpppp = context.getCmd().get(iii);
|
final String tmpppp = context.getCmd().get(iii);
|
||||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||||
LOGGER.print(" -h/--help display this help");
|
LOGGER.info(" -h/--help display this help");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,52 +32,52 @@ public class Appl implements EwolApplication {
|
|||||||
//! [ewol_sample_HW_main_set_font_property]
|
//! [ewol_sample_HW_main_set_font_property]
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
// Create the windows
|
// Create the windows
|
||||||
MainWindows basicWindows = new MainWindows();
|
final MainWindows basicWindows = new MainWindows();
|
||||||
// configure the ewol context to use the new windows
|
// configure the ewol context to use the new windows
|
||||||
context.setWindows(basicWindows);
|
context.setWindows(basicWindows);
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(final EwolContext context) {
|
public void onCreate(final EwolContext context) {
|
||||||
LOGGER.info("Application onCreate: [BEGIN]");
|
LOGGER.info("Application onCreate: [BEGIN]");
|
||||||
localCreate(context);
|
localCreate(context);
|
||||||
LOGGER.info("Application onCreate: [ END ]");
|
LOGGER.info("Application onCreate: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy(final EwolContext context) {
|
public void onDestroy(final EwolContext context) {
|
||||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onDestroy: [ END ]");
|
LOGGER.info("Application onDestroy: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause(final EwolContext context) {
|
public void onPause(final EwolContext context) {
|
||||||
LOGGER.info("Application onPause: [BEGIN]");
|
LOGGER.info("Application onPause: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onPause: [ END ]");
|
LOGGER.info("Application onPause: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume(final EwolContext context) {
|
public void onResume(final EwolContext context) {
|
||||||
LOGGER.info("Application onResume: [BEGIN]");
|
LOGGER.info("Application onResume: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onResume: [ END ]");
|
LOGGER.info("Application onResume: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(final EwolContext context) {
|
public void onStart(final EwolContext context) {
|
||||||
LOGGER.info("Application onStart: [BEGIN]");
|
LOGGER.info("Application onStart: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStart: [ END ]");
|
LOGGER.info("Application onStart: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop(final EwolContext context) {
|
public void onStop(final EwolContext context) {
|
||||||
LOGGER.info("Application onStop: [BEGIN]");
|
LOGGER.info("Application onStop: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStop: [ END ]");
|
LOGGER.info("Application onStop: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -4,19 +4,20 @@ import org.atriasoft.etk.Configs;
|
|||||||
import org.atriasoft.etk.math.Vector2f;
|
import org.atriasoft.etk.math.Vector2f;
|
||||||
import org.atriasoft.ewol.context.EwolApplication;
|
import org.atriasoft.ewol.context.EwolApplication;
|
||||||
import org.atriasoft.ewol.context.EwolContext;
|
import org.atriasoft.ewol.context.EwolContext;
|
||||||
|
import org.slf4j.Logger;
|
||||||
import sample.atriasoft.ewol.Log;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class Appl implements EwolApplication {
|
public class Appl implements EwolApplication {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(Appl.class);
|
||||||
|
|
||||||
//! [ewol_sample_HW_main_application]
|
//! [ewol_sample_HW_main_application]
|
||||||
private void localCreate(final EwolContext context) {
|
private void localCreate(final EwolContext context) {
|
||||||
//! [ewol_sample_HW_main_parse_arguments]
|
//! [ewol_sample_HW_main_parse_arguments]
|
||||||
// parse all the argument of the application
|
// parse all the argument of the application
|
||||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||||
String tmpppp = context.getCmd().get(iii);
|
final String tmpppp = context.getCmd().get(iii);
|
||||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||||
LOGGER.print(" -h/--help display this help");
|
LOGGER.info(" -h/--help display this help");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,52 +32,52 @@ public class Appl implements EwolApplication {
|
|||||||
//! [ewol_sample_HW_main_set_font_property]
|
//! [ewol_sample_HW_main_set_font_property]
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
// Create the windows
|
// Create the windows
|
||||||
MainWindows basicWindows = new MainWindows();
|
final MainWindows basicWindows = new MainWindows();
|
||||||
// configure the ewol context to use the new windows
|
// configure the ewol context to use the new windows
|
||||||
context.setWindows(basicWindows);
|
context.setWindows(basicWindows);
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(final EwolContext context) {
|
public void onCreate(final EwolContext context) {
|
||||||
LOGGER.info("Application onCreate: [BEGIN]");
|
LOGGER.info("Application onCreate: [BEGIN]");
|
||||||
localCreate(context);
|
localCreate(context);
|
||||||
LOGGER.info("Application onCreate: [ END ]");
|
LOGGER.info("Application onCreate: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy(final EwolContext context) {
|
public void onDestroy(final EwolContext context) {
|
||||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onDestroy: [ END ]");
|
LOGGER.info("Application onDestroy: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause(final EwolContext context) {
|
public void onPause(final EwolContext context) {
|
||||||
LOGGER.info("Application onPause: [BEGIN]");
|
LOGGER.info("Application onPause: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onPause: [ END ]");
|
LOGGER.info("Application onPause: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume(final EwolContext context) {
|
public void onResume(final EwolContext context) {
|
||||||
LOGGER.info("Application onResume: [BEGIN]");
|
LOGGER.info("Application onResume: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onResume: [ END ]");
|
LOGGER.info("Application onResume: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(final EwolContext context) {
|
public void onStart(final EwolContext context) {
|
||||||
LOGGER.info("Application onStart: [BEGIN]");
|
LOGGER.info("Application onStart: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStart: [ END ]");
|
LOGGER.info("Application onStart: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop(final EwolContext context) {
|
public void onStop(final EwolContext context) {
|
||||||
LOGGER.info("Application onStop: [BEGIN]");
|
LOGGER.info("Application onStop: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStop: [ END ]");
|
LOGGER.info("Application onStop: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -4,11 +4,12 @@ import org.atriasoft.etk.Configs;
|
|||||||
import org.atriasoft.etk.math.Vector2f;
|
import org.atriasoft.etk.math.Vector2f;
|
||||||
import org.atriasoft.ewol.context.EwolApplication;
|
import org.atriasoft.ewol.context.EwolApplication;
|
||||||
import org.atriasoft.ewol.context.EwolContext;
|
import org.atriasoft.ewol.context.EwolContext;
|
||||||
|
import org.slf4j.Logger;
|
||||||
import sample.atriasoft.ewol.Log;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class Appl implements EwolApplication {
|
public class Appl implements EwolApplication {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(Appl.class);
|
||||||
|
|
||||||
//! [ewol_sample_HW_main_application]
|
//! [ewol_sample_HW_main_application]
|
||||||
private void localCreate(final EwolContext context) {
|
private void localCreate(final EwolContext context) {
|
||||||
//! [ewol_sample_HW_main_parse_arguments]
|
//! [ewol_sample_HW_main_parse_arguments]
|
||||||
@ -16,7 +17,7 @@ public class Appl implements EwolApplication {
|
|||||||
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
for (int iii = 0; iii < context.getCmd().size(); iii++) {
|
||||||
final String tmpppp = context.getCmd().get(iii);
|
final String tmpppp = context.getCmd().get(iii);
|
||||||
if (tmpppp == "-h" || tmpppp == "--help") {
|
if (tmpppp == "-h" || tmpppp == "--help") {
|
||||||
LOGGER.print(" -h/--help display this help");
|
LOGGER.info(" -h/--help display this help");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -36,47 +37,47 @@ public class Appl implements EwolApplication {
|
|||||||
context.setWindows(basicWindows);
|
context.setWindows(basicWindows);
|
||||||
//! [ewol_sample_HW_main_set_windows]
|
//! [ewol_sample_HW_main_set_windows]
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(final EwolContext context) {
|
public void onCreate(final EwolContext context) {
|
||||||
LOGGER.info("Application onCreate: [BEGIN]");
|
LOGGER.info("Application onCreate: [BEGIN]");
|
||||||
localCreate(context);
|
localCreate(context);
|
||||||
LOGGER.info("Application onCreate: [ END ]");
|
LOGGER.info("Application onCreate: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy(final EwolContext context) {
|
public void onDestroy(final EwolContext context) {
|
||||||
LOGGER.info("Application onDestroy: [BEGIN]");
|
LOGGER.info("Application onDestroy: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onDestroy: [ END ]");
|
LOGGER.info("Application onDestroy: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause(final EwolContext context) {
|
public void onPause(final EwolContext context) {
|
||||||
LOGGER.info("Application onPause: [BEGIN]");
|
LOGGER.info("Application onPause: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onPause: [ END ]");
|
LOGGER.info("Application onPause: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume(final EwolContext context) {
|
public void onResume(final EwolContext context) {
|
||||||
LOGGER.info("Application onResume: [BEGIN]");
|
LOGGER.info("Application onResume: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onResume: [ END ]");
|
LOGGER.info("Application onResume: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart(final EwolContext context) {
|
public void onStart(final EwolContext context) {
|
||||||
LOGGER.info("Application onStart: [BEGIN]");
|
LOGGER.info("Application onStart: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStart: [ END ]");
|
LOGGER.info("Application onStart: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop(final EwolContext context) {
|
public void onStop(final EwolContext context) {
|
||||||
LOGGER.info("Application onStop: [BEGIN]");
|
LOGGER.info("Application onStop: [BEGIN]");
|
||||||
|
|
||||||
LOGGER.info("Application onStop: [ END ]");
|
LOGGER.info("Application onStop: [ END ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -17,6 +17,13 @@ public class MainWindows extends BasicWindows {
|
|||||||
public MainWindows() {
|
public MainWindows() {
|
||||||
setPropertyTitle("Test all compositing");
|
setPropertyTitle("Test all compositing");
|
||||||
|
|
||||||
|
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 Slider");
|
this.titles.add("test Slider");
|
||||||
this.values.add("""
|
this.values.add("""
|
||||||
<Slider name='My name is Bob' fill='true,false,false' expand='true'/>
|
<Slider name='My name is Bob' fill='true,false,false' expand='true'/>
|
||||||
@ -33,13 +40,6 @@ public class MainWindows extends BasicWindows {
|
|||||||
</Button>
|
</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.titles.add("test checkBox");
|
||||||
this.values.add("""
|
this.values.add("""
|
||||||
<CheckBox
|
<CheckBox
|
||||||
@ -57,10 +57,13 @@ public class MainWindows extends BasicWindows {
|
|||||||
public void requestNext() {
|
public void requestNext() {
|
||||||
System.out.print("Request change !!!!");
|
System.out.print("Request change !!!!");
|
||||||
this.index++;
|
this.index++;
|
||||||
|
if (this.titles.size() <= this.index) {
|
||||||
|
this.index = 0;
|
||||||
|
}
|
||||||
setPropertyTitle(this.titles.get(this.index));
|
setPropertyTitle(this.titles.get(this.index));
|
||||||
|
|
||||||
final String dataString = this.values.get(this.index);
|
final String dataString = this.values.get(this.index);
|
||||||
final Widget data = Composer.composerGenerateString(dataString);
|
final Widget data = Composer.composerGenerateString(dataString);
|
||||||
this.setTestWidget(data);
|
setTestWidget(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
53
samples/src/resources/logback.xml
Normal file
53
samples/src/resources/logback.xml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<!-- environment detection (defaut: dev) -->
|
||||||
|
<property name="LOG_LEVEL_ENV" value="${LOG_LEVEL:-dev}" />
|
||||||
|
<!-- Appender for development -->
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("dev")">
|
||||||
|
<then>
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%green(%d{HH:mm:ss.SSS}) %highlight(%-5level) %-30((%file:%line\)): %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<logger name="org.atriasoft.etk" level="DEBUG" />
|
||||||
|
<logger name="org.atriasoft.ewol" level="DEBUG" />
|
||||||
|
<logger name="org.atriasoft.esignal" level="DEBUG" />
|
||||||
|
<logger name="org.atriasoft.esvg" level="DEBUG" />
|
||||||
|
<logger name="sample.atriasoft.ewol" level="DEBUG" />
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
</root>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<!-- Appender for production -->
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").matches("^prod.*")">
|
||||||
|
<then>
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>[%thread] %level %logger - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
</root>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("prod-debug")">
|
||||||
|
<then>
|
||||||
|
<logger name="org.atriasoft.ewol" level="DEBUG" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("prod-trace")">
|
||||||
|
<then>
|
||||||
|
<logger name="org.atriasoft.ewol" level="TRACE" />
|
||||||
|
<logger name="org.atriasoft.etk" level="DEBUG" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("prod-trace-full")">
|
||||||
|
<then>
|
||||||
|
<logger name="org.atriasoft.ewol" level="TRACE" />
|
||||||
|
<logger name="org.atriasoft.v" level="TRACE" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</configuration>
|
53
src/TestResources/logback.xml
Normal file
53
src/TestResources/logback.xml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<!-- environment detection (defaut: dev) -->
|
||||||
|
<property name="LOG_LEVEL_ENV" value="${LOG_LEVEL:-dev}" />
|
||||||
|
<!-- Appender for development -->
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("dev")">
|
||||||
|
<then>
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%green(%d{HH:mm:ss.SSS}) %highlight(%-5level) %-30((%file:%line\)): %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<logger name="org.atriasoft.etk" level="DEBUG" />
|
||||||
|
<logger name="org.atriasoft.ewol" level="DEBUG" />
|
||||||
|
<logger name="org.atriasoft.esignal" level="DEBUG" />
|
||||||
|
<logger name="org.atriasoft.esvg" level="DEBUG" />
|
||||||
|
<logger name="sample.atriasoft.ewol" level="DEBUG" />
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
</root>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<!-- Appender for production -->
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").matches("^prod.*")">
|
||||||
|
<then>
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>[%thread] %level %logger - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
</root>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("prod-debug")">
|
||||||
|
<then>
|
||||||
|
<logger name="org.atriasoft.ewol" level="DEBUG" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("prod-trace")">
|
||||||
|
<then>
|
||||||
|
<logger name="org.atriasoft.ewol" level="TRACE" />
|
||||||
|
<logger name="org.atriasoft.etk" level="DEBUG" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
<if condition="property("LOG_LEVEL_ENV").equals("prod-trace-full")">
|
||||||
|
<then>
|
||||||
|
<logger name="org.atriasoft.ewol" level="TRACE" />
|
||||||
|
<logger name="org.atriasoft.v" level="TRACE" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</configuration>
|
397
src/main/org/atriasoft/ewol/compositing/CompositingSVG.java
Normal file
397
src/main/org/atriasoft/ewol/compositing/CompositingSVG.java
Normal file
@ -0,0 +1,397 @@
|
|||||||
|
/** @file
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||||
|
* @license MPL v2.0 (see license file)
|
||||||
|
*/
|
||||||
|
package org.atriasoft.ewol.compositing;
|
||||||
|
|
||||||
|
import org.atriasoft.egami.ImageByte;
|
||||||
|
import org.atriasoft.egami.ImageByteRGBA;
|
||||||
|
import org.atriasoft.egami.ToolImage;
|
||||||
|
import org.atriasoft.esvg.EsvgDocument;
|
||||||
|
import org.atriasoft.etk.Color;
|
||||||
|
import org.atriasoft.etk.Uri;
|
||||||
|
import org.atriasoft.etk.math.Matrix4f;
|
||||||
|
import org.atriasoft.etk.math.Vector2f;
|
||||||
|
import org.atriasoft.etk.math.Vector2i;
|
||||||
|
import org.atriasoft.etk.math.Vector3f;
|
||||||
|
import org.atriasoft.gale.backend3d.OpenGL;
|
||||||
|
import org.atriasoft.gale.backend3d.OpenGL.RenderMode;
|
||||||
|
import org.atriasoft.gale.resource.ResourceProgram;
|
||||||
|
import org.atriasoft.gale.resource.ResourceTexture2;
|
||||||
|
import org.atriasoft.gale.resource.ResourceVirtualArrayObject;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public class CompositingSVG extends Compositing {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(CompositingSVG.class);
|
||||||
|
public static final int NB_VBO = 3;
|
||||||
|
public static final int SIZE_AUTO = 0;
|
||||||
|
public static final int VBO_ID_COLOR = 2;
|
||||||
|
// VBO table property:
|
||||||
|
public static final int VBO_ID_COORD = 0;
|
||||||
|
public static final int VBO_ID_COORD_TEX = 1;
|
||||||
|
private float angle = 0; //!< Angle to set at the axes
|
||||||
|
private Color color = new Color(1, 1, 1); //!< The text foreground color
|
||||||
|
private String svgData;
|
||||||
|
protected int oGLMatrixProjection = -1; //!< openGL id on the element (Projection matrix)
|
||||||
|
protected int oGLMatrixTransformation = -1; //!< openGL id on the element (transformation matrix)
|
||||||
|
protected int oGLMatrixView = -1; //!< openGL id on the element (view matrix)
|
||||||
|
private ResourceProgram oGLprogram = null; //!< pointer on the opengl display program
|
||||||
|
private Vector3f position = Vector3f.ZERO; //!< The current position to draw
|
||||||
|
private Vector2i requestSize = new Vector2i(2, 2);
|
||||||
|
|
||||||
|
private ResourceTexture2 resource = null;
|
||||||
|
private ResourceTexture2 resourceImage = null; //!< texture resources
|
||||||
|
private ResourceVirtualArrayObject vbo = null;
|
||||||
|
|
||||||
|
private Color[] vboDataColors = null;
|
||||||
|
private Vector3f[] vboDataCoords = null;
|
||||||
|
private Vector2f[] vboDataCoordsTex = null;
|
||||||
|
|
||||||
|
public CompositingSVG() {
|
||||||
|
this("<svg></svg>", CompositingSVG.SIZE_AUTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompositingSVG(final String data, final int size) {
|
||||||
|
this.svgData = data;
|
||||||
|
// Create the VBO:
|
||||||
|
this.vbo = ResourceVirtualArrayObject.createDynamic();
|
||||||
|
if (this.vbo == null) {
|
||||||
|
LOGGER.error("can not instanciate VBO ...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// TO facilitate some debugs we add a name of the VBO:
|
||||||
|
this.vbo.setName("[VBO] of " + this.getClass().getCanonicalName());
|
||||||
|
setSource(data, size);
|
||||||
|
loadProgram();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clear alll tre registered element in the current element
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void clear() {
|
||||||
|
// call upper class
|
||||||
|
super.clear();
|
||||||
|
// reset Buffer :
|
||||||
|
this.vbo.clear();
|
||||||
|
// reset temporal variables :
|
||||||
|
this.position = Vector3f.ZERO;
|
||||||
|
this.color = Color.WHITE;
|
||||||
|
this.angle = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* draw All the registered text in the current element on openGL
|
||||||
|
* @param disableDepthTest disable the Depth test for display
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void draw(final boolean disableDepthTest) {
|
||||||
|
/*
|
||||||
|
if (this.VBO.bufferSize(this.vboIdCoord) <= 0) {
|
||||||
|
//LOGGER.warn("Nothink to draw...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if (this.resourceImage == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.oGLprogram == null) {
|
||||||
|
LOGGER.error("No shader ...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//LOGGER.warn("Display image : " + this.VBO.bufferSize(this.vboIdCoord));
|
||||||
|
if (disableDepthTest) {
|
||||||
|
OpenGL.disable(OpenGL.Flag.flag_depthTest);
|
||||||
|
} else {
|
||||||
|
OpenGL.enable(OpenGL.Flag.flag_depthTest);
|
||||||
|
}
|
||||||
|
// set Matrix : translation/positionMatrix
|
||||||
|
final Matrix4f projMatrix = OpenGL.getMatrix();
|
||||||
|
final Matrix4f camMatrix = OpenGL.getCameraMatrix();
|
||||||
|
this.oGLprogram.use();
|
||||||
|
this.vbo.bindForRendering();
|
||||||
|
this.oGLprogram.uniformMatrix(this.oGLMatrixProjection, projMatrix);
|
||||||
|
this.oGLprogram.uniformMatrix(this.oGLMatrixTransformation, this.matrixApply);
|
||||||
|
this.oGLprogram.uniformMatrix(this.oGLMatrixView, camMatrix);
|
||||||
|
// TextureID
|
||||||
|
this.resourceImage.bindForRendering(0);
|
||||||
|
this.vbo.renderArrays(RenderMode.TRIANGLE);
|
||||||
|
this.vbo.unBindForRendering();
|
||||||
|
this.oGLprogram.unUse();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void flush() {
|
||||||
|
this.vbo.setPosition(this.vboDataCoords);
|
||||||
|
this.vbo.setTextureCoordinate(this.vboDataCoordsTex);
|
||||||
|
this.vbo.setColors(this.vboDataColors);
|
||||||
|
this.vbo.setVertexCount(this.vboDataCoords.length);
|
||||||
|
this.vbo.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get the current display position (sometime needed in the gui control)
|
||||||
|
* @return the current position.
|
||||||
|
*/
|
||||||
|
public Vector3f getPos() {
|
||||||
|
return this.position;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get the source image registered size in the file (<0 when multiple size image)
|
||||||
|
* @return tre image registered size
|
||||||
|
*/
|
||||||
|
public Vector2i getRealSize() {
|
||||||
|
if (this.resourceImage == null) {
|
||||||
|
return Vector2i.ZERO;
|
||||||
|
}
|
||||||
|
return this.resourceImage.getUsableSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..
|
||||||
|
* @return the validity od the resources.
|
||||||
|
*/
|
||||||
|
public boolean hasSources() {
|
||||||
|
return this.resource != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the openGL program and get all the ID needed
|
||||||
|
*/
|
||||||
|
private void loadProgram() {
|
||||||
|
// get the shader resource:
|
||||||
|
this.oGLprogram = ResourceProgram.create(new Uri("DATA", "textured3D.vert", "ewol"),
|
||||||
|
new Uri("DATA", "textured3D.frag", "ewol"));
|
||||||
|
if (this.oGLprogram != null) {
|
||||||
|
this.oGLMatrixTransformation = this.oGLprogram.getUniform("in_matrixTransformation");
|
||||||
|
this.oGLMatrixProjection = this.oGLprogram.getUniform("in_matrixProjection");
|
||||||
|
this.oGLMatrixView = this.oGLprogram.getUniform("in_matrixView");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void print(final Vector2f size) {
|
||||||
|
printPart(size, Vector2f.ZERO, Vector2f.ONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add a compleate of the image to display with the requested size
|
||||||
|
* @param size size of the output image
|
||||||
|
*/
|
||||||
|
public void print(final Vector2i size) {
|
||||||
|
print(new Vector2f(size.x(), size.y()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add a part of the image to display with the requested size
|
||||||
|
* @param size size of the output image
|
||||||
|
* @param sourcePosStart Start position in the image [0..1] (can be bigger but this repeate the image).
|
||||||
|
* @param sourcePosStop Stop position in the image [0..1] (can be bigger but this repeate the image).
|
||||||
|
*/
|
||||||
|
public void printPart(final Vector2f size, final Vector2f sourcePosStartIn, final Vector2f sourcePosStopIn) {
|
||||||
|
if (this.resource == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final Vector2f openGLSize = new Vector2f(this.resource.getOpenGlSize().x(), this.resource.getOpenGlSize().y());
|
||||||
|
final Vector2i usefullSize = this.resource.getUsableSize();
|
||||||
|
final Vector2f ratio = new Vector2f(usefullSize.x() / openGLSize.x(), usefullSize.y() / openGLSize.y());
|
||||||
|
final Vector2f sourcePosStart = sourcePosStartIn.multiply(ratio);
|
||||||
|
final Vector2f sourcePosStop = sourcePosStopIn.multiply(ratio);
|
||||||
|
LOGGER.trace(" openGLSize=" + openGLSize + " usableSize=" + usefullSize + " start=" + sourcePosStart
|
||||||
|
+ " stop=" + sourcePosStop);
|
||||||
|
|
||||||
|
this.vboDataColors = new Color[6];
|
||||||
|
this.vboDataCoords = new Vector3f[6];
|
||||||
|
this.vboDataCoordsTex = new Vector2f[6];
|
||||||
|
|
||||||
|
if (this.angle == 0.0f) {
|
||||||
|
Vector3f point = this.position;
|
||||||
|
int indexElem = 0;
|
||||||
|
|
||||||
|
Vector2f tex = new Vector2f(sourcePosStart.x(), sourcePosStop.y());
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStop.x(), sourcePosStop.y());
|
||||||
|
point = new Vector3f(this.position.x() + size.x(), this.position.y(), 0);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStop.x(), sourcePosStart.y());
|
||||||
|
point = new Vector3f(this.position.x() + size.x(), this.position.y() + size.y(), 0);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStart.x(), sourcePosStart.y());
|
||||||
|
point = new Vector3f(this.position.x(), this.position.y() + size.y(), 0);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStart.x(), sourcePosStop.y());
|
||||||
|
point = new Vector3f(this.position.x(), this.position.y(), 0);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Vector3f center = this.position.add(new Vector3f(size.x(), size.y(), 0)).divide(2.0f);
|
||||||
|
|
||||||
|
final Vector3f limitedSize = new Vector3f(size.x() * 0.5f, size.y() * 0.5f, 0.0f);
|
||||||
|
|
||||||
|
Vector3f point = Vector3f.ZERO;
|
||||||
|
|
||||||
|
Vector2f tex = new Vector2f(sourcePosStart.x(), sourcePosStop.y());
|
||||||
|
|
||||||
|
int indexElem = 0;
|
||||||
|
|
||||||
|
point = new Vector3f(-limitedSize.x(), -limitedSize.y(), 0);
|
||||||
|
point = point.rotateNew(new Vector3f(0, 0, 1), this.angle).add(center);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStop.x(), sourcePosStop.y());
|
||||||
|
point = new Vector3f(limitedSize.x(), -limitedSize.y(), 0);
|
||||||
|
point = point.rotateNew(new Vector3f(0, 0, 1), this.angle).add(center);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStop.x(), sourcePosStart.y());
|
||||||
|
point = new Vector3f(limitedSize.x(), limitedSize.y(), 0);
|
||||||
|
point = point.rotateNew(new Vector3f(0, 0, 1), this.angle).add(center);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStart.x(), sourcePosStart.y());
|
||||||
|
point = new Vector3f(-limitedSize.x(), limitedSize.y(), 0);
|
||||||
|
point = point.rotateNew(new Vector3f(0, 0, 1), this.angle).add(center);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
indexElem++;
|
||||||
|
|
||||||
|
tex = new Vector2f(sourcePosStart.x(), sourcePosStop.y());
|
||||||
|
point = new Vector3f(-limitedSize.x(), -limitedSize.y(), 0);
|
||||||
|
point = point.rotateNew(new Vector3f(0, 0, 1), this.angle).add(center);
|
||||||
|
this.vboDataCoords[indexElem] = point;
|
||||||
|
this.vboDataCoordsTex[indexElem] = tex;
|
||||||
|
this.vboDataColors[indexElem] = this.color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set a unique rotation of this element (not set in the rotate Generic system)
|
||||||
|
* @param angleRad Angle to set in radiant.
|
||||||
|
*/
|
||||||
|
public void setAngle(final float angleRad) {
|
||||||
|
this.angle = angleRad;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set the Color of the current foreground font
|
||||||
|
* @param color Color to set on foreground (for next print)
|
||||||
|
*/
|
||||||
|
public void setColor(final Color color) {
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPos(final Vector2f pos) {
|
||||||
|
setPos(new Vector3f(pos.x(), pos.y(), 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set position for the next text writen
|
||||||
|
* @param pos Position of the text (in 3D)
|
||||||
|
*/
|
||||||
|
public void setPos(final Vector3f pos) {
|
||||||
|
this.position = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRelPos(final Vector2f pos) {
|
||||||
|
setRelPos(new Vector3f(pos.x(), pos.y(), 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set relative position for the next text writen
|
||||||
|
* @param pos ofset apply of the text (in 3D)
|
||||||
|
*/
|
||||||
|
public void setRelPos(final Vector3f pos) {
|
||||||
|
this.position = this.position.add(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(final ImageByteRGBA image) {
|
||||||
|
clear();
|
||||||
|
this.svgData = null;
|
||||||
|
this.requestSize = image.getSize();
|
||||||
|
this.resourceImage = new ResourceTexture2();
|
||||||
|
this.resourceImage.set(image);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(final String data) {
|
||||||
|
setSource(data, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(final String data, final int size) {
|
||||||
|
setSource(data, new Vector2i(size, size));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(final String data, final Vector2i size) {
|
||||||
|
clear();
|
||||||
|
|
||||||
|
final EsvgDocument doc = new EsvgDocument();
|
||||||
|
doc.parse(data);
|
||||||
|
final ImageByte tmp = ToolImage.convertImageByte(doc.renderImageFloatRGBA(size));
|
||||||
|
if (tmp == null) {
|
||||||
|
LOGGER.error("Can not load the Raw SVG ... ");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.resourceImage.set(tmp);
|
||||||
|
|
||||||
|
if (this.svgData.equals(data) && this.requestSize.x() == size.x() && this.requestSize.y() == size.y()) {
|
||||||
|
// Nothing to do ...
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final ResourceTexture2 resource = this.resource;
|
||||||
|
final ResourceTexture2 resourceTex = this.resourceImage;
|
||||||
|
this.svgData = data;
|
||||||
|
this.requestSize = size;
|
||||||
|
this.resource = null;
|
||||||
|
this.resourceImage = null;
|
||||||
|
|
||||||
|
final Vector2i tmpSize = new Vector2i(size.x(), size.y());
|
||||||
|
|
||||||
|
// link to new one
|
||||||
|
this.resource = ResourceTexture2.create();
|
||||||
|
if (this.resource == null) {
|
||||||
|
LOGGER.error("Can not get Image resource");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -30,7 +30,7 @@ public class LabelOnSVG extends Widget {
|
|||||||
protected int colorDefaultFgText = -1; //!< Default color of the text
|
protected int colorDefaultFgText = -1; //!< Default color of the text
|
||||||
protected ResourceColorFile colorProperty; //!< theme color property
|
protected ResourceColorFile colorProperty; //!< theme color property
|
||||||
protected boolean propertyAutoTranslate = true; //!< if at true the data is translate automaticaly translate.
|
protected boolean propertyAutoTranslate = true; //!< if at true the data is translate automaticaly translate.
|
||||||
|
|
||||||
protected int propertyFontSize = 0; //!< default size of the font.
|
protected int propertyFontSize = 0; //!< default size of the font.
|
||||||
protected String propertyValue = ""; //!< decorated text to display.
|
protected String propertyValue = ""; //!< decorated text to display.
|
||||||
@AknotSignal
|
@AknotSignal
|
||||||
@ -39,7 +39,7 @@ public class LabelOnSVG extends Widget {
|
|||||||
public SignalEmpty signalPressed = new SignalEmpty();
|
public SignalEmpty signalPressed = new SignalEmpty();
|
||||||
protected CompositingText text = new CompositingText(); //!< Compositing text element.
|
protected CompositingText text = new CompositingText(); //!< Compositing text element.
|
||||||
protected String value = "";
|
protected String value = "";
|
||||||
|
|
||||||
public LabelOnSVG() {
|
public LabelOnSVG() {
|
||||||
this.colorProperty = ResourceColorFile.create(new Uri("THEME", "/color/Label.json", "ewol"));
|
this.colorProperty = ResourceColorFile.create(new Uri("THEME", "/color/Label.json", "ewol"));
|
||||||
if (this.colorProperty != null) {
|
if (this.colorProperty != null) {
|
||||||
@ -49,7 +49,7 @@ public class LabelOnSVG extends Widget {
|
|||||||
setMouseLimit(1);
|
setMouseLimit(1);
|
||||||
setPropertyCanFocus(false);
|
setPropertyCanFocus(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param newLabel The displayed decorated text.
|
* @param newLabel The displayed decorated text.
|
||||||
@ -64,7 +64,7 @@ public class LabelOnSVG extends Widget {
|
|||||||
setPropertyCanFocus(false);
|
setPropertyCanFocus(false);
|
||||||
setPropertyValue(newLabel);
|
setPropertyValue(newLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void calculateMinMaxSize() {
|
public void calculateMinMaxSize() {
|
||||||
final Vector3f tmpMax = this.propertyMaxSize.getPixel();
|
final Vector3f tmpMax = this.propertyMaxSize.getPixel();
|
||||||
@ -76,30 +76,30 @@ public class LabelOnSVG extends Widget {
|
|||||||
}
|
}
|
||||||
final Vector3f minSize = this.text.calculateSizeDecorated(this.value);
|
final Vector3f minSize = this.text.calculateSizeDecorated(this.value);
|
||||||
LOGGER.debug("[" + getId() + "] {" + getClass().getCanonicalName() + "} minSize : " + minSize);
|
LOGGER.debug("[" + getId() + "] {" + getClass().getCanonicalName() + "} minSize : " + minSize);
|
||||||
|
|
||||||
this.minSize = new Vector3f(FMath.avg(tmpMin.x(), 4 + minSize.x(), tmpMax.x()),
|
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()));
|
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 + " < "
|
LOGGER.trace("[" + getId() + "] {" + getClass().getCanonicalName() + "} Result min size : " + tmpMin + " < "
|
||||||
+ this.minSize + " < " + tmpMax);
|
+ this.minSize + " < " + tmpMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPropertyFontSize() {
|
public int getPropertyFontSize() {
|
||||||
return this.propertyFontSize;
|
return this.propertyFontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPropertyValue() {
|
public String getPropertyValue() {
|
||||||
return this.propertyValue;
|
return this.propertyValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPropertyAutoTranslate() {
|
public boolean isPropertyAutoTranslate() {
|
||||||
return this.propertyAutoTranslate;
|
return this.propertyAutoTranslate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDraw() {
|
protected void onDraw() {
|
||||||
this.text.draw();
|
this.text.draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onEventInput(final EventInput event) {
|
public boolean onEventInput(final EventInput event) {
|
||||||
//LOGGER.debug("Event on Label ...");
|
//LOGGER.debug("Event on Label ...");
|
||||||
@ -112,7 +112,7 @@ public class LabelOnSVG extends Widget {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRegenerateDisplay() {
|
public void onRegenerateDisplay() {
|
||||||
if (!needRedraw()) {
|
if (!needRedraw()) {
|
||||||
@ -120,24 +120,24 @@ public class LabelOnSVG extends Widget {
|
|||||||
}
|
}
|
||||||
this.text.clear();
|
this.text.clear();
|
||||||
final int paddingSize = 2;
|
final int paddingSize = 2;
|
||||||
|
|
||||||
final Vector3f tmpMax = this.propertyMaxSize.getPixel();
|
final Vector3f tmpMax = this.propertyMaxSize.getPixel();
|
||||||
// to know the size of one line :
|
// to know the size of one line :
|
||||||
final Vector3f minSize = this.text.calculateSize('A');
|
final Vector3f minSize = this.text.calculateSize('A');
|
||||||
|
|
||||||
//minSize.setX(etk::max(minSize.x(), this.minSize.x()));
|
//minSize.setX(etk::max(minSize.x(), this.minSize.x()));
|
||||||
//minSize.setY(etk::max(minSize.y(), this.minSize.y()));
|
//minSize.setY(etk::max(minSize.y(), this.minSize.y()));
|
||||||
if (tmpMax.x() <= 999999) {
|
if (tmpMax.x() <= 999999) {
|
||||||
this.text.setTextAlignment(0, tmpMax.x() - 2 * paddingSize, AlignMode.LEFT);
|
this.text.setTextAlignment(0, tmpMax.x() - 2 * paddingSize, AlignMode.LEFT);
|
||||||
}
|
}
|
||||||
final Vector3f currentTextSize = this.text.calculateSizeDecorated(this.value);
|
final Vector3f currentTextSize = this.text.calculateSizeDecorated(this.value);
|
||||||
|
|
||||||
Vector2i localSize = new Vector2i((int) this.minSize.x(), (int) this.minSize.y());
|
Vector2i localSize = new Vector2i((int) this.minSize.x(), (int) this.minSize.y());
|
||||||
|
|
||||||
// no change for the text origin :
|
// no change for the text origin :
|
||||||
Vector3f tmpTextOrigin = new Vector3f((this.size.x() - this.minSize.x()) / 2.0f,
|
Vector3f tmpTextOrigin = new Vector3f((this.size.x() - this.minSize.x()) / 2.0f,
|
||||||
(this.size.y() - this.minSize.y()) / 2.0f, 0);
|
(this.size.y() - this.minSize.y()) / 2.0f, 0);
|
||||||
|
|
||||||
if (this.propertyFill.x()) {
|
if (this.propertyFill.x()) {
|
||||||
localSize = localSize.withX((int) this.size.x());
|
localSize = localSize.withX((int) this.size.x());
|
||||||
tmpTextOrigin = tmpTextOrigin.withX(0);
|
tmpTextOrigin = tmpTextOrigin.withX(0);
|
||||||
@ -148,14 +148,14 @@ public class LabelOnSVG extends Widget {
|
|||||||
}
|
}
|
||||||
tmpTextOrigin = tmpTextOrigin.add(paddingSize, paddingSize, 0);
|
tmpTextOrigin = tmpTextOrigin.add(paddingSize, paddingSize, 0);
|
||||||
localSize = localSize.less(2 * paddingSize, 2 * paddingSize);
|
localSize = localSize.less(2 * paddingSize, 2 * paddingSize);
|
||||||
|
|
||||||
tmpTextOrigin = tmpTextOrigin.withY(tmpTextOrigin.y() + (this.minSize.y() - 2 * paddingSize) - minSize.y());
|
tmpTextOrigin = tmpTextOrigin.withY(tmpTextOrigin.y() + (this.minSize.y() - 2 * paddingSize) - minSize.y());
|
||||||
|
|
||||||
final Vector3f textPos = new Vector3f(tmpTextOrigin.x(), tmpTextOrigin.y(), 0);
|
final Vector3f textPos = new Vector3f(tmpTextOrigin.x(), tmpTextOrigin.y(), 0);
|
||||||
|
|
||||||
final Vector3f drawClippingPos = new Vector3f(paddingSize, paddingSize, -0.5f);
|
final Vector3f drawClippingPos = new Vector3f(paddingSize, paddingSize, -0.5f);
|
||||||
final Vector3f drawClippingSize = new Vector3f((this.size.x() - paddingSize), (this.size.y() - paddingSize), 1);
|
final Vector3f drawClippingSize = new Vector3f((this.size.x() - paddingSize), (this.size.y() - paddingSize), 1);
|
||||||
|
|
||||||
// clean the element
|
// clean the element
|
||||||
this.text.reset();
|
this.text.reset();
|
||||||
if (this.propertyFontSize != 0) {
|
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.setTextAlignment(tmpTextOrigin.x(), tmpTextOrigin.x() + localSize.x(), AlignMode.LEFT);
|
||||||
this.text.setClipping(drawClippingPos, drawClippingSize);
|
this.text.setClipping(drawClippingPos, drawClippingSize);
|
||||||
this.text.printDecorated(this.value);
|
this.text.printDecorated(this.value);
|
||||||
|
|
||||||
this.text.flush();
|
this.text.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName("auto-translate")
|
@AknotName("auto-translate")
|
||||||
@ -191,7 +191,7 @@ public class LabelOnSVG extends Widget {
|
|||||||
markToRedraw();
|
markToRedraw();
|
||||||
requestUpdateSize();
|
requestUpdateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName("font-size")
|
@AknotName("font-size")
|
||||||
@ -204,7 +204,7 @@ public class LabelOnSVG extends Widget {
|
|||||||
markToRedraw();
|
markToRedraw();
|
||||||
requestUpdateSize();
|
requestUpdateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName("value")
|
@AknotName("value")
|
||||||
@ -222,5 +222,5 @@ public class LabelOnSVG extends Widget {
|
|||||||
requestUpdateSize();
|
requestUpdateSize();
|
||||||
this.propertyValue = propertyValue;
|
this.propertyValue = propertyValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -37,7 +37,7 @@ public class Spin extends SpinBase {
|
|||||||
protected Connection connectionEntry = new Connection();
|
protected Connection connectionEntry = new Connection();
|
||||||
protected Connection connectionButtonUp = new Connection();
|
protected Connection connectionButtonUp = new Connection();
|
||||||
protected Connection connectionButtonDown = new Connection();
|
protected Connection connectionButtonDown = new Connection();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param _mode mode to display the spin
|
* @param _mode mode to display the spin
|
||||||
@ -47,14 +47,14 @@ public class Spin extends SpinBase {
|
|||||||
super(new Uri("THEME", "shape/Spin.json", "ewol"));
|
super(new Uri("THEME", "shape/Spin.json", "ewol"));
|
||||||
connectGui();
|
connectGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkValue(long value) {
|
public void checkValue(long value) {
|
||||||
value = FMath.clamp(this.propertyMin, value, this.propertyMax);
|
value = FMath.clamp(this.propertyMin, value, this.propertyMax);
|
||||||
this.propertyValue = value;
|
this.propertyValue = value;
|
||||||
this.widgetEntry.setPropertyValue(Long.toString(value));
|
this.widgetEntry.setPropertyValue(Long.toString(value));
|
||||||
this.signalValue.emit(this.propertyValue);
|
this.signalValue.emit(this.propertyValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void connectGui() {
|
public void connectGui() {
|
||||||
LOGGER.warn("updateGui [START]");
|
LOGGER.warn("updateGui [START]");
|
||||||
super.updateGui();
|
super.updateGui();
|
||||||
@ -70,7 +70,7 @@ public class Spin extends SpinBase {
|
|||||||
checkValue(this.propertyValue);
|
checkValue(this.propertyValue);
|
||||||
LOGGER.warn("updateGui [STOP]");
|
LOGGER.warn("updateGui [STOP]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName("increment")
|
@AknotName("increment")
|
||||||
@ -78,7 +78,7 @@ public class Spin extends SpinBase {
|
|||||||
public long getPropertyIncrement() {
|
public long getPropertyIncrement() {
|
||||||
return this.propertyIncrement;
|
return this.propertyIncrement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName("mantis")
|
@AknotName("mantis")
|
||||||
@ -86,7 +86,7 @@ public class Spin extends SpinBase {
|
|||||||
public int getPropertyMantis() {
|
public int getPropertyMantis() {
|
||||||
return this.propertyMantis;
|
return this.propertyMantis;
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName(value = "max")
|
@AknotName(value = "max")
|
||||||
@ -94,7 +94,7 @@ public class Spin extends SpinBase {
|
|||||||
public long getPropertyMax() {
|
public long getPropertyMax() {
|
||||||
return this.propertyMax;
|
return this.propertyMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName("min")
|
@AknotName("min")
|
||||||
@ -102,7 +102,7 @@ public class Spin extends SpinBase {
|
|||||||
public long getPropertyMin() {
|
public long getPropertyMin() {
|
||||||
return this.propertyMin;
|
return this.propertyMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@AknotManaged
|
@AknotManaged
|
||||||
@AknotAttribute
|
@AknotAttribute
|
||||||
@AknotName("value")
|
@AknotName("value")
|
||||||
@ -110,7 +110,7 @@ public class Spin extends SpinBase {
|
|||||||
public long getPropertyValue() {
|
public long getPropertyValue() {
|
||||||
return this.propertyValue;
|
return this.propertyValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onCallbackDown(final Boolean value) {
|
protected void onCallbackDown(final Boolean value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return;
|
return;
|
||||||
@ -118,15 +118,19 @@ public class Spin extends SpinBase {
|
|||||||
final long data = this.propertyValue - this.propertyIncrement;
|
final long data = this.propertyValue - this.propertyIncrement;
|
||||||
checkValue(data);
|
checkValue(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onCallbackModify(final String value) {
|
protected void onCallbackModify(final String value) {
|
||||||
if (value.isEmpty()) {
|
if (value.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final long value1 = Long.valueOf(value);
|
try {
|
||||||
checkValue(value1);
|
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) {
|
protected void onCallbackUp(final Boolean value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return;
|
return;
|
||||||
@ -134,23 +138,23 @@ public class Spin extends SpinBase {
|
|||||||
final long data = this.propertyValue + this.propertyIncrement;
|
final long data = this.propertyValue + this.propertyIncrement;
|
||||||
checkValue(data);
|
checkValue(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onChangePropertyIncrement() {
|
protected void onChangePropertyIncrement() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onChangePropertyMantis() {
|
protected void onChangePropertyMantis() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onChangePropertyMax() {
|
protected void onChangePropertyMax() {
|
||||||
checkValue(this.propertyValue);
|
checkValue(this.propertyValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onChangePropertyMin() {
|
protected void onChangePropertyMin() {
|
||||||
checkValue(this.propertyValue);
|
checkValue(this.propertyValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onChangePropertyValue() {
|
protected void onChangePropertyValue() {
|
||||||
markToRedraw();
|
markToRedraw();
|
||||||
if (this.widgetEntry == null) {
|
if (this.widgetEntry == null) {
|
||||||
@ -159,7 +163,7 @@ public class Spin extends SpinBase {
|
|||||||
}
|
}
|
||||||
checkValue(this.propertyValue);
|
checkValue(this.propertyValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPropertyIncrement(final long propertyIncrement) {
|
public void setPropertyIncrement(final long propertyIncrement) {
|
||||||
if (this.propertyIncrement == propertyIncrement) {
|
if (this.propertyIncrement == propertyIncrement) {
|
||||||
return;
|
return;
|
||||||
@ -167,7 +171,7 @@ public class Spin extends SpinBase {
|
|||||||
this.propertyIncrement = propertyIncrement;
|
this.propertyIncrement = propertyIncrement;
|
||||||
onChangePropertyIncrement();
|
onChangePropertyIncrement();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPropertyMantis(final int propertyMantis) {
|
public void setPropertyMantis(final int propertyMantis) {
|
||||||
if (this.propertyMantis == propertyMantis) {
|
if (this.propertyMantis == propertyMantis) {
|
||||||
return;
|
return;
|
||||||
@ -175,7 +179,7 @@ public class Spin extends SpinBase {
|
|||||||
this.propertyMantis = propertyMantis;
|
this.propertyMantis = propertyMantis;
|
||||||
onChangePropertyMantis();
|
onChangePropertyMantis();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPropertyMax(final long propertyMax) {
|
public void setPropertyMax(final long propertyMax) {
|
||||||
if (this.propertyMax == propertyMax) {
|
if (this.propertyMax == propertyMax) {
|
||||||
return;
|
return;
|
||||||
@ -183,7 +187,7 @@ public class Spin extends SpinBase {
|
|||||||
this.propertyMax = propertyMax;
|
this.propertyMax = propertyMax;
|
||||||
onChangePropertyMax();
|
onChangePropertyMax();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPropertyMin(final long propertyMin) {
|
public void setPropertyMin(final long propertyMin) {
|
||||||
if (this.propertyMin == propertyMin) {
|
if (this.propertyMin == propertyMin) {
|
||||||
return;
|
return;
|
||||||
@ -191,7 +195,7 @@ public class Spin extends SpinBase {
|
|||||||
this.propertyMin = propertyMin;
|
this.propertyMin = propertyMin;
|
||||||
onChangePropertyMin();
|
onChangePropertyMin();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPropertyValue(final long propertyValue) {
|
public void setPropertyValue(final long propertyValue) {
|
||||||
if (this.propertyValue == propertyValue) {
|
if (this.propertyValue == propertyValue) {
|
||||||
return;
|
return;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user