dev@glassfish.java.net

Code review for 6670104

From: Paul Ho <Paul.Ho_at_Sun.COM>
Date: Sat, 01 Mar 2008 19:55:54 -0800

Bug #6670104 - product selection panel does not show product description

Output full description upon component select in PSP.


-- 
Paul Ho
paul.ho_at_sun.com
408/276-4658


diff -r 470a69e50a5d src/org/openinstaller/provider/ui/custom/psp/CUIProductSelectionPage.java
--- a/src/org/openinstaller/provider/ui/custom/psp/CUIProductSelectionPage.java Mon Feb 25 10:10:16 2008 -0800
+++ b/src/org/openinstaller/provider/ui/custom/psp/CUIProductSelectionPage.java Sat Mar 01 19:46:13 2008 -0800
@@ -386,9 +386,9 @@ public class CUIProductSelectionPage ext
   void updateDescription () {
     if (-1 != gSelectedsList.getSelectedIndex () && -1 != gAvailablesList.getSelectedIndex ()) {
       if (gSelectedsList.getSelectedValue() != null) {
- gDescription.setText(((ProductNodeInterface) gSelectedsList.getSelectedValue()).getShortDescription());
+ gDescription.setText(((ProductNodeInterface) gSelectedsList.getSelectedValue()).getDescription(Locale.getDefault()));
       } else if (gAvailablesList.getSelectedValue() != null) {
- gDescription.setText(((ProductNodeInterface) gAvailablesList.getSelectedValue()).getShortDescription());
+ gDescription.setText(((ProductNodeInterface) gAvailablesList.getSelectedValue()).getDescription(Locale.getDefault()));
       }
     }
   }
diff -r 470a69e50a5d src/org/openinstaller/provider/ui/custom/psp/GUIProductSelectionPage.java
--- a/src/org/openinstaller/provider/ui/custom/psp/GUIProductSelectionPage.java Mon Feb 25 10:10:16 2008 -0800
+++ b/src/org/openinstaller/provider/ui/custom/psp/GUIProductSelectionPage.java Sat Mar 01 19:46:13 2008 -0800
@@ -249,6 +249,7 @@ public class GUIProductSelectionPage ext
     theGridConst.insets = new Insets(0, 0, 17, 12);
     add(theSelectedsScroll, theGridConst);
     gDescription = new JTextArea();
+ gDescription.setLineWrap(true);
     final JScrollPane theTextScroll = new JScrollPane(gDescription);
     theTextScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
     theTextScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
@@ -367,13 +368,11 @@ public class GUIProductSelectionPage ext
    */
   void updateDescription () {
     if (gSelectedsList.getSelectedValue() != null) {
- gDescription.setText(((ProductNodeInterface) gSelectedsList.getSelectedValue()).getShortDescription()
- + " " + ((ProductNodeInterface) gSelectedsList.getSelectedValue()).getVersionStr());
+ gDescription.setText(((ProductNodeInterface) gSelectedsList.getSelectedValue()).getDescription(Locale.getDefault()));
     }
     else
     if (gAvailablesList.getSelectedValue() != null) {
- gDescription.setText(((ProductNodeInterface) gAvailablesList.getSelectedValue()).getShortDescription()
- + " " + ((ProductNodeInterface) gAvailablesList.getSelectedValue()).getVersionStr());
+ gDescription.setText(((ProductNodeInterface) gAvailablesList.getSelectedValue()).getDescription(Locale.getDefault()));
     }
   }