rc1 release tag
diff --git a/org.eclipse.scout.rt.client/Release Notes.txt b/org.eclipse.scout.rt.client/Release Notes.txt
index 39cf611..f2bef42 100644
--- a/org.eclipse.scout.rt.client/Release Notes.txt
+++ b/org.eclipse.scout.rt.client/Release Notes.txt
@@ -379,3 +379,19 @@
 AbstractTable:

 - protected Class<? extends AbstractBooleanColumn> getConfiguredCheckableColumn();

 Migration: None

+

+17.05.2011 sle

+bsi ticket 102'010: ScoutInfoForm looks ugly (in SWT)

+Problem: 

+a) ScoutInfoForm does not look nice in SWT

+b) ... does not have a Default-Logo

+c) ... has a quirky way of getting the logo.

+

+Solution: 

+a) In Swing the GridData is different than for the other ui-layers.

+b) The Bundle org.eclipse.scout.rt.client has now a Default-Logo.

+c) The Logo is searched with th IconLocator.

+

+Migration:

+If ScoutInfoForm is overwritten to be able to get the correct logo this is not necessary anymore. Just the IIconProviderService 

+has to be registered and an Icon with the name application_logo_large.png must be in a bundle. 
\ No newline at end of file
diff --git a/org.eclipse.scout.rt.client/resources/icons/application_logo_large.png b/org.eclipse.scout.rt.client/resources/icons/application_logo_large.png
new file mode 100644
index 0000000..6ff2f49
--- /dev/null
+++ b/org.eclipse.scout.rt.client/resources/icons/application_logo_large.png
Binary files differ
diff --git a/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/ScoutInfoForm.java b/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/ScoutInfoForm.java
index 97a3fc5..0f35e5d 100644
--- a/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/ScoutInfoForm.java
+++ b/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/form/ScoutInfoForm.java
@@ -10,6 +10,7 @@
  ******************************************************************************/

 package org.eclipse.scout.rt.client.ui.form;

 

+import java.io.ByteArrayInputStream;

 import java.net.URL;

 import java.util.ArrayList;

 import java.util.Collection;

@@ -17,6 +18,7 @@
 

 import org.eclipse.core.runtime.IProduct;

 import org.eclipse.core.runtime.Platform;

+import org.eclipse.scout.commons.BooleanUtility;

 import org.eclipse.scout.commons.annotations.Order;

 import org.eclipse.scout.commons.exception.ProcessingException;

 import org.eclipse.scout.commons.logger.IScoutLogger;

@@ -24,6 +26,7 @@
 import org.eclipse.scout.commons.nls.NlsLocale;

 import org.eclipse.scout.rt.client.ClientSyncJob;

 import org.eclipse.scout.rt.client.IClientSession;

+import org.eclipse.scout.rt.client.services.common.icon.IconSpec;

 import org.eclipse.scout.rt.client.services.common.perf.IPerformanceAnalyzerService;

 import org.eclipse.scout.rt.client.ui.form.ScoutInfoForm.MainBox.CloseButton;

 import org.eclipse.scout.rt.client.ui.form.ScoutInfoForm.MainBox.GroupBox.HtmlField;

@@ -83,19 +86,21 @@
   @Order(10.0f)

   public class MainBox extends AbstractGroupBox {

 

-    @Override

-    protected int getConfiguredGridColumnCount() {

-      return 1;

+    private Boolean m_isSwing = null;

+

+    private boolean isSwing() {

+      if (m_isSwing == null) {

+        m_isSwing = (Platform.getBundle("org.eclipse.scout.rt.ui.swing") != null);

+      }

+      return BooleanUtility.nvl(m_isSwing);

     }

 

     @Override

     protected boolean getConfiguredGridUseUiWidth() {

-      return true;

-    }

-

-    @Override

-    protected boolean getConfiguredGridUseUiHeight() {

-      return true;

+      if (isSwing()) {

+        return true;

+      }

+      return false;

     }

 

     @Order(10.0f)

@@ -103,16 +108,15 @@
 

       @Override

       protected boolean getConfiguredGridUseUiWidth() {

-        return true;

-      }

-

-      @Override

-      protected boolean getConfiguredGridUseUiHeight() {

-        return true;

+        if (isSwing()) {

+          return true;

+        }

+        return false;

       }

 

       @Order(10.0f)

       public class HtmlField extends AbstractHtmlField {

+

         @Override

         protected boolean getConfiguredLabelVisible() {

           return false;

@@ -124,13 +128,40 @@
         }

 

         @Override

+        protected boolean getConfiguredScrollBarEnabled() {

+          return false;

+        }

+

+        @Override

         protected boolean getConfiguredGridUseUiWidth() {

-          return true;

+          if (isSwing()) {

+            return true;

+          }

+          return false;

         }

 

         @Override

         protected boolean getConfiguredGridUseUiHeight() {

-          return true;

+          if (isSwing()) {

+            return true;

+          }

+          return false;

+        }

+

+        @Override

+        protected int getConfiguredGridW() {

+          if (isSwing()) {

+            return 1;

+          }

+          return 2;

+        }

+

+        @Override

+        protected int getConfiguredGridH() {

+          if (isSwing()) {

+            return 1;

+          }

+          return 20;

         }

 

         @Override

@@ -140,7 +171,6 @@
           }

         }

       }

-

     }

 

     @Order(20.0f)

@@ -157,7 +187,11 @@
     if (f != null && !f.hasContent()) {

       // try to load bundle resource

       try {

-        f.readData(org.eclipse.scout.rt.shared.Activator.getDefault().getBundle().getResource("resources/icons/application_logo_large.png").openStream());

+        IClientSession clientSession = ClientSyncJob.getCurrentSession();

+        IconSpec iconSpec = clientSession.getIconLocator().getIconSpec("application_logo_large.png");

+        ByteArrayInputStream is = new ByteArrayInputStream(iconSpec.getContent());

+        f.readData(is);

+        is.close();

       }

       catch (Exception ex2) {

         LOG.info(null, ex2);

diff --git a/org.eclipse.scout.rt.ui.swing/Release Notes.txt b/org.eclipse.scout.rt.ui.swing/Release Notes.txt
index 3a897fb..1dbce44 100644
--- a/org.eclipse.scout.rt.ui.swing/Release Notes.txt
+++ b/org.eclipse.scout.rt.ui.swing/Release Notes.txt
@@ -86,3 +86,12 @@
 is also set back to its original state. Problem: The user cannot unset/correct the error status.

 

 Change: The value on the ui is kept on its state set from the user, so the user can correct it according to its error status/exclamation mark.

+

+17.05.2011 imo

+bsi ticket 102'175

+When a user double-clicks on a row in a TablePage, the tree is automatically expanded, the corresponding node is selected, and the tree is scrolled, such that the selected node and as many as possible of its sub nodes are visible.

+This behaviour is confusing when browsing trees with nodes that have long labels. The current implementation tries to move as much as possible of the target nodes rectangle to the visible area. For nodes that are on deeper levels, this means, that the tree is scrolled horizontally and the node is drawn on the left side of the tree border (Figures 1, 2). When the user wants to get back to the parent node, it might not be recognizable anymore.

+The same applies, when getConfiguredScrollToSelection() is true, or the method scrollToSelection() is called manually.

+The tree should only automatically scroll horizontally when the node would be completely off the right side of the tree's border. To prevent the tree from "jumping" too much around, only a small part of the node's label should be guaranteed to be drawn. The proposed patch (currently only for Swing, there might be better approaches...) uses a maximum of 30 pixels or 25% of the node's width. The result is more like what the user would expect.

+Change: as proposer

+Migration: None

diff --git a/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/ext/JTreeEx.java b/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/ext/JTreeEx.java
index f83f459..4742ad4 100644
--- a/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/ext/JTreeEx.java
+++ b/org.eclipse.scout.rt.ui.swing/src/org/eclipse/scout/rt/ui/swing/ext/JTreeEx.java
@@ -24,6 +24,7 @@
 import javax.swing.TransferHandler;

 import javax.swing.UIManager;

 import javax.swing.plaf.UIResource;

+import javax.swing.tree.TreePath;

 import javax.swing.tree.TreeSelectionModel;

 

 import org.eclipse.scout.rt.ui.swing.SwingUtility;

@@ -149,4 +150,26 @@
     m_preferredScrollableViewportSize = d;

   }

 

+  /**

+   * Custom implementation that tries to prevent unnecessary horizontal

+   * scrolling of the tree. It's a copy of the default implementation,

+   * with the only difference that it limits the width of the visible

+   * rect of the target node to <i>max(30 Pixels, 25% of total width)</i>.

+   */

+  @Override

+  public void scrollPathToVisible(TreePath treePath) {

+    if (treePath != null) {

+      makeVisible(treePath);

+      Rectangle pathBounds = getPathBounds(treePath);

+      if (pathBounds != null) {

+        // <NoHorizontalScrollPatch>

+        pathBounds.width = Math.max(30, (int) (0.25 * pathBounds.width));

+        // </NoHorizontalScrollPatch>

+        scrollRectToVisible(pathBounds);

+        if (accessibleContext != null) {

+          ((AccessibleJTree) accessibleContext).fireVisibleDataPropertyChange();

+        }

+      }

+    }

+  }

 }