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

Expose pseudo class states for default and cancel buttons in Button, remove Button.STYLE_CLASS_STRONG

    Details

      Description

      Justification: There are two changes that are closely related:
      1) Initially, Button did not have API for setting 'default' and 'cancel' state, and it was recommended that developers set the Button.STYLE_CLASS_STRONG style class on buttons that they wanted to look like a 'default' button. Now that Button has setDefault and setCancel (as part of the accelerator / mnemonic changes recently), we are offering a simpler way to specify the default / strong button. We can therefore remove Button.STYLE_CLASS_STRONG with no loss of functionality. We will have to also edit caspian.css to remove references to strong, instead opting to use the new pseudo class states mentioned in 2) below.

      2) This isn't an API change per se, but it is adding two new pseudo class states to the CSS of all Button controls. The new states are for 'default' and 'cancel'. Exposing these two states allow for styling these buttons in CSS.

      A patch already exists that applies the second change, and has been reviewed by Jonathan.

        Attachments

          Activity

            People

            • Assignee:
              kwwong Kinsley Wong
              Reporter:
              rbair Richard Bair
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: