From a9c76153fd9a472679c1fc85189f6d4ecda7979e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 29 Apr 2023 03:13:01 +0200 Subject: GraphUI Working GridLayout w/ and w/o cell-size and alignment; Added BoxLayout. --- src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/test/com') diff --git a/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java index 538c07967..01f6e456d 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java @@ -32,8 +32,9 @@ import com.jogamp.graph.font.FontScale; import com.jogamp.graph.ui.Group; import com.jogamp.graph.ui.Scene; import com.jogamp.graph.ui.Shape; +import com.jogamp.graph.ui.layout.Alignment; +import com.jogamp.graph.ui.layout.Gap; import com.jogamp.graph.ui.layout.GridLayout; -import com.jogamp.graph.ui.layout.Padding; import com.jogamp.graph.ui.shapes.GlyphShape; import com.jogamp.graph.ui.shapes.Rectangle; import com.jogamp.newt.opengl.GLWindow; @@ -122,7 +123,7 @@ public class FontViewListener01 implements GLEventListener { final float gridSize = gridCols > gridRows ? 1f/gridCols : 1f/gridRows; System.err.println("Reshape Grid "+gridCols+" x "+gridRows+", "+cellCount+" cells, gridSize "+gridSize); - grid = new Group(new GridLayout(gridCols, gridSize, gridSize, new Padding(gridSize*0.05f, gridSize*0.05f))); + grid = new Group(new GridLayout(gridCols, gridSize, gridSize, Alignment.Fill, new Gap(gridSize*0.10f))); scene.addShape(grid); for(int i=0; i