aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-20 20:15:12 +0200
committerSven Gothel <[email protected]>2023-09-20 20:15:12 +0200
commit9d351d095398a2899fe662dc31fcc725d2a73a85 (patch)
treeb3e52ecd65f2a985d9859dae6a6a149aa9d7ccb9 /src/demos/com
parent6c81be1f822ae4e9824c20a8016881047e5728cf (diff)
GraphUI Demo FontView01: Re-add Margin for glyphInfoBox (text) and use Group's getShapeCount() ..
Diffstat (limited to 'src/demos/com')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
index c045342a1..b094abfe0 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
@@ -186,7 +186,7 @@ public class FontView01 {
final Group glyphShapeBox = new Group( new BoxLayout( 1f, 1f, Alignment.FillCenter, new Margin(0.025f) ) );
glyphShapeBox.addShape( new GlyphShape(options.renderModes, 'A', font.getGlyph( font.getGlyphID('A')), 0, 0) );
- final Group glyphInfoBox = new Group( new BoxLayout( 1f, 1f, Alignment.FillCenter ) ); // , new Margin(0.05f, 0.025f, 0.05f, 0.025f) ) );
+ final Group glyphInfoBox = new Group( new BoxLayout( 1f, 1f, Alignment.FillCenter, new Margin(0.05f, 0.025f, 0.05f, 0.025f) ) );
final Label glyphInfo = new Label(options.renderModes, fontStatus, "Nothing there yet");
setGlyphInfo(fontStatus, glyphInfo, 'A', font.getGlyph(font.getGlyphID('A')));
glyphInfo.setColor(0.1f, 0.1f, 0.1f, 1.0f);
@@ -201,7 +201,7 @@ public class FontView01 {
return;
}
final Group group = (Group)shape;
- final int last = group.getShapes().size()-1;
+ final int last = group.getShapeCount()-1;
if( 0 > last ) {
return;
}
@@ -214,7 +214,7 @@ public class FontView01 {
final boolean doScreenshot = e.isControlDown() && e.getButtonDownCount() > 0;
scene.invoke(false, (final GLAutoDrawable d) -> {
// Handle old one
- if( 1 == glyphShapeBox.getShapes().size() ) {
+ if( 1 == glyphShapeBox.getShapeCount() ) {
final GlyphShape old = (GlyphShape) glyphShapeBox.getShapes().get(0);
if( null != old ) {
if( !doScreenshot && old.getSymbol() == g0.getSymbol() ) {