You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Dmitry Irlyanov (JIRA)" <ji...@apache.org> on 2007/07/17 10:00:24 UTC

[jira] Created: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

[classlib][swing] JSlider scrolls if it's unneded
-------------------------------------------------

                 Key: HARMONY-4480
                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Dmitry Irlyanov
            Priority: Minor


The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.

This behavior represented by The following test and screenshots (my apologies, I haven't good tool within reach):

import javax.swing.JFrame;
import javax.swing.JSlider;
import javax.swing.SwingConstants;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;

public class SliderTest {

    public static void main(String[] args)
            throws UnsupportedLookAndFeelException {

        // Set up the look and feel to return BasicSliderUI
        UIManager.setLookAndFeel(new MetalLookAndFeel() {
            @Override
            protected void initClassDefaults(UIDefaults uiDefs) {
                super.initClassDefaults(uiDefs);
                uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
            }
        });

        JFrame frame = new JFrame("Test"); //$NON-NLS-1$
        frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 150);
        frame.setVisible(true);

    }

}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Irlyanov updated HARMONY-4480:
-------------------------------------

    Attachment: H4480-BasicSliderUI.patch

> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Priority: Minor
>         Attachments: H4480-BasicSliderUI.patch
>
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test:
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko resolved HARMONY-4480.
--------------------------------------

    Resolution: Fixed

The patch has been applied.
Please verify.

> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Assignee: Alexey Petrenko
>            Priority: Minor
>         Attachments: H4480-BasicSliderUI.patch
>
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test:
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reassigned HARMONY-4480:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Assignee: Alexey Petrenko
>            Priority: Minor
>         Attachments: H4480-BasicSliderUI.patch
>
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test:
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Irlyanov updated HARMONY-4480:
-------------------------------------

    Attachment: H's.gif

> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Priority: Minor
>         Attachments: H's.gif
>
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test and screenshots (my apologies, I haven't good tool within reach):
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Irlyanov updated HARMONY-4480:
-------------------------------------

    Description: 
The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.

This behavior represented by The following test:

import javax.swing.JFrame;
import javax.swing.JSlider;
import javax.swing.SwingConstants;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;

public class SliderTest {

    public static void main(String[] args)
            throws UnsupportedLookAndFeelException {

        // Set up the look and feel to return BasicSliderUI
        UIManager.setLookAndFeel(new MetalLookAndFeel() {
            @Override
            protected void initClassDefaults(UIDefaults uiDefs) {
                super.initClassDefaults(uiDefs);
                uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
            }
        });

        JFrame frame = new JFrame("Test"); //$NON-NLS-1$
        frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 150);
        frame.setVisible(true);

    }

}

  was:
The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.

This behavior represented by The following test and screenshots (my apologies, I haven't good tool within reach):

import javax.swing.JFrame;
import javax.swing.JSlider;
import javax.swing.SwingConstants;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;

public class SliderTest {

    public static void main(String[] args)
            throws UnsupportedLookAndFeelException {

        // Set up the look and feel to return BasicSliderUI
        UIManager.setLookAndFeel(new MetalLookAndFeel() {
            @Override
            protected void initClassDefaults(UIDefaults uiDefs) {
                super.initClassDefaults(uiDefs);
                uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
            }
        });

        JFrame frame = new JFrame("Test"); //$NON-NLS-1$
        frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 150);
        frame.setVisible(true);

    }

}


> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Priority: Minor
>         Attachments: H's.gif
>
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test:
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Irlyanov updated HARMONY-4480:
-------------------------------------

    Attachment:     (was: H's.gif)

> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Priority: Minor
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test:
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Irlyanov closed HARMONY-4480.
------------------------------------


Alexey, thank you 
Everything is OK

> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Assignee: Alexey Petrenko
>            Priority: Minor
>         Attachments: H4480-BasicSliderUI.patch
>
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test:
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4480) [classlib][swing] JSlider scrolls if it's unneded

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Irlyanov updated HARMONY-4480:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][swing] JSlider scrolls if it's unneded
> -------------------------------------------------
>
>                 Key: HARMONY-4480
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4480
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Priority: Minor
>         Attachments: H4480-BasicSliderUI.patch
>
>
> The JSlider behavior in RI and in Harmony is different. If one press the mouse button and holds it for a time Harmony's slider thumb will move around mouse pointer, but RI's slider won't.
> This behavior represented by The following test:
> import javax.swing.JFrame;
> import javax.swing.JSlider;
> import javax.swing.SwingConstants;
> import javax.swing.UIDefaults;
> import javax.swing.UIManager;
> import javax.swing.UnsupportedLookAndFeelException;
> import javax.swing.plaf.metal.MetalLookAndFeel;
> public class SliderTest {
>     public static void main(String[] args)
>             throws UnsupportedLookAndFeelException {
>         // Set up the look and feel to return BasicSliderUI
>         UIManager.setLookAndFeel(new MetalLookAndFeel() {
>             @Override
>             protected void initClassDefaults(UIDefaults uiDefs) {
>                 super.initClassDefaults(uiDefs);
>                 uiDefs.put("SliderUI", "javax.swing.plaf.basic.BasicSliderUI"); //$NON-NLS-1$//$NON-NLS-2$
>             }
>         });
>         JFrame frame = new JFrame("Test"); //$NON-NLS-1$
>         frame.add(new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50));
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(300, 150);
>         frame.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.