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

Provide an interface for "disabled/enabled" control

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      A DESCRIPTION OF THE REQUEST :
      Both Action objects and Component objects can be enabled or disabled.

      However, they don't share a common hierarchy of classes that both contain the methods to enable and disable them.

      The swingutil.dev.java.net project provides a ComponentUpdateThead class which allows you to specify a set of components, or actions to be disabled while the remote activities are occuring. This makes it easy to control the users actions related to the request of remote work and waiting for it to complete.

      The signatures for constructing a ComponentUpdateThread utilize the varargs support to allow a list of Components or Actions to be specified. It would be nice, if, instead, there were an interface such as

      public interface EnableControl {
          public void setEnabled( boolean how );
      }

      which both Action and Component used. This would allow the components and actions to be specified in one list, and it would also allow other, non-GUI control to be disabled/enabled during remote access.

      JUSTIFICATION :
      I can create such an interface, but I can't provide an implementation for every Component and Action without using a delegation model. This is pretty messy, and not really ideal.

        Attachments

          Activity

            People

            • Assignee:
              son Oleg Sukhodolsky (Inactive)
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: