<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Apple Color Emoji";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Iosevka Fixed SS16";
panose-1:2 0 5 9 3 0 0 0 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:313948924;
mso-list-template-ids:-787036028;}
@list l1
{mso-list-id:715013495;
mso-list-template-ids:1616557568;}
@list l1:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Courier New",serif;color:black">Dear colleagues:</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">I would like to propose a replacement for the current constrained column resize policy implementation in Tree/TableView and related public API changes. Please refer to the main ticket
<a href="https://bugs.openjdk.org/browse/JDK-8293119">https://bugs.openjdk.org/browse/JDK-8293119</a> and a draft PR<span class="apple-converted-space"> </span><a href="https://github.com/openjdk/jfx/pull/897" title="https://github.com/openjdk/jfx/pull/897"><span style="font-family:"Calibri",sans-serif">https://github.com/openjdk/jfx/pull/897</span></a><span class="apple-converted-space"> </span>for
more details.</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">To illustrate behavior of the new policies, please check out a tester app,<span class="apple-converted-space"> </span><b>ATableViewResizeTester</b>, located in tests/manual/controls. In addition, you
can compare the new policies against the old CONSTRAINED_RESIZE_POLICY if you switch to a<span class="apple-converted-space"> </span><u>https://github.com/andy-goryachev-oracle/jfx/tree/8293119.constrained.demo</u> branch, where the old policy has not yet
been replaced with the new alternative.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">Your comments, suggestions, and especially any behavioral issues you might see with the tester will be greatly appreciated!</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">Thank you in advance,</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">-andy</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<b><span style="font-family:"Courier New",serif;color:black">Problem</span></b><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">The existing constrained column resize policy (Tree/TableView.CONSTRAINED_RESIZE_POLICY) has a number of issues most of which are listed in detail in<span class="apple-converted-space"> </span></span><span style="font-family:"Apple Color Emoji";color:black">☂</span><span class="apple-converted-space"><span style="font-family:"Courier New",serif;color:black"> </span></span><span style="font-family:"Courier New",serif;color:black"><a href="https://bugs.openjdk.org/browse/JDK-8292810" title="https://bugs.openjdk.org/browse/JDK-8292810"><span style="font-family:"Calibri",sans-serif">JDK-8292810</span></a>.
The current implementation fails to honor constraints, fails with empty tree/table, fails with multiple tables, shows/flickers the horizontal scroll bar, shows weird behavior when manually resizing columns in the presence of constraints; but the main issue
is that the user simply<span class="apple-converted-space"> </span><b>cannot</b><span class="apple-converted-space"> </span><b>create</b><span class="apple-converted-space"> </span>a custom column resize policy with setColumnResizePolicy() due to absence of
public APIs that provide the target width or allow for changing the column widths.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<b><span style="font-family:"Courier New",serif;color:black">Proposed Solution</span></b><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<ol style="margin-top:0in;caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px" start="1" type="1">
<li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span style="font-family:"Courier New",serif">Introduce a ConstrainedColumnResizeBase class as a base class for any constrained resize policy. The main purpose - turn off the horizontal scroll
bar and provide a "constrained-resize" pseudostyle via its toString() method.</span><o:p></o:p></li><li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span style="font-family:"Courier New",serif">Provide a new implementation via ConstrainedColumnResize class. The new implementation supports several resizing modes - some similar to JTable
resize modes, and two new modes that try to behave as the current resize policy (minus the bugs).</span><o:p></o:p></li><li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span style="font-family:"Courier New",serif">The current CONSTRAINED_RESIZE_POLICY constants in Tree/TableView is marked as deprecated.</span><o:p></o:p></li><li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span style="font-family:"Courier New",serif">The new resize policies are made available to the users via new constants (see below).</span><o:p></o:p></li><li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span style="font-family:"Courier New",serif">The current CONSTRAINED_RESIZE_POLICY becomes an alias for CONSTRAINED_RESIZE_POLICY_FLEX_TAIL, preserving binary compatibility and providing a similar
user experience.</span><o:p></o:p></li><li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span style="font-family:"Courier New",serif">Add code to dynamically remove "constrained-resize" pseudostyle when tree/table width exceeds the sum of maximum widths of all the columns, resulting
in an empty space appearing to the right of the columns. This in turn requires the vertical line at the right border of the last column to be painted. </span><o:p></o:p></li></ol>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<b><span style="font-family:"Courier New",serif;color:black">Resize Modes</span></b><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#FF2600">/**</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * A policy that tries to adjust other columns in order to fit the table width.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * <p><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * When column constraints make it impossible to fit all the columns into the allowed area,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * the columns are either clipped, or an empty space appears. This policy disables the horizontal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * scroll bar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#4E8F00">public</span> <span style="color:#4E8F00">static</span>
<span style="color:#4E8F00">final</span> Callback<TableView.ResizeFeatures, Boolean> CONSTRAINED_RESIZE_POLICY_ALL_COLUMNS
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#FF2600">/**</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * A policy that tries to adjust last column in order to fit the table width.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * <p><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * When column constraints make it impossible to fit all the columns into the allowed area,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * the columns are either clipped, or an empty space appears. This policy disables the horizontal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * scroll bar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#4E8F00">public</span> <span style="color:#4E8F00">static</span>
<span style="color:#4E8F00">final</span> Callback<TableView.ResizeFeatures, Boolean> CONSTRAINED_RESIZE_POLICY_LAST_COLUMN
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#FF2600">/**</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * A policy adjusts the next column in the opposite way in order to fit the table width.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * <p><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * When column constraints make it impossible to fit all the columns into the allowed area,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * the columns are either clipped, or an empty space appears. This policy disables the horizontal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * scroll bar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#4E8F00">public</span> <span style="color:#4E8F00">static</span>
<span style="color:#4E8F00">final</span> Callback<TableView.ResizeFeatures, Boolean> CONSTRAINED_RESIZE_POLICY_NEXT_COLUMN
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#FF2600">/**</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * A policy that tries to adjust subsequent columns in order to fit the table width.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * <p><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * When column constraints make it impossible to fit all the columns into the allowed area,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * the columns are either clipped, or an empty space appears. This policy disables the horizontal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * scroll bar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#4E8F00">public</span> <span style="color:#4E8F00">static</span>
<span style="color:#4E8F00">final</span> Callback<TableView.ResizeFeatures, Boolean> CONSTRAINED_RESIZE_POLICY_SUBSEQUENT_COLUMNS
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#FF2600">/**</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * A policy that tries to adjust columns, starting with the next one, in order to fit the table width.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * <p><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * When column constraints make it impossible to fit all the columns into the allowed area,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * the columns are either clipped, or an empty space appears. This policy disables the horizontal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * scroll bar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#4E8F00">public</span> <span style="color:#4E8F00">static</span>
<span style="color:#4E8F00">final</span> Callback<TableView.ResizeFeatures, Boolean> CONSTRAINED_RESIZE_POLICY_FLEX_HEAD
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#FF2600">/**</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * A policy that tries to adjust columns, starting with the last one, in order to fit the table width.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * <p><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * When column constraints make it impossible to fit all the columns into the allowed area,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * the columns are either clipped, or an empty space appears. This policy disables the horizontal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> * scroll bar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16";color:#FF2600"> */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Iosevka Fixed SS16"">
<span style="color:#4E8F00">public</span> <span style="color:#4E8F00">static</span>
<span style="color:#4E8F00">final</span> Callback<TableView.ResizeFeatures, Boolean> CONSTRAINED_RESIZE_POLICY_FLEX_TAIL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<b><span style="font-family:"Courier New",serif;color:black">Public API Changes</span></b><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">Please refer to a CSR<span class="apple-converted-space"> </span><a href="https://bugs.openjdk.org/browse/JDK-8294398" title="https://bugs.openjdk.org/browse/JDK-8294398"><span style="font-family:"Calibri",sans-serif">https://bugs.openjdk.org/browse/JDK-8294398</span></a><span class="apple-converted-space"> </span>for
more details; here is a brief summary:</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">ResizeFeaturesBase class:</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">- added getContentWidth()</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">- added setColumnWidth(TableColumnBase, double);</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">new abstract ConstrainedColumnResizeBase class:</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">- marker class, disables the horizontal scroll bar</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">Tree/TableView classes:</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">- added new policy constants (see above)</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black">- @Deprecated(since="20") CONSTRAINED_RESIZE_POLICY = CONSTRAINED_RESIZE_POLICY_FLEX_TAIL;</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif;color:black"> </span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:"Courier New",serif;color:black">Testing</span></b><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;orphans: auto;text-align:start;widows: auto;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-family:"Courier New",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif">I have no idea how to unit test new policies (see ResizeHelperTest). I wanted to exercise all the combinations of { policy | table width | number of columns (0,1,5) | constraints (min,pref,max)
}, but this test takes too much time even on fast machine.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif">The other alternative is to test only a few basic scenarios, but I feel it would be rather incomplete. A tester app seems to be the best solution so far, but it is certainly cannot be automated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif"><img border="0" width="873" height="395" style="width:9.0937in;height:4.1145in" id="Picture_x0020_1" src="cid:image001.png@01D8DA2A.4AD6C3A0" alt="Graphical user interface, application, table, Excel
Description automatically generated"></span><span style="font-family:"Courier New",serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif"><eom><o:p></o:p></span></p>
</div>
</body>
</html>