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

Merging of Table.showGrid does not work in javax.swing.plaf.synth.SynthTableUI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P4
    • tbd
    • 7u55, 8, 9
    • client-libs

    Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      When the style bound to REGION=Table sets Table.showGrid=false, it will not be overwritten in a second style bound to a specific name, which tries to set Table.showGrid=false.
      Reason: The preliminary settings of the table will only be overwritten if Table.showGrid is false, if Table.showGrid is true, they won't be changed:

      boolean showGrid = style.getBoolean(context, "Table.showGrid", true);
      if (!showGrid) {
               table.setShowGrid(false);
       }



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The settings of the last style that is bound to my component (either by region or name) should be valid - independent of any previous values
      ACTUAL -
      The tutorial states that styles will be merged, and that the last one bound to my component will overwrite any previous settings

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Don't use the style bound to REGION=Table for the default table implementation, and a second one bound to a NAME for a specific table design. Instead, bind both table designs to a style by NAME and only use the default style for settings that actually will be overwritten.

      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: