Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-2887

[classlib][swing] javax.swing.plaf.basic.BasicTabbedPaneUI.getRolloverTab() default implementation returns -1 when RI returns 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      javax.swing.plaf.basic.BasicTabbedPaneUI.getRolloverTab() returns -1 on Harmony, when RI reurns 0.
      Seems that this is a bug in RI, as specification says that getRolloverTab() should return -1 if the mouse is no longer over any tab.

      Test to reproduce:

      import javax.swing.plaf.basic.*;

      class lBasicTabbedPaneUI extends BasicTabbedPaneUI {
      public lBasicTabbedPaneUI()

      { super(); }

      public int getRolloverTab()

      { return super.getRolloverTab(); }

      }

      public class TestForBugReproduce
      {
      public static void main(String args[])

      { lBasicTabbedPaneUI localBasicTabbedPaneUI = new lBasicTabbedPaneUI(); int returnValue = localBasicTabbedPaneUI.getRolloverTab(); System.out.println("returnValue = " + returnValue); }

      }

      Output on RI:
      ================
      returnValue = 0

      Output on Harmony:
      ================
      returnValue = -1

      Attachments

        Activity

          People

            zakha Alexei Zakharov
            ilya.okomin Ilya Okomin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: