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

RFE: Need method java.awt.Toolkit.getScreenInsets()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • client-libs
    • x86
    • windows_nt

      Our input method wants a new method to get location of valid area except taskbar of windows95/NT.

      We propose to add a new method java.awt.Toolkit.getScreenInsets().
        
      If such a method is not added, there is no way to avoid taskbar for displaying input method window to right-bottom of screen.

      /**
      * return infomation of invalid area.
      */
      public java.awt.Insets getScreenInsets();

      Supplementation:

        In current implementation of java.awt.Toolkit.getScreenSize(),
      ::GetSystemMetrics(SM_CXSCREEN) and
      ::GetSystemMetrics(SM_CYSCREEN) method is used. However, taskbar is
       not considered.


        Even if ::GetSystemMetrics(SM_CXFULLSCREEN) and ::GetSystemMetrics(SM_CYFULLSCREEN) from which taskbar is considered
       is used, we can only get width of valid area and can't get location.
        

        And the location of Task Bar is changed dynamically.
        To accord Task Bar's motion, the following implementation is necessary.
          - Set key-name (it should be public name) and Insets to
              java.awt.Toolkit#desktopProperties.
          - Inform them to PropertyChangedListener when Task Bar is changed.
        
        Toolkit#getScreenSize and Toolkit#getScreenResolution need the same
      implementation.

            bchristi Brent Christian
            nlindenbsunw Norbert Lindenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: