aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-12-19 17:40:17 +0100
committerSven Gothel <[email protected]>2023-12-19 17:40:17 +0100
commitfeb3d34be097bcbef5ebc40342b405a832ac581f (patch)
tree09eb2f8dbb2173d9d90438397819739c3fc3b994 /src/demos/com
parenteb99bfc27f9f49387cbb08471debcd4d61e4f745 (diff)
Bug 805: GraphUI: Add Widget 'marker' (a Group), derived by {MediaUI01 -> MediaPlayer} and new RangeSlider
- A widget specifies specific UI semantics including individual controls. - Being a {@link Group}, implementations provide shape(s) and its instance can be added to the user's scene. - Due to the specific nature of widgets, individual controls/listener may be provided with semantic values. +++ MediaPlayer exposes a RangeSlider for current position (view and control).
Diffstat (limited to 'src/demos/com')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java10
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java12
2 files changed, 11 insertions, 11 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java
index 2183a608c..508879631 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java
@@ -44,7 +44,7 @@ import com.jogamp.graph.ui.layout.GridLayout;
import com.jogamp.graph.ui.shapes.Button;
import com.jogamp.graph.ui.shapes.MediaButton;
import com.jogamp.graph.ui.shapes.Rectangle;
-import com.jogamp.graph.ui.widgets.MediaUI01;
+import com.jogamp.graph.ui.widgets.MediaPlayer;
import com.jogamp.math.Vec2i;
import com.jogamp.math.geom.AABBox;
import com.jogamp.newt.event.KeyAdapter;
@@ -215,15 +215,15 @@ public class UIMediaGrid00 {
final List<Shape> customCtrls = new ArrayList<Shape>();
{
- final Font fontSymbols = MediaUI01.getSymbolsFont();
+ final Font fontSymbols = MediaPlayer.getSymbolsFont();
if( null == fontSymbols ) {
grid.addShape( new Rectangle(options.renderModes, 16f/9f, 1, 0.10f) );
return;
}
final Button button = new Button(options.renderModes, fontSymbols,
- fontSymbols.getUTF16String("reset_tv"), MediaUI01.CtrlButtonWidth, MediaUI01.CtrlButtonHeight, scene.getZEpsilon(16));
+ fontSymbols.getUTF16String("reset_tv"), MediaPlayer.CtrlButtonWidth, MediaPlayer.CtrlButtonHeight, scene.getZEpsilon(16));
button.setName("reset");
- button.setSpacing(MediaUI01.SymSpacing, MediaUI01.FixedSymSize).setPerp().setColor(MediaUI01.CtrlCellCol);
+ button.setSpacing(MediaPlayer.SymSpacing, MediaPlayer.FixedSymSize).setPerp().setColor(MediaPlayer.CtrlCellCol);
button.onClicked((final Shape s0) -> {
scene.forAll((final Shape s1) -> {
System.err.println("- "+s1.getName());
@@ -246,7 +246,7 @@ public class UIMediaGrid00 {
});
customCtrls.add(button);
}
- grid.addShape( MediaUI01.create(scene, mPlayer, options.renderModes, medium, aid, 16f/9f, false, zoomSize, customCtrls) );
+ grid.addShape( new MediaPlayer(options.renderModes, scene, mPlayer, medium, aid, 16f/9f, false, zoomSize, customCtrls) );
}
}
private static boolean printNativeInfoOnce = true;
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java
index 52ace18ad..339b09e4d 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java
@@ -47,7 +47,7 @@ import com.jogamp.graph.ui.layout.GridLayout;
import com.jogamp.graph.ui.shapes.Button;
import com.jogamp.graph.ui.shapes.MediaButton;
import com.jogamp.graph.ui.shapes.Rectangle;
-import com.jogamp.graph.ui.widgets.MediaUI01;
+import com.jogamp.graph.ui.widgets.MediaPlayer;
import com.jogamp.math.Vec2i;
import com.jogamp.math.geom.AABBox;
import com.jogamp.newt.event.KeyAdapter;
@@ -246,7 +246,7 @@ public class UIMediaGrid01 {
if( GLMediaPlayer.State.Paused == mPlayer.getState() ) {
mPlayer.resume();
} else if(GLMediaPlayer.State.Uninitialized == mPlayer.getState()) {
- mPlayer.playStream(mPlayer.getUri(), GLMediaPlayer.STREAM_ID_AUTO, aid, MediaUI01.MediaTexCount);
+ mPlayer.playStream(mPlayer.getUri(), GLMediaPlayer.STREAM_ID_AUTO, aid, MediaPlayer.TexCount);
} else if( e.isShiftDown() ) {
mPlayer.stop();
} else {
@@ -292,15 +292,15 @@ public class UIMediaGrid01 {
final List<Shape> customCtrls = new ArrayList<Shape>();
if( true ) {
- final Font fontSymbols = MediaUI01.getSymbolsFont();
+ final Font fontSymbols = MediaPlayer.getSymbolsFont();
if( null == fontSymbols ) {
grid.addShape( new Rectangle(options.renderModes, defRatio, 1, 0.10f) );
return;
}
final Button button = new Button(options.renderModes, fontSymbols,
- fontSymbols.getUTF16String("reset_tv"), MediaUI01.CtrlButtonWidth, MediaUI01.CtrlButtonHeight, scene.getZEpsilon(16));
+ fontSymbols.getUTF16String("reset_tv"), MediaPlayer.CtrlButtonWidth, MediaPlayer.CtrlButtonHeight, scene.getZEpsilon(16));
button.setName("reset");
- button.setSpacing(MediaUI01.SymSpacing, MediaUI01.FixedSymSize).setPerp().setColor(MediaUI01.CtrlCellCol);
+ button.setSpacing(MediaPlayer.SymSpacing, MediaPlayer.FixedSymSize).setPerp().setColor(MediaPlayer.CtrlCellCol);
button.onClicked((final Shape s0) -> {
scene.forAll((final Shape s1) -> {
System.err.println("- "+s1.getName());
@@ -323,7 +323,7 @@ public class UIMediaGrid01 {
});
customCtrls.add(button);
}
- grid.addShape( MediaUI01.create(scene, mPlayer, options.renderModes, medium, aid, defRatio, letterBox, zoomSize, customCtrls) );
+ grid.addShape( new MediaPlayer(options.renderModes, scene, mPlayer, medium, aid, defRatio, letterBox, zoomSize, customCtrls) );
}
}
private static boolean printNativeInfoOnce = true;