[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8293119: Additional constrained resize policies for Tree/TableView [v15]
From:       Andy Goryachev <angorya () openjdk ! org>
Date:       2022-11-30 23:11:39
Message-ID: 2bCJ0F4cRdoeOtjI_7u_zCaG5oZ-Z186_Ff8j83_Dfo=.85c1ae1a-4704-419a-bf02-6f9dcd3d8d69 () github ! com
[Download RAW message or body]

> The current CONSTRAINED_RESIZE_POLICY has a number of issues as explained in \
> [JDK-8292810](https://bugs.openjdk.org/browse/JDK-8292810). 
> We propose to address all these issues by replacing the old column resize algorithm \
> with a different one, which not only honors all the constraints when resizing, but \
> also provides 4 different resize modes similar to JTable's. The new implementation \
> brings changes to the public API for Tree/TableView and ResizeFeaturesBase classes. \
> Specifically: 
> - create a public abstract javafx.scene.control.ConstrainedColumnResizeBase class
> - provide an out-of-the box implementation via \
> javafx.scene.control.ConstrainedColumnResize class, offeting 4 resize modes: \
> AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_SUBSEQUENT_COLUMNS, AUTO_RESIZE_LAST_COLUMN, \
>                 AUTO_RESIZE_ALL_COLUMNS
> - add corresponding public static constants to Tree/TableView
> - make Tree/TableView.CONSTRAINED_RESIZE_POLICY an alias to \
>                 AUTO_RESIZE_SUBSEQUENT_COLUMNS (a slight behavioral change - \
>                 discuss)
> - add getContentWidth() and setColumnWidth(TableColumnBase<S,?> col, double width) \
>                 methods to ResizeFeatureBase
> - suppress the horizontal scroll bar when resize policy is instanceof \
>                 ConstrainedColumnResizeBase
> - update javadoc
> 
> 
> Notes
> 
> 1. The current resize policies' toString() methods return "unconstrained-resize" \
> and "constrained-resize", used by the skin base to set a pseudostate. All \
> constrained policies that extend ConstrainedColumnResizeBase will return \
> "constrained-resize" value. 2. The reason an abstract class ( \
> ConstrainedColumnResizeBase) was chosen instead of a marker interface is exactly \
> for its toString() method which supplies "constrained-resize" value. The \
> implementors might choose to use a different value, however they must ensure the \
> stylesheet contains the same adjustments for the new policy as those made in \
> modena.css for "constrained-resize" value.

Andy Goryachev has updated the pull request incrementally with two additional commits \
since the last revision:

 - 8293119: more integers
 - 8293119: more integers

-------------

Changes:
  - all: https://git.openjdk.org/jfx/pull/897/files
  - new: https://git.openjdk.org/jfx/pull/897/files/82a3d920..51294663

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=897&range=14
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=897&range=13-14

  Stats: 28 lines in 1 file changed: 0 ins; 15 del; 13 mod
  Patch: https://git.openjdk.org/jfx/pull/897.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/897/head:pull/897

PR: https://git.openjdk.org/jfx/pull/897


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic