diff options
author | Sven Gothel <[email protected]> | 2023-04-29 03:13:01 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-29 03:13:01 +0200 |
commit | a9c76153fd9a472679c1fc85189f6d4ecda7979e (patch) | |
tree | 6ee96a4605b725da15dff3ef8a52cf7d4d1dffbc /src/test/com | |
parent | 0b7559a6f5f92dd4af9b80bc2a24b8b1d6140bfe (diff) |
GraphUI Working GridLayout w/ and w/o cell-size and alignment; Added BoxLayout.
Diffstat (limited to 'src/test/com')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java | 5 |
1 files changed, 3 insertions, 2 deletions
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<cellCount; ++i) { |