Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1552

Fix info icon display on error dialog

    Details

      Description

      On Windows, info icon is not display properly.

        Attachments

        1. Icon.JPG
          Icon.JPG
          138 kB
        2. infoicon_corrected.PNG
          infoicon_corrected.PNG
          191 kB
        3. infoicon.PNG
          infoicon.PNG
          90 kB
        4. mac.png
          mac.png
          123 kB

          Issue Links

            Activity

            ann.loraine Ann Loraine created issue -
            ann.loraine Ann Loraine made changes -
            Field Original Value New Value
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            svallapu Sai Charan Reddy Vallapureddy (Inactive) made changes -
            Attachment Icon.JPG [ 14281 ]
            ann.loraine Ann Loraine made changes -
            Sprint Summer 2019 Sprint 10 [ 69 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked lower
            ann.loraine Ann Loraine made changes -
            Sprint Summer 2019 Sprint 10 [ 69 ] Summer 2019 Sprint 9 [ 68 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Sprint Summer 2019 Sprint 9 [ 68 ] Summer 2019 Sprint 8 [ 67 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked lower
            noor91zahara Noor Zahara (Inactive) made changes -
            Assignee Noor Zahara [ noor91zahara ]
            noor91zahara Noor Zahara (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment - - edited

            I changed the resolution of my screen to 800x600 and this issue was resolved.
            Solutions:
            1. To set custom icon instead of JOptionPane dialog box creation
            2. Change App/Screen resolution through Java code.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - - edited I changed the resolution of my screen to 800x600 and this issue was resolved. Solutions: 1. To set custom icon instead of JOptionPane dialog box creation 2. Change App/Screen resolution through Java code.
            Hide
            nfreese Nowlan Freese added a comment -

            Is the issue related to the info icon not displaying correctly, or not displaying the IGB icon? What is the correct behavior? On Mac the IGB icon is shown.

            Show
            nfreese Nowlan Freese added a comment - Is the issue related to the info icon not displaying correctly, or not displaying the IGB icon? What is the correct behavior? On Mac the IGB icon is shown.
            nfreese Nowlan Freese made changes -
            Attachment mac.png [ 14331 ]
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            The issue what I see is the info icon not displaying properly.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - The issue what I see is the info icon not displaying properly.
            noor91zahara Noor Zahara (Inactive) made changes -
            Attachment infoicon.PNG [ 14332 ]
            noor91zahara Noor Zahara (Inactive) made changes -
            Attachment infoicon_corrected.PNG [ 14333 ]
            noor91zahara Noor Zahara (Inactive) made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            ann.loraine Ann Loraine made changes -
            Sprint Summer 2019 Sprint 8 [ 67 ] Summer 2019 Sprint 8, Summer 2019 Sprint 9 [ 67, 68 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Epic Link IGBF-1765 [ 17855 ]
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Next step as per discussion today: Find a way to get Java Swing to stop showing "i" and "?" images.

            Show
            ann.loraine Ann Loraine added a comment - - edited Next step as per discussion today: Find a way to get Java Swing to stop showing "i" and "?" images.
            noor91zahara Noor Zahara (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            ann.loraine Ann Loraine added a comment -

            I found this link that describes the anatomy of a dialog box (also called "popup") in Windows:

            I think we should understand the conventions recommended for Windows applications and do our best to respect them so that Windows users will feel "at home" in IGB.

            Same for Mac users.

            I'm not sure how to do that, though! Let's do some research into it.

            Show
            ann.loraine Ann Loraine added a comment - I found this link that describes the anatomy of a dialog box (also called "popup") in Windows: https://docs.microsoft.com/en-us/windows/desktop/uxguide/win-dialog-box I think we should understand the conventions recommended for Windows applications and do our best to respect them so that Windows users will feel "at home" in IGB. Same for Mac users. I'm not sure how to do that, though! Let's do some research into it.
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            [~aloraine]

            Found a link that explains that MAC does not support frame icons: https://stackoverflow.com/questions/23378119/setimageicon-doesnt-set-jframe-icon-on-mac-swing-window

            I did some experiments with MAC and Windows

            Findings :
            1. Whenever a dialog box is created using JOptionPane and a message type is specified such as INFORMATION_MESSAGE, QUESTION_MESSAGE etc, on windows, a dialog opens with appropriate icon but on mac a default java icon appears as they are not supported on MAC.
            2. On MAC, we set the dockIcon image using the below code
            if (IS_MAC) {
            MacIntegration mi = MacIntegration.getInstance();
            if (applicationIconImage != null)

            { mi.setDockIconImage(applicationIconImage); }

            }
            as mac cannot detect the setIconImage method of JFrame class.Hence, the image appears on the dialog boxand not as a icon.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - [~aloraine] Found a link that explains that MAC does not support frame icons: https://stackoverflow.com/questions/23378119/setimageicon-doesnt-set-jframe-icon-on-mac-swing-window I did some experiments with MAC and Windows Findings : 1. Whenever a dialog box is created using JOptionPane and a message type is specified such as INFORMATION_MESSAGE, QUESTION_MESSAGE etc, on windows, a dialog opens with appropriate icon but on mac a default java icon appears as they are not supported on MAC. 2. On MAC, we set the dockIcon image using the below code if (IS_MAC) { MacIntegration mi = MacIntegration.getInstance(); if (applicationIconImage != null) { mi.setDockIconImage(applicationIconImage); } } as mac cannot detect the setIconImage method of JFrame class.Hence, the image appears on the dialog boxand not as a icon.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            On the Windows dialogs in the attached images, I see images appearing in two locations:

            • upper left corner (IGB logo image)
            • an image within the content of the dialog itself – a question mark or lowercase "i" character

            On Windows, the images appearing in the content of the dialog are not being rendered correctly.
            Why not?

            Where are these question mark and lowercase i character images obtained? Are they coming from the IGB project code base?

            Show
            ann.loraine Ann Loraine added a comment - - edited On the Windows dialogs in the attached images, I see images appearing in two locations: upper left corner (IGB logo image) an image within the content of the dialog itself – a question mark or lowercase "i" character On Windows, the images appearing in the content of the dialog are not being rendered correctly. Why not? Where are these question mark and lowercase i character images obtained? Are they coming from the IGB project code base?
            Hide
            ann.loraine Ann Loraine added a comment -

            Please clarify:

            "a dialog opens with appropriate icon but on mac a default java icon appears as they are not supported on MAC."

            The only icon being shown on the Mac dialog is the IGB logo, which isn't a default java icon.

            ??????

            Show
            ann.loraine Ann Loraine added a comment - Please clarify: "a dialog opens with appropriate icon but on mac a default java icon appears as they are not supported on MAC." The only icon being shown on the Mac dialog is the IGB logo, which isn't a default java icon. ??????
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment - - edited

            On windows - The upper left icon on the dialog box appears whenever we are setting the icon using setIconImage method provided by JFrame class. The image that is seen within the dialog box is the one that gets generated according to the message type set while creating the dialog box.(eg 'i' icon for information, '?' for help etc).

            On Mac - MAC doesn't show an upper left icon - it shows red, yellow, green circle instead. We are using a class named MacIntegration so that IGB will behave more mac-like on OS X. This class contains a method named setDockIconImage which is a Wrapper around Apple's com.apple.eawt.setDockIconImage. And wherever this method is set in case of mac, the IGB icon is shown else the default java cup image appears.

            Note: By default Java icon, I mean the java cup image.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - - edited On windows - The upper left icon on the dialog box appears whenever we are setting the icon using setIconImage method provided by JFrame class. The image that is seen within the dialog box is the one that gets generated according to the message type set while creating the dialog box.(eg 'i' icon for information, '?' for help etc). On Mac - MAC doesn't show an upper left icon - it shows red, yellow, green circle instead. We are using a class named MacIntegration so that IGB will behave more mac-like on OS X. This class contains a method named setDockIconImage which is a Wrapper around Apple's com.apple.eawt.setDockIconImage. And wherever this method is set in case of mac, the IGB icon is shown else the default java cup image appears. Note: By default Java icon, I mean the java cup image.
            Hide
            ann.loraine Ann Loraine added a comment -

            Follow up question:
            I'm still confused about what "default java icon" means. (Sorry to be so dense!)
            This is what the word "icon" means to me:

            Show
            ann.loraine Ann Loraine added a comment - Follow up question: I'm still confused about what "default java icon" means. (Sorry to be so dense!) This is what the word "icon" means to me: https://www.computerhope.com/jargon/i/icon.htm But in Java, seems like the word "icon" can also mean the images (e.g. "i" and "?") appearing in the content area of dialogs: http://en-human-begin.blogspot.com/2007/11/javas-icons-by-default.html
            Hide
            ann.loraine Ann Loraine added a comment -

            Other java GUI-based applications to use as possible examples:

            • Cytoscape
            • JalView
            • IGV
              Are there others?
              We need to research how other Java applications have solved the image resolution problem described above.
            Show
            ann.loraine Ann Loraine added a comment - Other java GUI-based applications to use as possible examples: Cytoscape JalView IGV Are there others? We need to research how other Java applications have solved the image resolution problem described above.
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment - - edited

            I found another link which explains the reason why the icons are getting cropped on Windows 10.The solution is available in JDK 9.

            https://stackoverflow.com/questions/33926645/joptionpane-icon-gets-cropped-in-windows-10

            https://bugs.openjdk.java.net/browse/JDK-8151385

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - - edited I found another link which explains the reason why the icons are getting cropped on Windows 10.The solution is available in JDK 9. https://stackoverflow.com/questions/33926645/joptionpane-icon-gets-cropped-in-windows-10 https://bugs.openjdk.java.net/browse/JDK-8151385
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment - - edited

            I went through the code base of cytoscape and couldn't find any solution regarding resolution.
            Also I tried implementing the solution suggested on google but doesn't seem to work as we are trying to access a private final class.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - - edited I went through the code base of cytoscape and couldn't find any solution regarding resolution. Also I tried implementing the solution suggested on google but doesn't seem to work as we are trying to access a private final class.
            Hide
            ann.loraine Ann Loraine added a comment -

            Is the bug fixed in open JDK?

            Show
            ann.loraine Ann Loraine added a comment - Is the bug fixed in open JDK?
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            I wasn't actually able to track down to that but I have fixed the issue by adding appropriate images from our code base.
            That seem to work.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - I wasn't actually able to track down to that but I have fixed the issue by adding appropriate images from our code base. That seem to work.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            If we move ahead with using our own custom images:

            • Please provide step-by-step instructions for testers to open and view dialogs showing each of the new images added. (They will test using installer for the branch)
            • Provide a link to each of the images used if obtained from others
            • Don't add images to the code base unless they are freely available and OK for sharing in an open source code base

            Testers:

            • Follow instructions to open & view dialogs showing each image
            • Check different screen resolutions on Windows 10
            • Check on Mac (should be no difference in behavior)
            Show
            ann.loraine Ann Loraine added a comment - - edited If we move ahead with using our own custom images: Please provide step-by-step instructions for testers to open and view dialogs showing each of the new images added. (They will test using installer for the branch) Provide a link to each of the images used if obtained from others Don't add images to the code base unless they are freely available and OK for sharing in an open source code base Testers: Follow instructions to open & view dialogs showing each image Check different screen resolutions on Windows 10 Check on Mac (should be no difference in behavior)
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            I downloaded the images online and are free to use them in our code base.

            Images Added are - info, help, error and warning .

            The links I used to download them -
            https://www.iconfinder.com/icons/55188/32_x_32_px_icon
            http://www.softicons.com/toolbar-icons/glassy-buttons-icons-by-curtivearticide/question-mark-icon

            Testing Instructions:

            1. Open each of the dialog box on IGB eg : File -> Open URL and check for the images on the dialog box if they are cropped or not.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - I downloaded the images online and are free to use them in our code base. Images Added are - info, help, error and warning . The links I used to download them - https://www.iconfinder.com/icons/55188/32_x_32_px_icon http://www.softicons.com/toolbar-icons/glassy-buttons-icons-by-curtivearticide/question-mark-icon Testing Instructions: 1. Open each of the dialog box on IGB eg : File -> Open URL and check for the images on the dialog box if they are cropped or not.
            Show
            noor91zahara Noor Zahara (Inactive) added a comment - Code changes : https://bitbucket.org/nzahara/integrated-genome-browser-local/branch/IGBF-1552#diff
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            Tried updating the the jre version to jre1.8.0_211 and the issue seems to be fixed.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - Tried updating the the jre version to jre1.8.0_211 and the issue seems to be fixed.
            noor91zahara Noor Zahara (Inactive) made changes -
            Link This issue is blocked by IGBF-1840 [ IGBF-1840 ]
            noor91zahara Noor Zahara (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            noor91zahara Noor Zahara (Inactive) made changes -
            Assignee Noor Zahara [ noor91zahara ]
            Hide
            ann.loraine Ann Loraine added a comment -

            Resolution:

            • Bug exists in JRE 1.8 - all versions tested.

            Will re-visit when we migrate to JRE 10 or later.

            Show
            ann.loraine Ann Loraine added a comment - Resolution: Bug exists in JRE 1.8 - all versions tested. Will re-visit when we migrate to JRE 10 or later.
            ann.loraine Ann Loraine made changes -
            Resolution Done [ 10000 ]
            Status Needs 1st Level Review [ 10005 ] Closed [ 6 ]
            ann.loraine Ann Loraine made changes -
            Workflow Loraine Lab Workflow [ 18273 ] Fall 2019 Workflow Update [ 20032 ]
            ann.loraine Ann Loraine made changes -
            Workflow Fall 2019 Workflow Update [ 20032 ] Revised Fall 2019 Workflow Update [ 22161 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: