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

Would like to have tri-state toggles implemented.

XMLWordPrintable

    • sparc
    • generic

      Customer's descrption:

      In many dialogs, a checkmark is the logical user interface element for describing attributes like bold,
      italic and so on. Unfortunately, if the slection is hetergenous (some bold, some not-bold),
      the interface needs a third state for the toggle button.. Likewise, there is a difference in a
      word processor ( or spreadsheet for that matter) between text that is explicitly bold (or not-bold)
      and test that inherits its weight attribute. Allowing the user to reset the attribute without
      introducing another component (or using a Choice component) is what the users want
      and expect.

      The c.setValue() with no arguments could enter the 3-rd state.

      My comments:

      I found this a bit cryptic so I called the customer up to get a clearer description of the problem.
      He had me bring up applixware which I understand you can do from any machine with in
      Sun by typing:

      -applix &. from a command shell.

      -Then select the word processor.

      -Enter 20 characters into the word processor.

      -Now select the middle 10 or so characters with mouse.

      -Hit control-B. Now the selected characters are bold.

      -Now select a group of characters where some are bold and
         others are not.. From the Attributes menu select
         Character settings.

      Notice the state of the bold toggle. It is gray. If you click on it
      once, it goes to clear (which means all of the characters should be
      set to not bold) click on it again it appears bold meaning all the characters
      should be bold. Click on it again and it appears grey again indicating
      all the characters should be left as is.

      Here is a proposed API:

      Currently, toggles have the method:

      c.setState(boolean val)

      Add new method:
      c.setState()

      This method sets the toggle to the third state.

      Another new method should be created that specifies whether the button toggles-thru
      the third state.

      c.triState(boolean val)



            xdengsunw Xianfa Deng (Inactive)
            tkincaidsunw Tom Kincaid (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: