diff --git a/pom.xml b/pom.xml index 090f0b8..9b9a7c1 100644 --- a/pom.xml +++ b/pom.xml @@ -1,14 +1,26 @@ + 4.0.0 org.atriasoft ewol 0.1.0 - - 3.13.0 - 21 - 21 - 3.1.1 - + + + Mozilla Public License 2.0 + https://opensource.org/licenses/MPL-2.0 + repo + + + + + dev1 + Edouard DUPIN + edouard.dupin@proton.me + + Lead Developer + + + @@ -66,7 +78,7 @@ org.junit.jupiter junit-jupiter-api - 5.11.0-M2 + 5.11.0 test @@ -78,29 +90,33 @@ - src + src/main ${basedir}/src/resources - test/src - + src/test + + + ${basedir}/src/testResources + + org.apache.maven.plugins maven-compiler-plugin - ${maven.compiler.version} + 3.14.0 - ${maven.compiler.source} - ${maven.compiler.target} - + 21 + 21 org.apache.maven.plugins maven-source-plugin + 3.3.1 attach-sources @@ -114,7 +130,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.2.5 maven-assembly-plugin @@ -133,7 +149,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.0 private true @@ -147,7 +163,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.0 public diff --git a/samples/pom.xml b/samples/pom.xml index 6a212f6..0301d78 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -3,27 +3,38 @@ org.atriasoft ewol-sample 0.1.0 - - 3.13.0 - 21 - 21 - 3.1.1 - + + + Mozilla Public License 2.0 + https://opensource.org/licenses/MPL-2.0 + repo + + + + + dev1 + Edouard DUPIN + edouard.dupin@proton.me + + Lead Developer + + + - gitea - https://gitea.atria-soft.org/api/packages/org.atriasoft/maven + gitea + https://gitea.atria-soft.org/api/packages/org.atriasoft/maven - gitea - https://gitea.atria-soft.org/api/packages/org.atriasoft/maven + gitea + https://gitea.atria-soft.org/api/packages/org.atriasoft/maven - gitea - https://gitea.atria-soft.org/api/packages/org.atriasoft/maven + gitea + https://gitea.atria-soft.org/api/packages/org.atriasoft/maven @@ -33,37 +44,46 @@ ewol 0.1.0 + - org.slf4j - slf4j-simple - 2.1.0-alpha1 - test + ch.qos.logback + logback-classic + 1.5.18 - + + xerces + xercesImpl + 2.12.2 + + + org.codehaus.janino + janino + 3.1.12 + + - src + src/main - + ${basedir}/src/resources org.apache.maven.plugins maven-compiler-plugin - ${maven.compiler.version} + 3.14.0 - ${maven.compiler.source} - ${maven.compiler.target} - + 21 + 21 org.apache.maven.plugins maven-source-plugin - 3.3.1 + 4.0.0-beta-1 attach-sources @@ -79,7 +99,7 @@ maven-surefire-plugin 3.0.0-M5 - + maven-assembly-plugin @@ -91,7 +111,7 @@ jar-with-dependencies - + org.apache.maven.plugins diff --git a/samples/src/module-info.java b/samples/src/module-info.java deleted file mode 100644 index 509dddc..0000000 --- a/samples/src/module-info.java +++ /dev/null @@ -1,6 +0,0 @@ -module sample.atriasoft.ewol { - //exports sample.atriasoft.ewol.simpleWindowsWithImage; - requires org.atriasoft.ewol; - requires org.atriasoft.etk; - requires org.atriasoft.esignal; -} \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ewol/BasicWindows.java b/samples/src/sample/atriasoft/ewol/BasicWindows.java deleted file mode 100644 index e0911bf..0000000 --- a/samples/src/sample/atriasoft/ewol/BasicWindows.java +++ /dev/null @@ -1,1200 +0,0 @@ -package sample.atriasoft.ewol; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.atriasoft.aknot.exception.AknotException; -import org.atriasoft.aknot.model.IntrospectionModel; -import org.atriasoft.aknot.pojo.IntrospectionModelComplex; -import org.atriasoft.aknot.pojo.IntrospectionProperty; -import org.atriasoft.esignal.Connection; -import org.atriasoft.esignal.Signal; -import org.atriasoft.esignal.SignalEmpty; -import org.atriasoft.etk.Color; -import org.atriasoft.etk.Dimension2f; -import org.atriasoft.etk.Dimension3f; -import org.atriasoft.etk.Distance; -import org.atriasoft.etk.Uri; -import org.atriasoft.etk.math.Vector2b; -import org.atriasoft.etk.math.Vector2f; -import org.atriasoft.etk.math.Vector2i; -import org.atriasoft.etk.math.Vector3b; -import org.atriasoft.etk.math.Vector3f; -import org.atriasoft.etk.math.Vector3i; -import org.atriasoft.ewol.Gravity; -import org.atriasoft.ewol.GravityDepth; -import org.atriasoft.ewol.GravityHorizontal; -import org.atriasoft.ewol.GravityVertical; -import org.atriasoft.ewol.widget.Button; -import org.atriasoft.ewol.widget.CheckBox; -import org.atriasoft.ewol.widget.Entry; -import org.atriasoft.ewol.widget.Label; -import org.atriasoft.ewol.widget.Sizer; -import org.atriasoft.ewol.widget.Sizer.DisplayMode; -import org.atriasoft.ewol.widget.Spacer; -import org.atriasoft.ewol.widget.Spin; -import org.atriasoft.ewol.widget.Widget; -import org.atriasoft.ewol.widget.Windows; - -public class BasicWindows extends Windows { - private static final String LABEL_GRAVITY = "gravity: "; - - public static void staticRequestNext(final BasicWindows self) { - self.requestNext(); - } - - Widget testWidget; - Sizer sizerTestAreaHori; - Sizer sizerMenuRoot; - Sizer sizerMenu; - - Gravity basicGravity = Gravity.BOTTOM_LEFT; - - private final List conections = new ArrayList<>(); - - public BasicWindows() { - //! [ewol_sample_HW_windows_title] - setPropertyTitle("No title set !!! for this test"); - - final Sizer sizerMain = new Sizer(DisplayMode.HORIZONTAL); - sizerMain.setPropertyExpand(Vector3b.TRUE); - sizerMain.setPropertyFill(Vector3b.TRUE); - setSubWidget(sizerMain); - - this.sizerMenuRoot = new Sizer(DisplayMode.VERTICAL); - this.sizerMenuRoot.setPropertyExpand(Vector3b.FALSE_TRUE_FALSE); - this.sizerMenuRoot.setPropertyLockExpand(Vector3b.TRUE); - this.sizerMenuRoot.setPropertyFill(Vector3b.TRUE); - this.sizerMenuRoot.setPropertyMinSize(new Dimension3f(new Vector3f(350, 10, 10), Distance.PIXEL)); - this.sizerMenuRoot.setPropertyGravity(Gravity.TOP); - sizerMain.subWidgetAdd(this.sizerMenuRoot); - - final Button next = Button.createLabelButton("Next ..."); - this.sizerMenuRoot.subWidgetAdd(next); - next.signalClick.connectAuto(this, BasicWindows::staticRequestNext); - - this.sizerMenu = new Sizer(DisplayMode.VERTICAL); - this.sizerMenu.setPropertyExpand(Vector3b.FALSE_TRUE_FALSE); - this.sizerMenu.setPropertyLockExpand(Vector3b.TRUE); - this.sizerMenu.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.setPropertyMinSize(new Dimension3f(new Vector3f(350, 10, 10), Distance.PIXEL)); - this.sizerMenu.setPropertyGravity(Gravity.TOP); - this.sizerMenuRoot.subWidgetAdd(this.sizerMenu); - - final Sizer sizerVertMain = new Sizer(DisplayMode.VERTICAL); - sizerVertMain.setPropertyExpand(Vector3b.TRUE); - sizerVertMain.setPropertyFill(Vector3b.TRUE); - sizerMain.subWidgetAdd(sizerVertMain); - - { - final Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_128, Distance.PIXEL)); - simpleSpacer.setPropertyColor(Color.ALICE_BLUE); - simpleSpacer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - simpleSpacer.setPropertyExpandIfFree(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - simpleSpacer.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - sizerVertMain.subWidgetAdd(simpleSpacer); - } - - this.sizerTestAreaHori = new Sizer(DisplayMode.HORIZONTAL); - this.sizerTestAreaHori.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - this.sizerTestAreaHori.setPropertyExpandIfFree(Vector3b.TRUE); - this.sizerTestAreaHori.setPropertyFill(Vector3b.TRUE_FALSE_FALSE); - sizerVertMain.subWidgetAdd(this.sizerTestAreaHori); - - { - final Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyColor(Color.DARK_GREEN); - simpleSpacer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - simpleSpacer.setPropertyExpandIfFree(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - simpleSpacer.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - sizerVertMain.subWidgetAdd(simpleSpacer); - } - } - - public void addButton(final Widget widget) { - this.sizerMenu.subWidgetAdd(widget); - } - - public void addMenuBoolean(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Boolean value) { - final CheckBox checkBox = new CheckBox("Y"); - checkBox.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - checkBox.setPropertyFill(Vector3b.TRUE); - checkBox.setPropertyValue(value); - this.sizerMenu.subWidgetAdd(checkBox); - final Connection con = checkBox.signalValue.connect((valueButton) -> { - try { - pojo.setExistingValue(widget, valueButton); - } catch (final AknotException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuDimension2f(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Dimension2f value) { - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("X"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.size().x()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Dimension2f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withX(valueButton))); - pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withX(valueButton))); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Y"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.size().y()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Dimension2f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withY(valueButton))); - pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withY(valueButton))); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - } - - public void addMenuDimension3f(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Dimension3f value) { - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("X"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.size().x()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Dimension3f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withX(valueButton))); - pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withX(valueButton))); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Y"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.size().y()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Dimension3f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withY(valueButton))); - pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withY(valueButton))); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Z"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.size().z()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Dimension3f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withSize(castedValue.size().withZ(valueButton))); - pojo.setExistingValue(widget, castedValue.withSize(castedValue.size().withZ(valueButton))); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - } - - public void addMenuDouble(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Double value) { - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) (double) value); - this.sizerMenu.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - LOGGER.warn("Set new value: {}", valueButton); - pojo.setExistingValue(widget, (double) valueButton); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuFloat(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Float value) { - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) (float) value); - this.sizerMenu.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - LOGGER.warn("Set new value: {}", valueButton); - pojo.setExistingValue(widget, (float) valueButton); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuGravity(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Gravity value) { - final Button buttonGravity = Button.createLabelButton("Gravity"); - buttonGravity.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - buttonGravity.setPropertyFill(Vector3b.TRUE); - buttonGravity.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - buttonGravity.setPropertyGravity(Gravity.CENTER); - this.sizerMenu.subWidgetAdd(buttonGravity); - final Label gravLabel = (Label) (buttonGravity.getSubWidgets()[0]); - gravLabel.setPropertyValue(LABEL_GRAVITY + Gravity.BOTTOM_LEFT); - - final Connection con = buttonGravity.signalClick.connect(() -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Gravity castedValue) { - Gravity state = castedValue; - // TODO: I change the gravity model to integrate the 3rd rank... - if (state.x() == GravityHorizontal.LEFT && state.y() == GravityVertical.BOTTOM) { - state = new Gravity(GravityHorizontal.CENTER, GravityVertical.BOTTOM, GravityDepth.CENTER); - } else if (state.x() == GravityHorizontal.CENTER && state.y() == GravityVertical.BOTTOM) { - state = new Gravity(GravityHorizontal.RIGHT, GravityVertical.BOTTOM, GravityDepth.CENTER); - } else if (state.x() == GravityHorizontal.RIGHT && state.y() == GravityVertical.BOTTOM) { - state = new Gravity(GravityHorizontal.LEFT, GravityVertical.CENTER, GravityDepth.CENTER); - - } else if (state.x() == GravityHorizontal.LEFT && state.y() == GravityVertical.CENTER) { - state = new Gravity(GravityHorizontal.CENTER, GravityVertical.CENTER, GravityDepth.CENTER); - } else if (state.x() == GravityHorizontal.CENTER && state.y() == GravityVertical.CENTER) { - state = new Gravity(GravityHorizontal.RIGHT, GravityVertical.CENTER, GravityDepth.CENTER); - } else if (state.x() == GravityHorizontal.RIGHT && state.y() == GravityVertical.CENTER) { - state = new Gravity(GravityHorizontal.LEFT, GravityVertical.TOP, GravityDepth.CENTER); - - } else if (state.x() == GravityHorizontal.LEFT && state.y() == GravityVertical.TOP) { - state = new Gravity(GravityHorizontal.CENTER, GravityVertical.TOP, GravityDepth.CENTER); - } else if (state.x() == GravityHorizontal.CENTER && state.y() == GravityVertical.TOP) { - state = new Gravity(GravityHorizontal.RIGHT, GravityVertical.TOP, GravityDepth.CENTER); - } else if (state.x() == GravityHorizontal.RIGHT && state.y() == GravityVertical.TOP) { - state = new Gravity(GravityHorizontal.LEFT, GravityVertical.BOTTOM, GravityDepth.CENTER); - } - gravLabel.setPropertyValue(LABEL_GRAVITY + state.toString()); - LOGGER.warn("Set new value: {}", state); - pojo.setExistingValue(widget, state); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuInt(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Integer value) { - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue(value); - this.sizerMenu.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - LOGGER.warn("Set new value: {}", valueButton); - pojo.setExistingValue(widget, (int) (long) valueButton); - - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuLong(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Long value) { - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue(value); - this.sizerMenu.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - LOGGER.warn("Set new value: {}", valueButton); - pojo.setExistingValue(widget, valueButton); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuString(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final String value) { - final Entry element = new Entry(); - element.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - element.setPropertyFill(Vector3b.TRUE); - element.setPropertyValue(value); - this.sizerMenu.subWidgetAdd(element); - final Connection con = element.signalModify.connect((valueButton) -> { - try { - LOGGER.warn("Set new value: {}", valueButton); - pojo.setExistingValue(widget, valueButton); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuURI(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Uri value) { - final Entry element = new Entry(); - element.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - element.setPropertyFill(Vector3b.TRUE); - element.setPropertyValue(value.toString()); - this.sizerMenu.subWidgetAdd(element); - final Connection con = element.signalModify.connect((valueButton) -> { - try { - LOGGER.warn("Set new value: {}", valueButton); - pojo.setExistingValue(widget, Uri.valueOf(valueButton)); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - public void addMenuVector2b(final Widget widget, final IntrospectionProperty pojo) { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Vector3b value) { - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - { - final CheckBox checkBox = new CheckBox("X"); - checkBox.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - checkBox.setPropertyFill(Vector3b.TRUE); - checkBox.setPropertyValue(value.x()); - lineSizer.subWidgetAdd(checkBox); - final Connection con = checkBox.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector2b castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withX(valueButton)); - pojo.setExistingValue(widget, castedValue.withX(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final CheckBox checkBox = new CheckBox("Y"); - checkBox.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - checkBox.setPropertyFill(Vector3b.TRUE); - checkBox.setPropertyValue(value.y()); - lineSizer.subWidgetAdd(checkBox); - final Connection con = checkBox.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector2b castedValue) { - pojo.setExistingValue(widget, castedValue.withY(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - } - - public void addMenuVector2f(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Vector2f value) { - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("X"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.x()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector2f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withX(valueButton)); - pojo.setExistingValue(widget, castedValue.withX(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Y"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.y()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector2f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withY(valueButton)); - pojo.setExistingValue(widget, castedValue.withY(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - } - - public void addMenuVector2i(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Vector2i value) { - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("X"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue(value.x()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector2i castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withX((int) (long) valueButton)); - pojo.setExistingValue(widget, castedValue.withX((int) (long) valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Y"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue(value.y()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector2i castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withY((int) (long) valueButton)); - pojo.setExistingValue(widget, castedValue.withY((int) (long) valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - } - - public void addMenuVector3b(final Widget widget, final IntrospectionProperty pojo) { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Vector3b value) { - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - { - final CheckBox checkBox = new CheckBox("X"); - checkBox.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - checkBox.setPropertyFill(Vector3b.TRUE); - checkBox.setPropertyValue(value.x()); - lineSizer.subWidgetAdd(checkBox); - final Connection con = checkBox.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3b castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withX(valueButton)); - pojo.setExistingValue(widget, castedValue.withX(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final CheckBox checkBox = new CheckBox("Y"); - checkBox.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - checkBox.setPropertyFill(Vector3b.TRUE); - checkBox.setPropertyValue(value.y()); - lineSizer.subWidgetAdd(checkBox); - final Connection con = checkBox.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3b castedValue) { - pojo.setExistingValue(widget, castedValue.withY(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final CheckBox checkBox = new CheckBox("Z"); - checkBox.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - checkBox.setPropertyFill(Vector3b.TRUE); - checkBox.setPropertyValue(value.z()); - lineSizer.subWidgetAdd(checkBox); - final Connection con = checkBox.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3b castedValue) { - pojo.setExistingValue(widget, castedValue.withZ(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - - } - - public void addMenuVector3f(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Vector3f value) { - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("X"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.x()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withX(valueButton)); - pojo.setExistingValue(widget, castedValue.withX(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Y"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.y()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withY(valueButton)); - pojo.setExistingValue(widget, castedValue.withY(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Z"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue((int) value.z()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3f castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withZ(valueButton)); - pojo.setExistingValue(widget, castedValue.withZ(valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - } - - public void addMenuVector3i(final Widget widget, final IntrospectionProperty pojo) { - Object valueRaw = null; - try { - valueRaw = pojo.getValue(widget); - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - if (valueRaw instanceof final Vector3i value) { - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("X"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue(value.x()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3i castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withX((int) (long) valueButton)); - pojo.setExistingValue(widget, castedValue.withX((int) (long) valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Y"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue(value.y()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3i castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withY((int) (long) valueButton)); - pojo.setExistingValue(widget, castedValue.withY((int) (long) valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - { - final Sizer lineSizer = new Sizer(DisplayMode.HORIZONTAL); - lineSizer.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - lineSizer.setPropertyFill(Vector3b.TRUE); - this.sizerMenu.subWidgetAdd(lineSizer); - - final Label simpleLabel = new Label("Z"); - simpleLabel.setPropertyExpand(Vector3b.FALSE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - lineSizer.subWidgetAdd(simpleLabel); - - final Spin spin = new Spin(); - spin.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - spin.setPropertyFill(Vector3b.TRUE); - spin.setPropertyValue(value.z()); - lineSizer.subWidgetAdd(spin); - final Connection con = spin.signalValue.connect((valueButton) -> { - try { - final Object oldValue = pojo.getValue(widget); - if (oldValue instanceof final Vector3i castedValue) { - LOGGER.warn("Set new value: {}", castedValue.withZ((int) (long) valueButton)); - pojo.setExistingValue(widget, castedValue.withZ((int) (long) valueButton)); - } - } catch (final AknotException e) { - e.printStackTrace(); - return; - } - }); - this.conections.add(con); - } - } - } - - public void connectAllSignals(final Widget widget, final IntrospectionModelComplex modelPojo) throws Exception { - LOGGER.warn("Connect all signal(s) on '{}'", widget.getName()); - final List signals = modelPojo.getSignals(); - for (final IntrospectionProperty pojo : signals) { - LOGGER.warn(" - '{}' otherNames={}", pojo.getBeanName(), Arrays.toString(pojo.getNames())); - LOGGER.warn(" ==> description='{}'", pojo.getDescription()); - LOGGER.warn(" ==> type='{}'", pojo.getType()); - LOGGER.warn(" ==> sub-type='{}'", pojo.getSubType()); - - final String eventName = pojo.getNames() != null && pojo.getNames().length != 0 ? pojo.getNames()[0] : pojo.getBeanName(); - - if (pojo.getSubType() != null && pojo.getType() == Signal.class) { - LOGGER.warn(" ** Signal<{}>", pojo.getSubType()); - final Object signalObject = pojo.getValue(widget); - if (signalObject == null) { - LOGGER.error("Signal is not accessible !!!!!!! "); - } else { - final String valueNameOfSignal = eventName; - @SuppressWarnings("unchecked") - final Signal tmp = (Signal) signalObject; - tmp.connect((object) -> { - LOGGER.print("Get event from '{}' value='{}'", valueNameOfSignal, object); - }); - } - } - if (pojo.getSubType() == null && pojo.getType() == SignalEmpty.class) { - LOGGER.warn(" ** SignalEmpty"); - final Object signalObject = pojo.getValue(widget); - if (signalObject == null) { - LOGGER.error("Signal is not accessible !!!!!!! "); - } else { - final String valueNameOfSignal = eventName; - final SignalEmpty tmp = (SignalEmpty) signalObject; - tmp.connect(() -> { - LOGGER.print("Get event from '{}'", valueNameOfSignal); - }); - } - - } - } - } - - public void displayAllPropertyWithType(final Widget widget, final IntrospectionModel modelPojo) throws Exception { - LOGGER.warn("Connect all property(ies) on '{}'", widget.getName()); - final List atributes = modelPojo.getAttributes(); - for (final IntrospectionProperty pojo : atributes) { - LOGGER.warn(" - '{}' otherNames={}", pojo.getBeanName(), Arrays.toString(pojo.getNames())); - LOGGER.warn(" ==> description='{}'", pojo.getDescription()); - LOGGER.warn(" ==> type='{}'", pojo.getType()); - LOGGER.warn(" ==> sub-type='{}'", pojo.getSubType()); - final String propertyName = pojo.getNames() != null && pojo.getNames().length != 0 ? pojo.getNames()[0] : pojo.getBeanName(); - if (pojo.getType() == int.class || pojo.getType() == Integer.class) { - addMenuInt(widget, pojo); - } else if (pojo.getType() == long.class || pojo.getType() == Long.class) { - addMenuLong(widget, pojo); - } else if (pojo.getType() == boolean.class || pojo.getType() == Boolean.class) { - addMenuBoolean(widget, pojo); - } else if (pojo.getType() == float.class || pojo.getType() == Float.class) { - addMenuFloat(widget, pojo); - } else if (pojo.getType() == double.class || pojo.getType() == Double.class) { - addMenuDouble(widget, pojo); - } else if (pojo.getType() == String.class) { - addMenuString(widget, pojo); - } else if (pojo.getType() == Vector3f.class) { - addMenuVector3f(widget, pojo); - } else if (pojo.getType() == Vector2f.class) { - addMenuVector2f(widget, pojo); - } else if (pojo.getType() == Vector3b.class) { - addMenuVector3b(widget, pojo); - } else if (pojo.getType() == Vector2b.class) { - addMenuVector2b(widget, pojo); - } else if (pojo.getType() == Vector3i.class) { - addMenuVector3i(widget, pojo); - } else if (pojo.getType() == Vector2i.class) { - addMenuVector2i(widget, pojo); - } else if (pojo.getType() == Dimension3f.class) { - addMenuDimension3f(widget, pojo); - } else if (pojo.getType() == Dimension2f.class) { - addMenuDimension2f(widget, pojo); - } else if (pojo.getType() == DisplayMode.class) { - LOGGER.error(" ==> plop"); - } else if (pojo.getType() == Uri.class) { - addMenuURI(widget, pojo); - } else if (pojo.getType() == Gravity.class) { - addMenuGravity(widget, pojo); - } else { - LOGGER.error(" ==> property type unknown='{}'", pojo.getType()); - } - { - final Label simpleLabel = new Label("" + propertyName + ":"); - simpleLabel.setPropertyExpand(Vector3b.TRUE_FALSE_FALSE); - simpleLabel.setPropertyFill(Vector3b.FALSE); - simpleLabel.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - simpleLabel.setPropertyGravity(Gravity.LEFT); - this.sizerMenu.subWidgetAdd(simpleLabel); - } - } - } - - public void requestNext() { - // nothing to do ... - } - - public void setTestWidget(final Widget widget) { - this.sizerMenu.subWidgetRemoveAll(); - try { - final IntrospectionModelComplex modelPojo = new IntrospectionModelComplex(widget.getClass()); - - connectAllSignals(widget, modelPojo); - displayAllPropertyWithType(widget, modelPojo); - } catch (final Exception e) { - e.printStackTrace(); - } - this.sizerTestAreaHori.subWidgetRemoveAll(); - { - final Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyColor(Color.CHOCOLATE); - simpleSpacer.setPropertyExpand(Vector3b.FALSE); - simpleSpacer.setPropertyExpandIfFree(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - simpleSpacer.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - this.sizerTestAreaHori.subWidgetAdd(simpleSpacer); - } - this.testWidget = widget; - this.sizerTestAreaHori.subWidgetAdd(this.testWidget); - { - final Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyColor(Color.GREEN_YELLOW); - simpleSpacer.setPropertyExpand(Vector3b.FALSE); - simpleSpacer.setPropertyExpandIfFree(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - simpleSpacer.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - this.sizerTestAreaHori.subWidgetAdd(simpleSpacer); - } - // update properties... - //final Vector3b stateExpand = this.testWidget.getPropertyExpand(); - //this.buttonExpandX.setPropertyValue(stateExpand.x()); - //this.buttonExpandY.setPropertyValue(stateExpand.y()); - //final Vector3b stateFill = this.testWidget.getPropertyFill(); - //this.buttonFillX.setPropertyValue(stateFill.x()); - //this.buttonFillY.setPropertyValue(stateFill.y()); - - //final Gravity gravity = this.testWidget.getPropertyGravity(); - //final Label gravLabel = (Label) (this.buttonGravity.getSubWidgets()[0]); - //gravLabel.setPropertyValue(LABEL_GRAVITY + gravity.toString()); - } - -} \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ewol/ComplexWindiows1/Appl.java b/samples/src/sample/atriasoft/ewol/ComplexWindiows1/Appl.java deleted file mode 100644 index 9317a4d..0000000 --- a/samples/src/sample/atriasoft/ewol/ComplexWindiows1/Appl.java +++ /dev/null @@ -1,82 +0,0 @@ -package sample.atriasoft.ewol.ComplexWindiows1; - -import org.atriasoft.etk.Configs; -import org.atriasoft.etk.math.Vector2f; -import org.atriasoft.ewol.context.EwolApplication; -import org.atriasoft.ewol.context.EwolContext; - -import sample.atriasoft.ewol.Log; - -public class Appl implements EwolApplication { - - //! [ewol_sample_HW_main_application] - private void localCreate(final EwolContext context) { - //! [ewol_sample_HW_main_parse_arguments] - // parse all the argument of the application - for (int iii = 0; iii < context.getCmd().size(); iii++) { - String tmpppp = context.getCmd().get(iii); - if (tmpppp == "-h" || tmpppp == "--help") { - LOGGER.print(" -h/--help display this help"); - System.exit(0); - } - } - //! [ewol_sample_HW_main_parse_arguments] - //! [ewol_sample_HW_main_set_windows_size] - // TODO : Remove this: Move if in the windows properties - context.setSize(new Vector2f(800, 600)); - //! [ewol_sample_HW_main_set_windows_size] - //! [ewol_sample_HW_main_set_font_property] - // select font preference of der with a basic application size - Configs.getConfigFonts().set("FreeSherif", 12); - //! [ewol_sample_HW_main_set_font_property] - //! [ewol_sample_HW_main_set_windows] - // Create the windows - MainWindows basicWindows = new MainWindows(); - // configure the ewol context to use the new windows - context.setWindows(basicWindows); - //! [ewol_sample_HW_main_set_windows] - } - - @Override - public void onCreate(final EwolContext context) { - LOGGER.info("Application onCreate: [BEGIN]"); - localCreate(context); - LOGGER.info("Application onCreate: [ END ]"); - } - - @Override - public void onDestroy(final EwolContext context) { - LOGGER.info("Application onDestroy: [BEGIN]"); - - LOGGER.info("Application onDestroy: [ END ]"); - } - - @Override - public void onPause(final EwolContext context) { - LOGGER.info("Application onPause: [BEGIN]"); - - LOGGER.info("Application onPause: [ END ]"); - } - - @Override - public void onResume(final EwolContext context) { - LOGGER.info("Application onResume: [BEGIN]"); - - LOGGER.info("Application onResume: [ END ]"); - } - - @Override - public void onStart(final EwolContext context) { - LOGGER.info("Application onStart: [BEGIN]"); - - LOGGER.info("Application onStart: [ END ]"); - } - - @Override - public void onStop(final EwolContext context) { - LOGGER.info("Application onStop: [BEGIN]"); - - LOGGER.info("Application onStop: [ END ]"); - } - -} \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ewol/ComplexWindiows1/ComplexeWindows1Main.java b/samples/src/sample/atriasoft/ewol/ComplexWindiows1/ComplexeWindows1Main.java deleted file mode 100644 index e1367cd..0000000 --- a/samples/src/sample/atriasoft/ewol/ComplexWindiows1/ComplexeWindows1Main.java +++ /dev/null @@ -1,15 +0,0 @@ -package sample.atriasoft.ewol.ComplexWindiows1; - -import org.atriasoft.etk.Uri; -import org.atriasoft.ewol.Ewol; - -public class ComplexeWindows1Main { - public static void main(final String[] args) { - Ewol.init(); - //Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/"); - Uri.setApplication(ComplexeWindows1Main.class); - Ewol.run(new Appl(), args); - } - - private ComplexeWindows1Main() {} -} diff --git a/samples/src/sample/atriasoft/ewol/ComplexWindiows1/MainWindows.java b/samples/src/sample/atriasoft/ewol/ComplexWindiows1/MainWindows.java deleted file mode 100644 index 8c01cf4..0000000 --- a/samples/src/sample/atriasoft/ewol/ComplexWindiows1/MainWindows.java +++ /dev/null @@ -1,71 +0,0 @@ -package sample.atriasoft.ewol.ComplexWindiows1; - -import org.atriasoft.etk.Color; -import org.atriasoft.etk.Dimension3f; -import org.atriasoft.etk.Distance; -import org.atriasoft.etk.math.Vector3b; -import org.atriasoft.etk.math.Vector3f; -import org.atriasoft.ewol.widget.Sizer; -import org.atriasoft.ewol.widget.Sizer.DisplayMode; -import org.atriasoft.ewol.widget.Spacer; -import org.atriasoft.ewol.widget.Windows; - -public class MainWindows extends Windows { - - public MainWindows() { - //! [ewol_sample_HW_windows_title] - setPropertyTitle("Simple sample test"); - //EwolObject.getContext().getFontDefault().setName("FreeSans"); - Sizer sizerMain = new Sizer(DisplayMode.VERTICAL); - sizerMain.setPropertyExpand(Vector3b.TRUE); - sizerMain.setPropertyFill(Vector3b.TRUE); - setSubWidget(sizerMain); - - Sizer sizerHori1 = new Sizer(DisplayMode.HORIZONTAL); - sizerHori1.setPropertyExpand(Vector3b.TRUE); - sizerHori1.setPropertyFill(Vector3b.TRUE); - sizerMain.subWidgetAdd(sizerHori1); - - Sizer sizerHori2 = new Sizer(DisplayMode.HORIZONTAL); - sizerHori2.setPropertyExpand(Vector3b.TRUE); - sizerHori2.setPropertyFill(Vector3b.TRUE); - sizerMain.subWidgetAdd(sizerHori2); - - { - Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyMinSize(new Dimension3f(new Vector3f(100, 100, 100), Distance.PIXEL)); - simpleSpacer.setPropertyColor(Color.ALICE_BLUE); - simpleSpacer.setPropertyExpand(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - sizerHori1.subWidgetAdd(simpleSpacer); - } - { - Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyColor(Color.DARK_GREEN); - simpleSpacer.setPropertyExpand(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - sizerHori1.subWidgetAdd(simpleSpacer); - } - { - Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyColor(Color.CHOCOLATE); - simpleSpacer.setPropertyExpand(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - sizerHori1.subWidgetAdd(simpleSpacer); - } - { - Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyColor(Color.GREEN_YELLOW); - simpleSpacer.setPropertyExpand(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - sizerHori2.subWidgetAdd(simpleSpacer); - } - { - Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyColor(Color.PINK); - simpleSpacer.setPropertyExpand(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - sizerHori2.subWidgetAdd(simpleSpacer); - } - } -} diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/Appl.java b/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/Appl.java deleted file mode 100644 index cfad0f5..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/Appl.java +++ /dev/null @@ -1,82 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsLabel; - -import org.atriasoft.etk.Configs; -import org.atriasoft.etk.math.Vector2f; -import org.atriasoft.ewol.context.EwolApplication; -import org.atriasoft.ewol.context.EwolContext; - -import sample.atriasoft.ewol.Log; - -public class Appl implements EwolApplication { - - //! [ewol_sample_HW_main_application] - private void localCreate(final EwolContext context) { - //! [ewol_sample_HW_main_parse_arguments] - // parse all the argument of the application - for (int iii = 0; iii < context.getCmd().size(); iii++) { - String tmpppp = context.getCmd().get(iii); - if (tmpppp == "-h" || tmpppp == "--help") { - LOGGER.print(" -h/--help display this help"); - System.exit(0); - } - } - //! [ewol_sample_HW_main_parse_arguments] - //! [ewol_sample_HW_main_set_windows_size] - // TODO : Remove this: Move if in the windows properties - context.setSize(new Vector2f(800, 600)); - //! [ewol_sample_HW_main_set_windows_size] - //! [ewol_sample_HW_main_set_font_property] - // select font preference of der with a basic application size - Configs.getConfigFonts().set("FreeSherif", 12); - //! [ewol_sample_HW_main_set_font_property] - //! [ewol_sample_HW_main_set_windows] - // Create the windows - MainWindows basicWindows = new MainWindows(); - // configure the ewol context to use the new windows - context.setWindows(basicWindows); - //! [ewol_sample_HW_main_set_windows] - } - - @Override - public void onCreate(final EwolContext context) { - LOGGER.info("Application onCreate: [BEGIN]"); - localCreate(context); - LOGGER.info("Application onCreate: [ END ]"); - } - - @Override - public void onDestroy(final EwolContext context) { - LOGGER.info("Application onDestroy: [BEGIN]"); - - LOGGER.info("Application onDestroy: [ END ]"); - } - - @Override - public void onPause(final EwolContext context) { - LOGGER.info("Application onPause: [BEGIN]"); - - LOGGER.info("Application onPause: [ END ]"); - } - - @Override - public void onResume(final EwolContext context) { - LOGGER.info("Application onResume: [BEGIN]"); - - LOGGER.info("Application onResume: [ END ]"); - } - - @Override - public void onStart(final EwolContext context) { - LOGGER.info("Application onStart: [BEGIN]"); - - LOGGER.info("Application onStart: [ END ]"); - } - - @Override - public void onStop(final EwolContext context) { - LOGGER.info("Application onStop: [BEGIN]"); - - LOGGER.info("Application onStop: [ END ]"); - } - -} \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/MainWindows.java b/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/MainWindows.java deleted file mode 100644 index 02fc42e..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/MainWindows.java +++ /dev/null @@ -1,31 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsLabel; - -import org.atriasoft.etk.math.Vector3b; -import org.atriasoft.ewol.widget.Label; -import org.atriasoft.ewol.widget.Spacer; - -import sample.atriasoft.ewol.BasicWindows; - -public class MainWindows extends BasicWindows { - - public MainWindows() { - //! [ewol_sample_HW_windows_title] - setPropertyTitle("Simple sample test"); - //EwolObject.getContext().getFontDefault().setName("FreeSans"); - //! [ewol_sample_HW_windows_label] - if (true) { - //! [ewol_sample_HW_windows_title] - final Label simpleLabel = new Label(); - simpleLabel.setPropertyValue("Hello. World

- How are You ???
- Not so Well, I break my leg.

The end
"); - simpleLabel.setPropertyExpand(Vector3b.TRUE); - simpleLabel.setPropertyFill(Vector3b.TRUE); - this.setTestWidget(simpleLabel); - //! [ewol_sample_HW_windows_label] - } else { - final Spacer simpleSpacer = new Spacer(); - simpleSpacer.setPropertyExpand(Vector3b.TRUE); - simpleSpacer.setPropertyFill(Vector3b.TRUE); - this.setTestWidget(simpleSpacer); - } - } -} diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/SimpleWindowsLabelMain.java b/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/SimpleWindowsLabelMain.java deleted file mode 100644 index 6434b8a..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsLabel/SimpleWindowsLabelMain.java +++ /dev/null @@ -1,15 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsLabel; - -import org.atriasoft.etk.Uri; -import org.atriasoft.ewol.Ewol; - -public class SimpleWindowsLabelMain { - public static void main(final String[] args) { - Ewol.init(); - //Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/"); - Uri.setApplication(SimpleWindowsLabelMain.class); - Ewol.run(new Appl(), args); - } - - private SimpleWindowsLabelMain() {} -} diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/Appl.java b/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/Appl.java deleted file mode 100644 index e9eed65..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/Appl.java +++ /dev/null @@ -1,82 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsWithCheckBox; - -import org.atriasoft.etk.Configs; -import org.atriasoft.etk.math.Vector2f; -import org.atriasoft.ewol.context.EwolApplication; -import org.atriasoft.ewol.context.EwolContext; - -import sample.atriasoft.ewol.Log; - -public class Appl implements EwolApplication { - - //! [ewol_sample_HW_main_application] - private void localCreate(final EwolContext context) { - //! [ewol_sample_HW_main_parse_arguments] - // parse all the argument of the application - for (int iii = 0; iii < context.getCmd().size(); iii++) { - String tmpppp = context.getCmd().get(iii); - if (tmpppp == "-h" || tmpppp == "--help") { - LOGGER.print(" -h/--help display this help"); - System.exit(0); - } - } - //! [ewol_sample_HW_main_parse_arguments] - //! [ewol_sample_HW_main_set_windows_size] - // TODO : Remove this: Move if in the windows properties - context.setSize(new Vector2f(800, 600)); - //! [ewol_sample_HW_main_set_windows_size] - //! [ewol_sample_HW_main_set_font_property] - // select font preference of der with a basic application size - Configs.getConfigFonts().set("FreeSherif", 12); - //! [ewol_sample_HW_main_set_font_property] - //! [ewol_sample_HW_main_set_windows] - // Create the windows - MainWindows basicWindows = new MainWindows(); - // configure the ewol context to use the new windows - context.setWindows(basicWindows); - //! [ewol_sample_HW_main_set_windows] - } - - @Override - public void onCreate(final EwolContext context) { - LOGGER.info("Application onCreate: [BEGIN]"); - localCreate(context); - LOGGER.info("Application onCreate: [ END ]"); - } - - @Override - public void onDestroy(final EwolContext context) { - LOGGER.info("Application onDestroy: [BEGIN]"); - - LOGGER.info("Application onDestroy: [ END ]"); - } - - @Override - public void onPause(final EwolContext context) { - LOGGER.info("Application onPause: [BEGIN]"); - - LOGGER.info("Application onPause: [ END ]"); - } - - @Override - public void onResume(final EwolContext context) { - LOGGER.info("Application onResume: [BEGIN]"); - - LOGGER.info("Application onResume: [ END ]"); - } - - @Override - public void onStart(final EwolContext context) { - LOGGER.info("Application onStart: [BEGIN]"); - - LOGGER.info("Application onStart: [ END ]"); - } - - @Override - public void onStop(final EwolContext context) { - LOGGER.info("Application onStop: [BEGIN]"); - - LOGGER.info("Application onStop: [ END ]"); - } - -} \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/MainWindows.java b/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/MainWindows.java deleted file mode 100644 index 8b0f4f5..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/MainWindows.java +++ /dev/null @@ -1,29 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsWithCheckBox; - -import org.atriasoft.etk.math.Vector3b; -import org.atriasoft.ewol.widget.CheckBox; - -import sample.atriasoft.ewol.BasicWindows; - -public class MainWindows extends BasicWindows { - - CheckBox testWidget; - - public MainWindows() { - //! [ewol_sample_HW_windows_title] - setPropertyTitle("Simple CheckBox"); - - this.testWidget = new CheckBox("Hello, how Are You?
second-life?"); - //this.testWidget.setPropertySource(new Uri("DATA", "mireA.png")); - this.testWidget.setPropertyExpand(Vector3b.TRUE); - this.testWidget.setPropertyFill(Vector3b.TRUE); - this.setTestWidget(this.testWidget); - /* - Button simpleButton = new Button(); - simpleButton.setPropertyValue("Top Button"); - simpleButton.setPropertyExpand(Vector3b.TRUE); - simpleButton.setPropertyFill(Vector3b.TRUE); - this.setTestWidget(simpleButton); - */ - } -} diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/SimpleWindowsWithCheckBoxMain.java b/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/SimpleWindowsWithCheckBoxMain.java deleted file mode 100644 index 7733474..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsWithCheckBox/SimpleWindowsWithCheckBoxMain.java +++ /dev/null @@ -1,15 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsWithCheckBox; - -import org.atriasoft.etk.Uri; -import org.atriasoft.ewol.Ewol; - -public class SimpleWindowsWithCheckBoxMain { - public static void main(final String[] args) { - Ewol.init(); - //Uri.addLibrary("test-data", SimpleWindowsWithImageMain.class, "test-ewol/"); - Uri.setApplication(SimpleWindowsWithCheckBoxMain.class, "test-ewol/"); - Ewol.run(new Appl(), args); - } - - private SimpleWindowsWithCheckBoxMain() {} -} diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/Appl.java b/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/Appl.java deleted file mode 100644 index 525d161..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/Appl.java +++ /dev/null @@ -1,82 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsWithImage; - -import org.atriasoft.etk.Configs; -import org.atriasoft.etk.math.Vector2f; -import org.atriasoft.ewol.context.EwolApplication; -import org.atriasoft.ewol.context.EwolContext; - -import sample.atriasoft.ewol.Log; - -public class Appl implements EwolApplication { - - //! [ewol_sample_HW_main_application] - private void localCreate(final EwolContext context) { - //! [ewol_sample_HW_main_parse_arguments] - // parse all the argument of the application - for (int iii = 0; iii < context.getCmd().size(); iii++) { - String tmpppp = context.getCmd().get(iii); - if (tmpppp == "-h" || tmpppp == "--help") { - LOGGER.print(" -h/--help display this help"); - System.exit(0); - } - } - //! [ewol_sample_HW_main_parse_arguments] - //! [ewol_sample_HW_main_set_windows_size] - // TODO : Remove this: Move if in the windows properties - context.setSize(new Vector2f(800, 600)); - //! [ewol_sample_HW_main_set_windows_size] - //! [ewol_sample_HW_main_set_font_property] - // select font preference of der with a basic application size - Configs.getConfigFonts().set("FreeSherif", 12); - //! [ewol_sample_HW_main_set_font_property] - //! [ewol_sample_HW_main_set_windows] - // Create the windows - MainWindows basicWindows = new MainWindows(); - // configure the ewol context to use the new windows - context.setWindows(basicWindows); - //! [ewol_sample_HW_main_set_windows] - } - - @Override - public void onCreate(final EwolContext context) { - LOGGER.info("Application onCreate: [BEGIN]"); - localCreate(context); - LOGGER.info("Application onCreate: [ END ]"); - } - - @Override - public void onDestroy(final EwolContext context) { - LOGGER.info("Application onDestroy: [BEGIN]"); - - LOGGER.info("Application onDestroy: [ END ]"); - } - - @Override - public void onPause(final EwolContext context) { - LOGGER.info("Application onPause: [BEGIN]"); - - LOGGER.info("Application onPause: [ END ]"); - } - - @Override - public void onResume(final EwolContext context) { - LOGGER.info("Application onResume: [BEGIN]"); - - LOGGER.info("Application onResume: [ END ]"); - } - - @Override - public void onStart(final EwolContext context) { - LOGGER.info("Application onStart: [BEGIN]"); - - LOGGER.info("Application onStart: [ END ]"); - } - - @Override - public void onStop(final EwolContext context) { - LOGGER.info("Application onStop: [BEGIN]"); - - LOGGER.info("Application onStop: [ END ]"); - } - -} \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/MainWindows.java b/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/MainWindows.java deleted file mode 100644 index 4bf5a95..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/MainWindows.java +++ /dev/null @@ -1,57 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsWithImage; - -import org.atriasoft.etk.Dimension3f; -import org.atriasoft.etk.Distance; -import org.atriasoft.etk.Uri; -import org.atriasoft.etk.math.Vector3b; -import org.atriasoft.etk.math.Vector3f; -import org.atriasoft.ewol.widget.Button; -import org.atriasoft.ewol.widget.ImageDisplay; - -import sample.atriasoft.ewol.BasicWindows; - -public class MainWindows extends BasicWindows { - - public static void eventButtonChangeImage(final MainWindows self, final Boolean value) { - if (value) { - self.testWidget.setPropertySource(new Uri("DATA", "mireC.png")); - } else { - self.testWidget.setPropertySource(new Uri("DATA", "mireA.png")); - } - } - - public static void eventButtonChangeKeepRatio(final MainWindows self) { - final boolean state = self.testWidget.isPropertyKeepRatio(); - self.testWidget.setPropertyKeepRatio(!state); - //self.buttonAspectRatio.setPropertyValue(state ? "fkeep aspect ratio" : "un-keep aspect ratio"); - } - - ImageDisplay testWidget; - Button buttonAspectRatio; - - public MainWindows() { - //! [ewol_sample_HW_windows_title] - setPropertyTitle("Simple Image"); - - this.testWidget = new ImageDisplay(); - this.testWidget.setPropertySource(new Uri("DATA", "mireA.png")); - this.testWidget.setPropertyExpand(Vector3b.TRUE); - this.testWidget.setPropertyFill(Vector3b.TRUE); - this.testWidget.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - this.setTestWidget(this.testWidget); - { - final Button button = Button.createToggleLabelButton("mireA.png", "mireC.png"); - button.setPropertyExpand(Vector3b.FALSE); - button.setPropertyFill(Vector3b.FALSE); - button.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - this.addButton(button); - button.signalValue.connectAuto(this, MainWindows::eventButtonChangeImage); - } - this.buttonAspectRatio = Button.createLabelButton("keep aspect ratio"); - this.buttonAspectRatio.setPropertyExpand(Vector3b.FALSE); - this.buttonAspectRatio.setPropertyFill(Vector3b.FALSE); - this.buttonAspectRatio.setPropertyMinSize(new Dimension3f(Vector3f.VALUE_16, Distance.PIXEL)); - this.addButton(this.buttonAspectRatio); - this.buttonAspectRatio.signalClick.connectAuto(this, MainWindows::eventButtonChangeKeepRatio); - } -} diff --git a/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/SimpleWindowsWithImageMain.java b/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/SimpleWindowsWithImageMain.java deleted file mode 100644 index 5f1261a..0000000 --- a/samples/src/sample/atriasoft/ewol/simpleWindowsWithImage/SimpleWindowsWithImageMain.java +++ /dev/null @@ -1,15 +0,0 @@ -package sample.atriasoft.ewol.simpleWindowsWithImage; - -import org.atriasoft.etk.Uri; -import org.atriasoft.ewol.Ewol; - -public class SimpleWindowsWithImageMain { - public static void main(final String[] args) { - Ewol.init(); - //Uri.addLibrary("test-data", SimpleWindowsWithImageMain.class, "test-ewol/"); - Uri.setApplication(SimpleWindowsWithImageMain.class, "test-ewol/"); - Ewol.run(new Appl(), args); - } - - private SimpleWindowsWithImageMain() {} -} diff --git a/samples/src/sample/atriasoft/ewol/validationWidget/Appl.java b/samples/src/sample/atriasoft/ewol/validationWidget/Appl.java deleted file mode 100644 index cec8d5e..0000000 --- a/samples/src/sample/atriasoft/ewol/validationWidget/Appl.java +++ /dev/null @@ -1,82 +0,0 @@ -package sample.atriasoft.ewol.validationWidget; - -import org.atriasoft.etk.Configs; -import org.atriasoft.etk.math.Vector2f; -import org.atriasoft.ewol.context.EwolApplication; -import org.atriasoft.ewol.context.EwolContext; - -import sample.atriasoft.ewol.Log; - -public class Appl implements EwolApplication { - - //! [ewol_sample_HW_main_application] - private void localCreate(final EwolContext context) { - //! [ewol_sample_HW_main_parse_arguments] - // parse all the argument of the application - for (int iii = 0; iii < context.getCmd().size(); iii++) { - final String tmpppp = context.getCmd().get(iii); - if (tmpppp == "-h" || tmpppp == "--help") { - LOGGER.print(" -h/--help display this help"); - System.exit(0); - } - } - //! [ewol_sample_HW_main_parse_arguments] - //! [ewol_sample_HW_main_set_windows_size] - // TODO : Remove this: Move if in the windows properties - context.setSize(new Vector2f(800, 600)); - //! [ewol_sample_HW_main_set_windows_size] - //! [ewol_sample_HW_main_set_font_property] - // select font preference of der with a basic application size - Configs.getConfigFonts().set("FreeSherif", 12); - //! [ewol_sample_HW_main_set_font_property] - //! [ewol_sample_HW_main_set_windows] - // Create the windows - final MainWindows basicWindows = new MainWindows(); - // configure the ewol context to use the new windows - context.setWindows(basicWindows); - //! [ewol_sample_HW_main_set_windows] - } - - @Override - public void onCreate(final EwolContext context) { - LOGGER.info("Application onCreate: [BEGIN]"); - localCreate(context); - LOGGER.info("Application onCreate: [ END ]"); - } - - @Override - public void onDestroy(final EwolContext context) { - LOGGER.info("Application onDestroy: [BEGIN]"); - - LOGGER.info("Application onDestroy: [ END ]"); - } - - @Override - public void onPause(final EwolContext context) { - LOGGER.info("Application onPause: [BEGIN]"); - - LOGGER.info("Application onPause: [ END ]"); - } - - @Override - public void onResume(final EwolContext context) { - LOGGER.info("Application onResume: [BEGIN]"); - - LOGGER.info("Application onResume: [ END ]"); - } - - @Override - public void onStart(final EwolContext context) { - LOGGER.info("Application onStart: [BEGIN]"); - - LOGGER.info("Application onStart: [ END ]"); - } - - @Override - public void onStop(final EwolContext context) { - LOGGER.info("Application onStop: [BEGIN]"); - - LOGGER.info("Application onStop: [ END ]"); - } - -} \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ewol/validationWidget/MainWindows.java b/samples/src/sample/atriasoft/ewol/validationWidget/MainWindows.java deleted file mode 100644 index db33935..0000000 --- a/samples/src/sample/atriasoft/ewol/validationWidget/MainWindows.java +++ /dev/null @@ -1,66 +0,0 @@ -package sample.atriasoft.ewol.validationWidget; - -import java.util.ArrayList; -import java.util.List; - -import org.atriasoft.ewol.widget.Composer; -import org.atriasoft.ewol.widget.Widget; - -import sample.atriasoft.ewol.BasicWindows; - -public class MainWindows extends BasicWindows { - - private int index = -1; - private final List values = new ArrayList<>(); - private final List titles = new ArrayList<>(); - - public MainWindows() { - setPropertyTitle("Test all compositing"); - - this.titles.add("test Slider"); - this.values.add(""" - - """); - this.titles.add("test Entry"); - this.values.add(""" - - """); - - this.titles.add("test button"); - this.values.add(""" - - """); - - this.titles.add("test button toogle"); - this.values.add(""" - - """); - this.titles.add("test checkBox"); - this.values.add(""" - - - """); - // set first item - requestNext(); - } - - @Override - public void requestNext() { - System.out.print("Request change !!!!"); - this.index++; - setPropertyTitle(this.titles.get(this.index)); - - final String dataString = this.values.get(this.index); - final Widget data = Composer.composerGenerateString(dataString); - this.setTestWidget(data); - } -} diff --git a/samples/src/sample/atriasoft/ewol/validationWidget/ValidatorMain.java b/samples/src/sample/atriasoft/ewol/validationWidget/ValidatorMain.java deleted file mode 100644 index ccbecd1..0000000 --- a/samples/src/sample/atriasoft/ewol/validationWidget/ValidatorMain.java +++ /dev/null @@ -1,15 +0,0 @@ -package sample.atriasoft.ewol.validationWidget; - -import org.atriasoft.etk.Uri; -import org.atriasoft.ewol.Ewol; - -public class ValidatorMain { - public static void main(final String[] args) { - Ewol.init(); - //Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/"); - Uri.setApplication(MainWindows.class); - Ewol.run(new Appl(), args); - } - - private ValidatorMain() {} -} diff --git a/src/org/atriasoft/etranslate/ETranslate.java b/src/main/org/atriasoft/etranslate/ETranslate.java similarity index 100% rename from src/org/atriasoft/etranslate/ETranslate.java rename to src/main/org/atriasoft/etranslate/ETranslate.java diff --git a/src/org/atriasoft/ewol/DrawProperty.java b/src/main/org/atriasoft/ewol/DrawProperty.java similarity index 100% rename from src/org/atriasoft/ewol/DrawProperty.java rename to src/main/org/atriasoft/ewol/DrawProperty.java diff --git a/src/org/atriasoft/ewol/Ewol.java b/src/main/org/atriasoft/ewol/Ewol.java similarity index 100% rename from src/org/atriasoft/ewol/Ewol.java rename to src/main/org/atriasoft/ewol/Ewol.java diff --git a/src/org/atriasoft/ewol/Gravity.java b/src/main/org/atriasoft/ewol/Gravity.java similarity index 100% rename from src/org/atriasoft/ewol/Gravity.java rename to src/main/org/atriasoft/ewol/Gravity.java diff --git a/src/org/atriasoft/ewol/GravityDepth.java b/src/main/org/atriasoft/ewol/GravityDepth.java similarity index 100% rename from src/org/atriasoft/ewol/GravityDepth.java rename to src/main/org/atriasoft/ewol/GravityDepth.java diff --git a/src/org/atriasoft/ewol/GravityHorizontal.java b/src/main/org/atriasoft/ewol/GravityHorizontal.java similarity index 100% rename from src/org/atriasoft/ewol/GravityHorizontal.java rename to src/main/org/atriasoft/ewol/GravityHorizontal.java diff --git a/src/org/atriasoft/ewol/GravityVertical.java b/src/main/org/atriasoft/ewol/GravityVertical.java similarity index 100% rename from src/org/atriasoft/ewol/GravityVertical.java rename to src/main/org/atriasoft/ewol/GravityVertical.java diff --git a/src/org/atriasoft/ewol/HighSpeedMode.java b/src/main/org/atriasoft/ewol/HighSpeedMode.java similarity index 100% rename from src/org/atriasoft/ewol/HighSpeedMode.java rename to src/main/org/atriasoft/ewol/HighSpeedMode.java diff --git a/src/org/atriasoft/ewol/Padding.java b/src/main/org/atriasoft/ewol/Padding.java similarity index 100% rename from src/org/atriasoft/ewol/Padding.java rename to src/main/org/atriasoft/ewol/Padding.java diff --git a/src/org/atriasoft/ewol/compositing/AlignMode.java b/src/main/org/atriasoft/ewol/compositing/AlignMode.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/AlignMode.java rename to src/main/org/atriasoft/ewol/compositing/AlignMode.java diff --git a/src/org/atriasoft/ewol/compositing/Compositing.java b/src/main/org/atriasoft/ewol/compositing/Compositing.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/Compositing.java rename to src/main/org/atriasoft/ewol/compositing/Compositing.java diff --git a/src/org/atriasoft/ewol/compositing/CompositingDrawing.java b/src/main/org/atriasoft/ewol/compositing/CompositingDrawing.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/CompositingDrawing.java rename to src/main/org/atriasoft/ewol/compositing/CompositingDrawing.java diff --git a/src/org/atriasoft/ewol/compositing/CompositingGraphicContext.java b/src/main/org/atriasoft/ewol/compositing/CompositingGraphicContext.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/CompositingGraphicContext.java rename to src/main/org/atriasoft/ewol/compositing/CompositingGraphicContext.java diff --git a/src/org/atriasoft/ewol/compositing/CompositingImage.java b/src/main/org/atriasoft/ewol/compositing/CompositingImage.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/CompositingImage.java rename to src/main/org/atriasoft/ewol/compositing/CompositingImage.java diff --git a/src/org/atriasoft/ewol/compositing/CompositingText.java b/src/main/org/atriasoft/ewol/compositing/CompositingText.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/CompositingText.java rename to src/main/org/atriasoft/ewol/compositing/CompositingText.java diff --git a/src/org/atriasoft/ewol/compositing/GuiShape.java b/src/main/org/atriasoft/ewol/compositing/GuiShape.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/GuiShape.java rename to src/main/org/atriasoft/ewol/compositing/GuiShape.java diff --git a/src/org/atriasoft/ewol/compositing/GuiShapeMode.java b/src/main/org/atriasoft/ewol/compositing/GuiShapeMode.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/GuiShapeMode.java rename to src/main/org/atriasoft/ewol/compositing/GuiShapeMode.java diff --git a/src/org/atriasoft/ewol/compositing/ShapeBox.java b/src/main/org/atriasoft/ewol/compositing/ShapeBox.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/ShapeBox.java rename to src/main/org/atriasoft/ewol/compositing/ShapeBox.java diff --git a/src/org/atriasoft/ewol/compositing/Shaper.cpp b/src/main/org/atriasoft/ewol/compositing/Shaper.cpp similarity index 100% rename from src/org/atriasoft/ewol/compositing/Shaper.cpp rename to src/main/org/atriasoft/ewol/compositing/Shaper.cpp diff --git a/src/org/atriasoft/ewol/compositing/TextBase.java b/src/main/org/atriasoft/ewol/compositing/TextBase.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/TextBase.java rename to src/main/org/atriasoft/ewol/compositing/TextBase.java diff --git a/src/org/atriasoft/ewol/compositing/tools/TextDecoration.java b/src/main/org/atriasoft/ewol/compositing/tools/TextDecoration.java similarity index 100% rename from src/org/atriasoft/ewol/compositing/tools/TextDecoration.java rename to src/main/org/atriasoft/ewol/compositing/tools/TextDecoration.java diff --git a/src/org/atriasoft/ewol/context/EwolApplication.java b/src/main/org/atriasoft/ewol/context/EwolApplication.java similarity index 100% rename from src/org/atriasoft/ewol/context/EwolApplication.java rename to src/main/org/atriasoft/ewol/context/EwolApplication.java diff --git a/src/org/atriasoft/ewol/context/EwolContext.java b/src/main/org/atriasoft/ewol/context/EwolContext.java similarity index 100% rename from src/org/atriasoft/ewol/context/EwolContext.java rename to src/main/org/atriasoft/ewol/context/EwolContext.java diff --git a/src/org/atriasoft/ewol/context/InputManager.java b/src/main/org/atriasoft/ewol/context/InputManager.java similarity index 100% rename from src/org/atriasoft/ewol/context/InputManager.java rename to src/main/org/atriasoft/ewol/context/InputManager.java diff --git a/src/org/atriasoft/ewol/event/EntrySystem.java b/src/main/org/atriasoft/ewol/event/EntrySystem.java similarity index 100% rename from src/org/atriasoft/ewol/event/EntrySystem.java rename to src/main/org/atriasoft/ewol/event/EntrySystem.java diff --git a/src/org/atriasoft/ewol/event/EventEntry.java b/src/main/org/atriasoft/ewol/event/EventEntry.java similarity index 100% rename from src/org/atriasoft/ewol/event/EventEntry.java rename to src/main/org/atriasoft/ewol/event/EventEntry.java diff --git a/src/org/atriasoft/ewol/event/EventInput.java b/src/main/org/atriasoft/ewol/event/EventInput.java similarity index 100% rename from src/org/atriasoft/ewol/event/EventInput.java rename to src/main/org/atriasoft/ewol/event/EventInput.java diff --git a/src/org/atriasoft/ewol/event/EventShortCut.java b/src/main/org/atriasoft/ewol/event/EventShortCut.java similarity index 100% rename from src/org/atriasoft/ewol/event/EventShortCut.java rename to src/main/org/atriasoft/ewol/event/EventShortCut.java diff --git a/src/org/atriasoft/ewol/event/EventTime.java b/src/main/org/atriasoft/ewol/event/EventTime.java similarity index 100% rename from src/org/atriasoft/ewol/event/EventTime.java rename to src/main/org/atriasoft/ewol/event/EventTime.java diff --git a/src/org/atriasoft/ewol/event/InputSystem.java b/src/main/org/atriasoft/ewol/event/InputSystem.java similarity index 100% rename from src/org/atriasoft/ewol/event/InputSystem.java rename to src/main/org/atriasoft/ewol/event/InputSystem.java diff --git a/src/org/atriasoft/ewol/internal/LoadPackageStream.java b/src/main/org/atriasoft/ewol/internal/LoadPackageStream.java similarity index 100% rename from src/org/atriasoft/ewol/internal/LoadPackageStream.java rename to src/main/org/atriasoft/ewol/internal/LoadPackageStream.java diff --git a/src/org/atriasoft/ewol/object/EwolObject.java b/src/main/org/atriasoft/ewol/object/EwolObject.java similarity index 100% rename from src/org/atriasoft/ewol/object/EwolObject.java rename to src/main/org/atriasoft/ewol/object/EwolObject.java diff --git a/src/org/atriasoft/ewol/object/ObjectManager.java b/src/main/org/atriasoft/ewol/object/ObjectManager.java similarity index 100% rename from src/org/atriasoft/ewol/object/ObjectManager.java rename to src/main/org/atriasoft/ewol/object/ObjectManager.java diff --git a/src/org/atriasoft/ewol/object/Worker.java b/src/main/org/atriasoft/ewol/object/Worker.java similarity index 100% rename from src/org/atriasoft/ewol/object/Worker.java rename to src/main/org/atriasoft/ewol/object/Worker.java diff --git a/src/org/atriasoft/ewol/resource/RefactorColored3DObject.java b/src/main/org/atriasoft/ewol/resource/RefactorColored3DObject.java similarity index 100% rename from src/org/atriasoft/ewol/resource/RefactorColored3DObject.java rename to src/main/org/atriasoft/ewol/resource/RefactorColored3DObject.java diff --git a/src/org/atriasoft/ewol/resource/ResourceColorFile.java b/src/main/org/atriasoft/ewol/resource/ResourceColorFile.java similarity index 100% rename from src/org/atriasoft/ewol/resource/ResourceColorFile.java rename to src/main/org/atriasoft/ewol/resource/ResourceColorFile.java diff --git a/src/org/atriasoft/ewol/resource/ResourceConfigFile.java b/src/main/org/atriasoft/ewol/resource/ResourceConfigFile.java similarity index 100% rename from src/org/atriasoft/ewol/resource/ResourceConfigFile.java rename to src/main/org/atriasoft/ewol/resource/ResourceConfigFile.java diff --git a/src/org/atriasoft/ewol/resource/ResourceFontSvg.java b/src/main/org/atriasoft/ewol/resource/ResourceFontSvg.java similarity index 100% rename from src/org/atriasoft/ewol/resource/ResourceFontSvg.java rename to src/main/org/atriasoft/ewol/resource/ResourceFontSvg.java diff --git a/src/org/atriasoft/ewol/resource/ResourceTexturedFont.java b/src/main/org/atriasoft/ewol/resource/ResourceTexturedFont.java similarity index 100% rename from src/org/atriasoft/ewol/resource/ResourceTexturedFont.java rename to src/main/org/atriasoft/ewol/resource/ResourceTexturedFont.java diff --git a/src/org/atriasoft/ewol/resource/font/FontMode.java b/src/main/org/atriasoft/ewol/resource/font/FontMode.java similarity index 100% rename from src/org/atriasoft/ewol/resource/font/FontMode.java rename to src/main/org/atriasoft/ewol/resource/font/FontMode.java diff --git a/src/org/atriasoft/ewol/resource/font/GlyphProperty.java b/src/main/org/atriasoft/ewol/resource/font/GlyphProperty.java similarity index 100% rename from src/org/atriasoft/ewol/resource/font/GlyphProperty.java rename to src/main/org/atriasoft/ewol/resource/font/GlyphProperty.java diff --git a/src/org/atriasoft/ewol/tools/Message.java b/src/main/org/atriasoft/ewol/tools/Message.java similarity index 100% rename from src/org/atriasoft/ewol/tools/Message.java rename to src/main/org/atriasoft/ewol/tools/Message.java diff --git a/src/org/atriasoft/ewol/widget/Button.java b/src/main/org/atriasoft/ewol/widget/Button.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Button.java rename to src/main/org/atriasoft/ewol/widget/Button.java diff --git a/src/org/atriasoft/ewol/widget/CheckBox.java b/src/main/org/atriasoft/ewol/widget/CheckBox.java similarity index 100% rename from src/org/atriasoft/ewol/widget/CheckBox.java rename to src/main/org/atriasoft/ewol/widget/CheckBox.java diff --git a/src/org/atriasoft/ewol/widget/Composer.java b/src/main/org/atriasoft/ewol/widget/Composer.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Composer.java rename to src/main/org/atriasoft/ewol/widget/Composer.java diff --git a/src/org/atriasoft/ewol/widget/Container.java b/src/main/org/atriasoft/ewol/widget/Container.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Container.java rename to src/main/org/atriasoft/ewol/widget/Container.java diff --git a/src/org/atriasoft/ewol/widget/ContainerN.java b/src/main/org/atriasoft/ewol/widget/ContainerN.java similarity index 100% rename from src/org/atriasoft/ewol/widget/ContainerN.java rename to src/main/org/atriasoft/ewol/widget/ContainerN.java diff --git a/src/org/atriasoft/ewol/widget/ContainerToggle.java b/src/main/org/atriasoft/ewol/widget/ContainerToggle.java similarity index 100% rename from src/org/atriasoft/ewol/widget/ContainerToggle.java rename to src/main/org/atriasoft/ewol/widget/ContainerToggle.java diff --git a/src/org/atriasoft/ewol/widget/ContainerWithShape.java b/src/main/org/atriasoft/ewol/widget/ContainerWithShape.java similarity index 100% rename from src/org/atriasoft/ewol/widget/ContainerWithShape.java rename to src/main/org/atriasoft/ewol/widget/ContainerWithShape.java diff --git a/src/org/atriasoft/ewol/widget/Entry.java b/src/main/org/atriasoft/ewol/widget/Entry.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Entry.java rename to src/main/org/atriasoft/ewol/widget/Entry.java diff --git a/src/org/atriasoft/ewol/widget/Gird.java b/src/main/org/atriasoft/ewol/widget/Gird.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Gird.java rename to src/main/org/atriasoft/ewol/widget/Gird.java diff --git a/src/org/atriasoft/ewol/widget/ImageDisplay.java b/src/main/org/atriasoft/ewol/widget/ImageDisplay.java similarity index 100% rename from src/org/atriasoft/ewol/widget/ImageDisplay.java rename to src/main/org/atriasoft/ewol/widget/ImageDisplay.java diff --git a/src/org/atriasoft/ewol/widget/Label.java b/src/main/org/atriasoft/ewol/widget/Label.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Label.java rename to src/main/org/atriasoft/ewol/widget/Label.java diff --git a/src/org/atriasoft/ewol/widget/LabelOnSVG.java b/src/main/org/atriasoft/ewol/widget/LabelOnSVG.java similarity index 99% rename from src/org/atriasoft/ewol/widget/LabelOnSVG.java rename to src/main/org/atriasoft/ewol/widget/LabelOnSVG.java index 9dc125c..256cc6e 100644 --- a/src/org/atriasoft/ewol/widget/LabelOnSVG.java +++ b/src/main/org/atriasoft/ewol/widget/LabelOnSVG.java @@ -30,7 +30,7 @@ public class LabelOnSVG extends Widget { protected int colorDefaultFgText = -1; //!< Default color of the text protected ResourceColorFile colorProperty; //!< theme color property protected boolean propertyAutoTranslate = true; //!< if at true the data is translate automaticaly translate. - + protected int propertyFontSize = 0; //!< default size of the font. protected String propertyValue = ""; //!< decorated text to display. @AknotSignal @@ -39,7 +39,7 @@ public class LabelOnSVG extends Widget { public SignalEmpty signalPressed = new SignalEmpty(); protected CompositingText text = new CompositingText(); //!< Compositing text element. protected String value = ""; - + public LabelOnSVG() { this.colorProperty = ResourceColorFile.create(new Uri("THEME", "/color/Label.json", "ewol")); if (this.colorProperty != null) { @@ -49,7 +49,7 @@ public class LabelOnSVG extends Widget { setMouseLimit(1); setPropertyCanFocus(false); } - + /** * Constructor * @param newLabel The displayed decorated text. @@ -64,7 +64,7 @@ public class LabelOnSVG extends Widget { setPropertyCanFocus(false); setPropertyValue(newLabel); } - + @Override public void calculateMinMaxSize() { final Vector3f tmpMax = this.propertyMaxSize.getPixel(); @@ -76,30 +76,30 @@ public class LabelOnSVG extends Widget { } final Vector3f minSize = this.text.calculateSizeDecorated(this.value); LOGGER.debug("[" + getId() + "] {" + getClass().getCanonicalName() + "} minSize : " + minSize); - + this.minSize = new Vector3f(FMath.avg(tmpMin.x(), 4 + minSize.x(), tmpMax.x()), FMath.avg(tmpMin.y(), 4 + minSize.y(), tmpMax.y()), FMath.avg(tmpMin.z(), 4 + minSize.z(), tmpMax.z())); LOGGER.trace("[" + getId() + "] {" + getClass().getCanonicalName() + "} Result min size : " + tmpMin + " < " + this.minSize + " < " + tmpMax); } - + public int getPropertyFontSize() { return this.propertyFontSize; } - + public String getPropertyValue() { return this.propertyValue; } - + public boolean isPropertyAutoTranslate() { return this.propertyAutoTranslate; } - + @Override protected void onDraw() { this.text.draw(); } - + @Override public boolean onEventInput(final EventInput event) { //LOGGER.debug("Event on Label ..."); @@ -112,7 +112,7 @@ public class LabelOnSVG extends Widget { } return false; } - + @Override public void onRegenerateDisplay() { if (!needRedraw()) { @@ -120,24 +120,24 @@ public class LabelOnSVG extends Widget { } this.text.clear(); final int paddingSize = 2; - + final Vector3f tmpMax = this.propertyMaxSize.getPixel(); // to know the size of one line : final Vector3f minSize = this.text.calculateSize('A'); - + //minSize.setX(etk::max(minSize.x(), this.minSize.x())); //minSize.setY(etk::max(minSize.y(), this.minSize.y())); if (tmpMax.x() <= 999999) { this.text.setTextAlignment(0, tmpMax.x() - 2 * paddingSize, AlignMode.LEFT); } final Vector3f currentTextSize = this.text.calculateSizeDecorated(this.value); - + Vector2i localSize = new Vector2i((int) this.minSize.x(), (int) this.minSize.y()); - + // no change for the text origin : Vector3f tmpTextOrigin = new Vector3f((this.size.x() - this.minSize.x()) / 2.0f, (this.size.y() - this.minSize.y()) / 2.0f, 0); - + if (this.propertyFill.x()) { localSize = localSize.withX((int) this.size.x()); tmpTextOrigin = tmpTextOrigin.withX(0); @@ -148,14 +148,14 @@ public class LabelOnSVG extends Widget { } tmpTextOrigin = tmpTextOrigin.add(paddingSize, paddingSize, 0); localSize = localSize.less(2 * paddingSize, 2 * paddingSize); - + tmpTextOrigin = tmpTextOrigin.withY(tmpTextOrigin.y() + (this.minSize.y() - 2 * paddingSize) - minSize.y()); - + final Vector3f textPos = new Vector3f(tmpTextOrigin.x(), tmpTextOrigin.y(), 0); - + final Vector3f drawClippingPos = new Vector3f(paddingSize, paddingSize, -0.5f); final Vector3f drawClippingSize = new Vector3f((this.size.x() - paddingSize), (this.size.y() - paddingSize), 1); - + // clean the element this.text.reset(); if (this.propertyFontSize != 0) { @@ -170,10 +170,10 @@ public class LabelOnSVG extends Widget { this.text.setTextAlignment(tmpTextOrigin.x(), tmpTextOrigin.x() + localSize.x(), AlignMode.LEFT); this.text.setClipping(drawClippingPos, drawClippingSize); this.text.printDecorated(this.value); - + this.text.flush(); } - + @AknotManaged @AknotAttribute @AknotName("auto-translate") @@ -191,7 +191,7 @@ public class LabelOnSVG extends Widget { markToRedraw(); requestUpdateSize(); } - + @AknotManaged @AknotAttribute @AknotName("font-size") @@ -204,7 +204,7 @@ public class LabelOnSVG extends Widget { markToRedraw(); requestUpdateSize(); } - + @AknotManaged @AknotAttribute @AknotName("value") @@ -222,5 +222,5 @@ public class LabelOnSVG extends Widget { requestUpdateSize(); this.propertyValue = propertyValue; } - + } diff --git a/src/org/atriasoft/ewol/widget/Layer.java b/src/main/org/atriasoft/ewol/widget/Layer.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Layer.java rename to src/main/org/atriasoft/ewol/widget/Layer.java diff --git a/src/org/atriasoft/ewol/widget/ListFileSystem.java b/src/main/org/atriasoft/ewol/widget/ListFileSystem.java similarity index 100% rename from src/org/atriasoft/ewol/widget/ListFileSystem.java rename to src/main/org/atriasoft/ewol/widget/ListFileSystem.java diff --git a/src/org/atriasoft/ewol/widget/PopUp.java b/src/main/org/atriasoft/ewol/widget/PopUp.java similarity index 100% rename from src/org/atriasoft/ewol/widget/PopUp.java rename to src/main/org/atriasoft/ewol/widget/PopUp.java diff --git a/src/org/atriasoft/ewol/widget/ProgressBar.java b/src/main/org/atriasoft/ewol/widget/ProgressBar.java similarity index 100% rename from src/org/atriasoft/ewol/widget/ProgressBar.java rename to src/main/org/atriasoft/ewol/widget/ProgressBar.java diff --git a/src/org/atriasoft/ewol/widget/Scroll.java b/src/main/org/atriasoft/ewol/widget/Scroll.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Scroll.java rename to src/main/org/atriasoft/ewol/widget/Scroll.java diff --git a/src/org/atriasoft/ewol/widget/Sizer.java b/src/main/org/atriasoft/ewol/widget/Sizer.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Sizer.java rename to src/main/org/atriasoft/ewol/widget/Sizer.java diff --git a/src/org/atriasoft/ewol/widget/Slider.java b/src/main/org/atriasoft/ewol/widget/Slider.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Slider.java rename to src/main/org/atriasoft/ewol/widget/Slider.java diff --git a/src/org/atriasoft/ewol/widget/Spacer.java b/src/main/org/atriasoft/ewol/widget/Spacer.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Spacer.java rename to src/main/org/atriasoft/ewol/widget/Spacer.java diff --git a/src/org/atriasoft/ewol/widget/Spin.java b/src/main/org/atriasoft/ewol/widget/Spin.java similarity index 95% rename from src/org/atriasoft/ewol/widget/Spin.java rename to src/main/org/atriasoft/ewol/widget/Spin.java index d177205..4c03f08 100644 --- a/src/org/atriasoft/ewol/widget/Spin.java +++ b/src/main/org/atriasoft/ewol/widget/Spin.java @@ -37,7 +37,7 @@ public class Spin extends SpinBase { protected Connection connectionEntry = new Connection(); protected Connection connectionButtonUp = new Connection(); protected Connection connectionButtonDown = new Connection(); - + /** * Constructor * @param _mode mode to display the spin @@ -47,14 +47,14 @@ public class Spin extends SpinBase { super(new Uri("THEME", "shape/Spin.json", "ewol")); connectGui(); } - + public void checkValue(long value) { value = FMath.clamp(this.propertyMin, value, this.propertyMax); this.propertyValue = value; this.widgetEntry.setPropertyValue(Long.toString(value)); this.signalValue.emit(this.propertyValue); } - + public void connectGui() { LOGGER.warn("updateGui [START]"); super.updateGui(); @@ -70,7 +70,7 @@ public class Spin extends SpinBase { checkValue(this.propertyValue); LOGGER.warn("updateGui [STOP]"); } - + @AknotManaged @AknotAttribute @AknotName("increment") @@ -78,7 +78,7 @@ public class Spin extends SpinBase { public long getPropertyIncrement() { return this.propertyIncrement; } - + @AknotManaged @AknotAttribute @AknotName("mantis") @@ -86,7 +86,7 @@ public class Spin extends SpinBase { public int getPropertyMantis() { return this.propertyMantis; } - + @AknotManaged @AknotAttribute @AknotName(value = "max") @@ -94,7 +94,7 @@ public class Spin extends SpinBase { public long getPropertyMax() { return this.propertyMax; } - + @AknotManaged @AknotAttribute @AknotName("min") @@ -102,7 +102,7 @@ public class Spin extends SpinBase { public long getPropertyMin() { return this.propertyMin; } - + @AknotManaged @AknotAttribute @AknotName("value") @@ -110,7 +110,7 @@ public class Spin extends SpinBase { public long getPropertyValue() { return this.propertyValue; } - + protected void onCallbackDown(final Boolean value) { if (value) { return; @@ -118,15 +118,19 @@ public class Spin extends SpinBase { final long data = this.propertyValue - this.propertyIncrement; checkValue(data); } - + protected void onCallbackModify(final String value) { if (value.isEmpty()) { return; } - final long value1 = Long.valueOf(value); - checkValue(value1); + try { + final long value1 = Long.valueOf(value); + checkValue(value1); + } catch (final NumberFormatException ex) { + LOGGER.error("This is not a value {} ==> {}", value, ex.getLocalizedMessage()); + } } - + protected void onCallbackUp(final Boolean value) { if (value) { return; @@ -134,23 +138,23 @@ public class Spin extends SpinBase { final long data = this.propertyValue + this.propertyIncrement; checkValue(data); } - + protected void onChangePropertyIncrement() { - + } - + protected void onChangePropertyMantis() { - + } - + protected void onChangePropertyMax() { checkValue(this.propertyValue); } - + protected void onChangePropertyMin() { checkValue(this.propertyValue); } - + protected void onChangePropertyValue() { markToRedraw(); if (this.widgetEntry == null) { @@ -159,7 +163,7 @@ public class Spin extends SpinBase { } checkValue(this.propertyValue); } - + public void setPropertyIncrement(final long propertyIncrement) { if (this.propertyIncrement == propertyIncrement) { return; @@ -167,7 +171,7 @@ public class Spin extends SpinBase { this.propertyIncrement = propertyIncrement; onChangePropertyIncrement(); } - + public void setPropertyMantis(final int propertyMantis) { if (this.propertyMantis == propertyMantis) { return; @@ -175,7 +179,7 @@ public class Spin extends SpinBase { this.propertyMantis = propertyMantis; onChangePropertyMantis(); } - + public void setPropertyMax(final long propertyMax) { if (this.propertyMax == propertyMax) { return; @@ -183,7 +187,7 @@ public class Spin extends SpinBase { this.propertyMax = propertyMax; onChangePropertyMax(); } - + public void setPropertyMin(final long propertyMin) { if (this.propertyMin == propertyMin) { return; @@ -191,7 +195,7 @@ public class Spin extends SpinBase { this.propertyMin = propertyMin; onChangePropertyMin(); } - + public void setPropertyValue(final long propertyValue) { if (this.propertyValue == propertyValue) { return; diff --git a/src/org/atriasoft/ewol/widget/Tick.java b/src/main/org/atriasoft/ewol/widget/Tick.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Tick.java rename to src/main/org/atriasoft/ewol/widget/Tick.java diff --git a/src/org/atriasoft/ewol/widget/Widget.java b/src/main/org/atriasoft/ewol/widget/Widget.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Widget.java rename to src/main/org/atriasoft/ewol/widget/Widget.java diff --git a/src/org/atriasoft/ewol/widget/WidgetList.java b/src/main/org/atriasoft/ewol/widget/WidgetList.java similarity index 100% rename from src/org/atriasoft/ewol/widget/WidgetList.java rename to src/main/org/atriasoft/ewol/widget/WidgetList.java diff --git a/src/org/atriasoft/ewol/widget/WidgetManager.java b/src/main/org/atriasoft/ewol/widget/WidgetManager.java similarity index 100% rename from src/org/atriasoft/ewol/widget/WidgetManager.java rename to src/main/org/atriasoft/ewol/widget/WidgetManager.java diff --git a/src/org/atriasoft/ewol/widget/WidgetScrolled.hpp b/src/main/org/atriasoft/ewol/widget/WidgetScrolled.hpp similarity index 100% rename from src/org/atriasoft/ewol/widget/WidgetScrolled.hpp rename to src/main/org/atriasoft/ewol/widget/WidgetScrolled.hpp diff --git a/src/org/atriasoft/ewol/widget/WidgetScrolled.java b/src/main/org/atriasoft/ewol/widget/WidgetScrolled.java similarity index 100% rename from src/org/atriasoft/ewol/widget/WidgetScrolled.java rename to src/main/org/atriasoft/ewol/widget/WidgetScrolled.java diff --git a/src/org/atriasoft/ewol/widget/WidgetXmlFactory.java b/src/main/org/atriasoft/ewol/widget/WidgetXmlFactory.java similarity index 100% rename from src/org/atriasoft/ewol/widget/WidgetXmlFactory.java rename to src/main/org/atriasoft/ewol/widget/WidgetXmlFactory.java diff --git a/src/org/atriasoft/ewol/widget/Windows.java b/src/main/org/atriasoft/ewol/widget/Windows.java similarity index 100% rename from src/org/atriasoft/ewol/widget/Windows.java rename to src/main/org/atriasoft/ewol/widget/Windows.java diff --git a/src/org/atriasoft/ewol/widget/meta/FileChooser.java b/src/main/org/atriasoft/ewol/widget/meta/FileChooser.java similarity index 100% rename from src/org/atriasoft/ewol/widget/meta/FileChooser.java rename to src/main/org/atriasoft/ewol/widget/meta/FileChooser.java diff --git a/src/org/atriasoft/ewol/widget/meta/SpinBase.java b/src/main/org/atriasoft/ewol/widget/meta/SpinBase.java similarity index 100% rename from src/org/atriasoft/ewol/widget/meta/SpinBase.java rename to src/main/org/atriasoft/ewol/widget/meta/SpinBase.java diff --git a/src/org/atriasoft/ewol/widget/model/ListRole.java b/src/main/org/atriasoft/ewol/widget/model/ListRole.java similarity index 100% rename from src/org/atriasoft/ewol/widget/model/ListRole.java rename to src/main/org/atriasoft/ewol/widget/model/ListRole.java diff --git a/src/org/atriasoft/ewol/widget/model/SpinPosition.java b/src/main/org/atriasoft/ewol/widget/model/SpinPosition.java similarity index 100% rename from src/org/atriasoft/ewol/widget/model/SpinPosition.java rename to src/main/org/atriasoft/ewol/widget/model/SpinPosition.java diff --git a/src/module-info.java b/src/module-info.java deleted file mode 100644 index e1b3cc0..0000000 --- a/src/module-info.java +++ /dev/null @@ -1,28 +0,0 @@ -/** Basic module interface. - * - * @author Edouard DUPIN */ - -open module org.atriasoft.ewol { - exports org.atriasoft.ewol; - exports org.atriasoft.ewol.compositing; - exports org.atriasoft.ewol.compositing.tools; - exports org.atriasoft.ewol.context; - exports org.atriasoft.ewol.event; - exports org.atriasoft.ewol.object; - exports org.atriasoft.ewol.resource; - exports org.atriasoft.ewol.resource.font; - //exports org.atriasoft.ewol.tools; - exports org.atriasoft.ewol.widget; - exports org.atriasoft.ewol.widget.meta; - - requires transitive org.atriasoft.esignal; - requires transitive org.atriasoft.iogami; - requires transitive org.atriasoft.gale; - requires transitive org.atriasoft.etk; - requires transitive org.atriasoft.esvg; - requires transitive org.atriasoft.exml; - requires transitive org.atriasoft.ejson; - requires org.atriasoft.loader3d; - requires org.atriasoft.egami; - requires java.base; -} diff --git a/test/src/test/atriasoft/ewol/.keep b/src/test/test/atriasoft/ewol/.keep similarity index 100% rename from test/src/test/atriasoft/ewol/.keep rename to src/test/test/atriasoft/ewol/.keep diff --git a/test/src/test/atriasoft/ewol/TestBasicLog.java b/src/test/test/atriasoft/ewol/TestBasicLog.java similarity index 100% rename from test/src/test/atriasoft/ewol/TestBasicLog.java rename to src/test/test/atriasoft/ewol/TestBasicLog.java