Revision: 14669
          http://gate.svn.sourceforge.net/gate/?rev=14669&view=rev
Author:   markagreenwood
Date:     2011-12-05 10:48:53 +0000 (Mon, 05 Dec 2011)
Log Message:
-----------
added a prototype cell value to the resources list to stop it shrinking

Modified Paths:
--------------
    gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java

Modified: gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java
===================================================================
--- gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java        
2011-12-05 02:17:08 UTC (rev 14668)
+++ gate/trunk/src/gate/gui/creole/manager/AvailablePlugins.java        
2011-12-05 10:48:53 UTC (rev 14669)
@@ -18,6 +18,7 @@
 package gate.gui.creole.manager;
 
 import gate.Gate;
+import gate.Gate.ResourceInfo;
 import gate.gui.MainFrame;
 import gate.resources.img.svg.AddIcon;
 import gate.resources.img.svg.AvailableIcon;
@@ -176,7 +177,16 @@
     resourcesListModel = new ResourcesListModel();
     resourcesList = new JList(resourcesListModel);
     resourcesList.setCellRenderer(new ResourcesListCellRenderer());
+
+    // this is needed because otherwise the list gets really narrow most of the
+    // time. Strangely if we don't use a custom cell renderer it works fine so
+    // that must be where the actual bug is
+    ResourceInfo prototype =
+            new ResourceInfo("A rather silly long resource name",
+                    "java.lang.String", "this is a comment");
+    resourcesList.setPrototypeCellValue(prototype);
     resourcesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+
     // enable tooltips
     ToolTipManager.sharedInstance().registerComponent(resourcesList);
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to