aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-10-03 02:37:32 +0200
committerSven Gothel <[email protected]>2023-10-03 02:37:32 +0200
commitc8ec6fa7cc16a0777db16af8b4d0d0b898f8b546 (patch)
tree7673f7635bd1eff387552f74eae688e33694e728 /src/demos
parent69549319e1d9ddf4d3903aa077f2c4cebb54195e (diff)
GraphUI Shape: 'int name' -> 'int id' and add 'String name', change get/set methods accordingly
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBox01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBoxGridOffset01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutGrid01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java16
4 files changed, 11 insertions, 11 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBox01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBox01.java
index 495739f7e..1e9c00967 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBox01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBox01.java
@@ -430,7 +430,7 @@ public class UILayoutBox01 {
final Shape.MouseGestureListener dragZoomRotateListener)
{
final String suffix = String.format("%2d", id);
- g.setName(id);
+ g.setID(id);
final AABBox sceneBox = scene.getBounds();
{
g.addShape( new BaseButton(options.renderModes, 0.70f, 0.70f).setPerp().setColor(0, 1, 0, 1).setBorder(borderThickness).addMouseListener(dragZoomRotateListener) );
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBoxGridOffset01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBoxGridOffset01.java
index 97a1d81f0..8261f6ec0 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBoxGridOffset01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutBoxGridOffset01.java
@@ -313,7 +313,7 @@ public class UILayoutBoxGridOffset01 {
final Font font, final int id,
final GroupMod modImpl, final float offX, final float offY) {
final String suffix = String.format("%2d", id);
- g.setName(id);
+ g.setID(id);
final AABBox sceneBox = scene.getBounds();
modImpl.mod(g);
g.setBorder(borderThickness).setBorderColor(groupBorderColor);
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutGrid01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutGrid01.java
index 82a91d53c..4221e022d 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutGrid01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UILayoutGrid01.java
@@ -401,7 +401,7 @@ public class UILayoutGrid01 {
final Font font, final int id,
final GroupMod modImpl) {
final String suffix = String.format("%2d", id);
- g.setName(id);
+ g.setID(id);
final AABBox sceneBox = scene.getBounds();
modImpl.mod(g);
g.setBorder(borderThickness).setBorderColor(groupBorderColor);
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
index 2942dd58a..1879240ab 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
@@ -380,8 +380,8 @@ public class UISceneDemo20 implements GLEventListener {
public static final int BUTTON_MOVIE = 200;
public static final int BUTTON_GLEL = 200;
- public Shape getShapeByName(final int name) {
- return scene.getShapeByName(name);
+ public Shape getShapeByID(final int name) {
+ return scene.getShapeByID(name);
}
private void initSound(final Shape shape,
@@ -483,7 +483,7 @@ public class UISceneDemo20 implements GLEventListener {
BaseButton button;
button = new Button(renderModes, fontSymbols, fontSymbols.getUTF16String("fast_forward"), buttonLWidth, buttonLHeight); // next (ffwd)
((Button)button).setSpacing(symSpacing, fixedSymSize);
- button.setName(BUTTON_NEXTTEXT);
+ button.setID(BUTTON_NEXTTEXT);
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
public void mouseClicked(final MouseEvent e) {
@@ -499,7 +499,7 @@ public class UISceneDemo20 implements GLEventListener {
buttonsLeft.addShape(button);
button = new Button(renderModes, fontButtons, "Show fps", "Hide fps", buttonLWidth, buttonLHeight, Button.DEFAULT_LABEL_ZOFFSET);
- button.setName(BUTTON_FPS);
+ button.setID(BUTTON_FPS);
button.setToggleable(true);
button.setToggle(fpsLabel.isEnabled());
button.addMouseListener(new Shape.MouseGestureAdapter() {
@@ -515,7 +515,7 @@ public class UISceneDemo20 implements GLEventListener {
buttonsLeft.addShape(button);
button = new Button(renderModes, fontButtons, " V-Sync ", buttonLWidth, buttonLHeight);
- button.setName(BUTTON_VSYNC);
+ button.setID(BUTTON_VSYNC);
button.setToggleable(true);
button.setToggle(gl.getSwapInterval()>0);
button.addMouseListener(new Shape.MouseGestureAdapter() {
@@ -601,7 +601,7 @@ public class UISceneDemo20 implements GLEventListener {
button = new Button(renderModes, fontSymbols, fontSymbols.getUTF16String("power_settings_new"), buttonLWidth, buttonLHeight); // exit (power_settings_new)
((Button)button).setSpacing(symSpacing, fixedSymSize);
- button.setName(BUTTON_QUIT);
+ button.setID(BUTTON_QUIT);
button.setColor(0.7f, 0.3f, 0.3f, 1.0f);
((Button)button).setLabelColor(1.2f, 1.2f, 1.2f);
button.setPressedColorMod(1.1f, 0.0f, 0.0f, 1.0f);
@@ -709,7 +709,7 @@ public class UISceneDemo20 implements GLEventListener {
mPlayer.setTextureUnit(texUnitMediaPlayer);
mPlayer.setAudioChannelLimit(1); // enforce mono to enjoy spatial 3D position effects
button = new MediaButton(renderModes, buttonRWidth, buttonRHeight, mPlayer);
- button.setName(BUTTON_MOVIE);
+ button.setID(BUTTON_MOVIE);
((MediaButton)button).setVerbose(false).addDefaultEventListener().setFixedARatioResize(true);
button.setToggleable(true);
button.setToggle(true); // toggle == false -> mute audio
@@ -895,7 +895,7 @@ public class UISceneDemo20 implements GLEventListener {
}).start();
button = new GLButton(renderModes, buttonRWidth, buttonRHeight,
texUnitGLELButton, gears, false /* useAlpha */);
- button.setName(BUTTON_GLEL);
+ button.setID(BUTTON_GLEL);
button.setToggleable(true);
button.setToggle(false); // toggle == true -> animation
((GLButton)button).setAnimate(false);