It was noticed that SuggestionPopup (or rather the skin) was always setting the
ListView it creates to be variable item height, which is rarely the case.  This
causes extra processing for no reason.  But it may, in fact, be required for
some renderers, so leave it the default, but add a new style to set it to false.


git-svn-id: https://svn.apache.org/repos/asf/pivot/trunk@1828188 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java
index 8e9f7ce..2598739 100644
--- a/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java
+++ b/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSuggestionPopupSkin.java
@@ -69,6 +69,7 @@
 
     private int closeTransitionDuration = DEFAULT_CLOSE_TRANSITION_DURATION;
     private int closeTransitionRate = DEFAULT_CLOSE_TRANSITION_RATE;
+    private boolean variableItemHeight = true;    // This is the historical default
 
     private ContainerMouseListener displayMouseListener = new ContainerMouseListener() {
         @Override
@@ -183,7 +184,7 @@
     private static final int DEFAULT_CLOSE_TRANSITION_RATE = 30;
 
     public TerraSuggestionPopupSkin() {
-        listView.getStyles().put(Style.variableItemHeight, true);
+        listView.getStyles().put(Style.variableItemHeight, variableItemHeight);
         listView.getListViewSelectionListeners().add(listViewSelectionListener);
         listView.getComponentKeyListeners().add(listViewKeyListener);
 
@@ -272,6 +273,15 @@
         this.closeTransitionRate = closeTransitionRate;
     }
 
+    public boolean isVariableItemHeight() {
+        return variableItemHeight;
+    }
+
+    public void setVariableItemHeight(boolean variableItemHeight) {
+        this.variableItemHeight = variableItemHeight;
+        listView.getStyles().put(Style.variableItemHeight, variableItemHeight);
+    }
+
     @Override
     public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
         SuggestionPopup suggestionPopup = (SuggestionPopup) getComponent();