Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8234885

Resize column with multi header don't work corectly

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      A DESCRIPTION OF THE PROBLEM :
      You have TreeTableView with multicolumn (each column has child). Resize column don't work corectly. You can increase column width but You cannot decrease width.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create some example Table with multi header columns.

      Drag to resize column width on second child, third column.
      Go with dragging to the left, before first column.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Columns always can be resizing.
      ACTUAL -
      Column width cannot be decrease.

      ---------- BEGIN SOURCE ----------
      public class PlainTableMain
      {

          public static void main( String[] args )
          {
              Application.launch( MainFx.class, args );
          }

          public static class MainFx extends Application
          {

              @Override
              public void start( Stage aPrimaryStage ) throws Exception
              {

                  TreeTableView treeTable = new TreeTableView<>();
                  treeTable.setPrefWidth( 400 );

                  treeTable.getColumns()
                      .add( generateColumn( "Col1" ) );
                  treeTable.getColumns()
                      .add( generateColumn( "Col2" ) );
                  treeTable.getColumns()
                      .add( generateColumn( "Col3" ) );
                  treeTable.getColumns()
                      .add( generateColumn( "Col4" ) );
                  treeTable.getColumns()
                      .add( generateColumn( "Col5" ) );

                  // Create the VBox
                  VBox root = new VBox( treeTable );

                  // Create the Scene
                  Scene scene = new Scene( root );
                  // Add the Scene to the Stage
                  aPrimaryStage.setScene( scene );
                  // Set the Title
                  aPrimaryStage.setTitle( "A simple TreeTableView" );
                  // Display the Stage
                  aPrimaryStage.show();
              }
          }

          private static TreeTableColumn generateColumn(String aName)
          {
              TreeTableColumn col1 = new TreeTableColumn( aName );
              TreeTableColumn col11 = new TreeTableColumn( aName + "1" );
              TreeTableColumn col12 = new TreeTableColumn( aName + "2" );
              TreeTableColumn col13 = new TreeTableColumn( aName + "3" );
              col1.getColumns().add( col11);
              col11.getColumns().add( col12);
              col12.getColumns().add( col13);
              return col1;
          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              arapte Ambarish Rapte
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: