<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1456</bug_id>
          
          <creation_ts>2023-09-24 00:55:49 +0200</creation_ts>
          <short_desc>GraphUI: Add CSS alike Layout for Group: GridLayout and BoxLayout</short_desc>
          <delta_ts>2023-09-24 01:01:55 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>GraphUI</product>
          <component>Core</component>
          <version>2.6.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>FEATURE</cf_type>
          <cf_scm_refs>6a0ac90182efba40b0e6dab8f6390898aced70e8
aca5b9b176f3c3393d8c7666a252488d44b18f2e
70d2b056e69562e83156d0435208be8124f2ff86
a9c76153fd9a472679c1fc85189f6d4ecda7979e
45298f3d4ef14cf3cc8eafb568f8b891c0aa4b41
8439522d73b60bcf61cc59550df6297bbafe73fb
f39a084c6a34a083698ca56e9122642e839234c2
ddd6cac8cc658ce542cb98e85f7d262f9917d37a
e5de90b67efe8e8ca518159b3a73295d751764c1
162f8e309b67c333a482d636e59d207a6c5924e7
52d3dd3b3d684d6ba37e573764c3006c4ba20494
e676a65eac2bfa2abbfcd346492868ed17dc4667
3ecb8e9d1bfd1149f32b05c13c5ec1be6c0cab54</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6867</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2023-09-24 00:55:49 +0200</bug_when>
    <thetext>Grid- and Boxlayout shall be attachable to Group
and layout all elements at validate.

Each Shape shall have its property &apos;Padding&apos;,
which is part of the Shape bounds.

GridLayout shall have property Gap, outside of Shape bounds.

BoxLayout shall have property &apos;Margin&apos;, outside of Shape bound.

Grid- and BoxLayout shall utilize &apos;Alignment&apos;, giving directive 
about how each Shape shall be aligned to its field:
- Fill (scale up to field size)
- Center Horizontal
- Center Vertical

....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6868</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2023-09-24 01:01:55 +0200</bug_when>
    <thetext>Most interesting ..

6a0ac90182efba40b0e6dab8f6390898aced70e8
GraphUI GridLayout: Functional Grid Layout w/ Padding, demo&apos;ed in UISceneDemo20 with button Groups
    
    All layout magic is simply performed in Group.Layout.layout(..) @ validate, incl. updating the

+++

aca5b9b176f3c3393d8c7666a252488d44b18f2e
    GraphUI GridLayout: Also adjust potential bottom-left delta when centering shape to cell (like GlyphShape w/ underline)

+++

70d2b056e69562e83156d0435208be8124f2ff86
    GraphUI: Add BoxLayout and Margin, todo: Have GridLayout properly use Gap w/ Padding and alignment (Margin?) (CSS alike)

+++

a9c76153fd9a472679c1fc85189f6d4ecda7979e
    GraphUI Working GridLayout w/ and w/o cell-size and alignment; Added BoxLayout.

+++

8439522d73b60bcf61cc59550df6297bbafe73fb
    GraphUI Layout Alignment: Separate center alignment to horizontal and vertical

+++

ddd6cac8cc658ce542cb98e85f7d262f9917d37a

GraphUI Layout: Fix BoxLayout scale, margin and padding; Add same padding behavior to BoxLayout and GridLayout.

For all:
- Padding is applied to each {@Shape} via {@link Shape#setPaddding(Padding)} if passed in constructor
    
BoxLayout:
- Optionally centered {@link Alignment.Bit#CenterHoriz horizontally}, {@link Alignment.Bit#CenterVert vertically} or {@link Alignment#Center both}.
- Optionally scaled to cell-size if given and {@link Alignment#Fill}
- Margin is ignored on dimension with center {@link Alignment}
- Not implemented {@link Alignment}: Top, Right, Bottom, Left
    
GridLayout:
- Optionally centered {@link Alignment.Bit#CenterHoriz horizontally}, {@link Alignment.Bit#CenterVert vertically} or {@link Alignment#Center both}.
- Optionally scaled to cell-size if given and {@link Alignment#Fill}
- Without cell-size behaves like a grid bag using individual shape sizes including padding
- Can be filled in {@link Order#COLUMN} or {@link Order#ROW} major-order.
- Not implemented {@link Alignment}: Top, Right, Bottom, Left
    
Changes to Group.Layout interface:
- Added preValidate(Shape) allowing to prepare the shape before validation, used to inject Padding
    
Changes to Margin:
- Removed the complex CENTER property and using Alignment in BoxLayout as well
    
Changes to BoxLayout:
- Using Alignment
    
+++ 
    
Tested via UILayoutBox01 and UILayoutGrid01,
try the tooltip by clicking on the group&apos;s description label.

+++

e5de90b67efe8e8ca518159b3a73295d751764c1
GraphUI BoxLayout: Margin is only ignored for center Alignment w/o Fill scale. {Box,Grid}Layout: Always remove Bottom-Left delta a
nd refine API doc of  incl scale behavior

+++

e676a65eac2bfa2abbfcd346492868ed17dc4667
    GraphUI Layout (Box/Grid): Adjust bottom-left offset according to center-axis


+++</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>