Author: kono
Date: 2010-12-27 16:55:39 -0800 (Mon, 27 Dec 2010)
New Revision: 23268

Added:
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/ObjectPositionIcon.java
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/StrokeIcon.java
Removed:
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/LineTypeIcon.java
Modified:
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/LineStyle.java
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPlacerGraphic.java
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPositionValueEditor.java
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIcon.java
   
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIconFactory.java
   
core3/vizmap-gui-api/trunk/src/main/java/org/cytoscape/view/vizmap/gui/editor/ValueEditor.java
   
core3/vizmap-gui-impl/trunk/src/main/java/org/cytoscape/view/vizmap/gui/internal/editor/valueeditor/DiscreteValueEditor.java
Log:
Editor cell renderers are fixed.

Modified: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/LineStyle.java
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/LineStyle.java
  2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/LineStyle.java
  2010-12-28 00:55:39 UTC (rev 23268)
@@ -44,7 +44,7 @@
 
 import javax.swing.Icon;
 
-import org.cytoscape.ding.icon.LineTypeIcon;
+import org.cytoscape.ding.icon.StrokeIcon;
 import org.cytoscape.ding.icon.VisualPropertyIcon;
 import org.cytoscape.ding.impl.strokes.BackwardSlashStroke;
 import org.cytoscape.ding.impl.strokes.ContiguousArrowStroke;
@@ -167,7 +167,7 @@
         Map<Object,Icon> icons = new HashMap<Object,Icon>();
 
         for (LineStyle def : values()) {
-            LineTypeIcon icon = new LineTypeIcon(def.getStroke(5.0f), 
+            StrokeIcon icon = new StrokeIcon(def.getStroke(5.0f), 
                                                  
VisualPropertyIcon.DEFAULT_ICON_SIZE * 4, 
                                                  
VisualPropertyIcon.DEFAULT_ICON_SIZE, 
                                                                                
                 def.name());

Modified: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPlacerGraphic.java
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPlacerGraphic.java
        2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPlacerGraphic.java
        2010-12-28 00:55:39 UTC (rev 23268)
@@ -108,11 +108,7 @@
        private Stroke detailStroke = new BasicStroke(detailStrokeWidth);
        private Stroke lowStroke = new BasicStroke(lowStrokeWidth);
        
-       private final Dimension objectSize;
-       private final Dimension targetSize;
-       
 
-
        /**
         * A gui for placing a label relative to a node.
         * 
@@ -124,15 +120,14 @@
         *            whether or not to render at full detail or not
         */
        public ObjectPlacerGraphic(final Integer windowSize,
-                       boolean fullDetail, final String objectName, final 
Dimension objectSize, final Dimension targetSize) {
+                       boolean fullDetail, final String objectName) {
                super();
                
                this.p = new ObjectPositionImpl();
                
                this.objectLabel = objectName;
-               this.objectSize = objectSize;
-               this.targetSize = targetSize;
 
+
                renderDetail = fullDetail;
 
                if(windowSize == null)
@@ -150,6 +145,10 @@
 
                repaint();
        }
+       
+       public void setObjectPosition(final ObjectPosition op) {
+               this.p = op;
+       }
 
        private void initSize(int size) {
                // dimensions of panel
@@ -425,7 +424,7 @@
        /**
         * Applies the new ObjectPosition to the graphic.
         */
-       void applyPosition() {
+       public void applyPosition() {
                xOffset = (int) (p.getOffsetX() * offsetRatio);
                yOffset = (int) (p.getOffsetY() * offsetRatio);
                justify = p.getJustify();

Modified: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPositionValueEditor.java
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPositionValueEditor.java
  2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/ObjectPositionValueEditor.java
  2010-12-28 00:55:39 UTC (rev 23268)
@@ -84,7 +84,7 @@
                placer.setOpaque(true); // content panes must be opaque
 
                // Set up and connect the gui components.
-               graphic = new ObjectPlacerGraphic(null, true, label, null, 
null);
+               graphic = new ObjectPlacerGraphic(null, true, label);
                control = new ObjectPlacerControl();
 
                control.addPropertyChangeListener(graphic);

Deleted: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/LineTypeIcon.java
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/LineTypeIcon.java
  2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/LineTypeIcon.java
  2010-12-28 00:55:39 UTC (rev 23268)
@@ -1,181 +0,0 @@
-/*
- Copyright (c) 2006, 2007, The Cytoscape Consortium (www.cytoscape.org)
-
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2.1 of the License, or
- any later version.
-
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
- documentation provided hereunder is on an "as is" basis, and the
- Institute for Systems Biology and the Whitehead Institute
- have no obligations to provide maintenance, support,
- updates, enhancements or modifications.  In no event shall the
- Institute for Systems Biology and the Whitehead Institute
- be liable to any party for direct, indirect, special,
- incidental or consequential damages, including lost profits, arising
- out of the use of this software and its documentation, even if the
- Institute for Systems Biology and the Whitehead Institute
- have been advised of the possibility of such damage.  See
- the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this library; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-package org.cytoscape.ding.icon;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.Stroke;
-import java.awt.geom.Line2D;
-
-import javax.swing.SwingUtilities;
-
-/**
- * DOCUMENT ME!
- *
- * @author $author$
-  */
-public class LineTypeIcon extends VisualPropertyIcon<Stroke> {
-       private final static long serialVersionUID = 1202339875918391L;
-       private BasicStroke stroke;
-       protected Graphics2D g2d;
-
-       // If not null, this message will be shown over the icon.
-       private String superimposedText = null;
-       private Font textFont = null;
-       private Color textColor = null;
-
-       
-//     public LineTypeIcon(org.cytoscape.ding.LineStyle style) {
-//             this(style.getStroke(2f), DEFAULT_ICON_SIZE * 3,
-//                          DEFAULT_ICON_SIZE, style.name());
-//     }
-
-
-
-       /**
-        * Creates a new LineTypeIcon object.
-        *
-        * @param stroke DOCUMENT ME!
-        * @param width DOCUMENT ME!
-        * @param height DOCUMENT ME!
-        * @param name DOCUMENT ME!
-        * @param color DOCUMENT ME!
-        */
-       public LineTypeIcon(Stroke stroke, int width, int height, String name) {
-               super(null, width, height, name);
-
-               // TODO this value used to be set by the visual style default
-               final float lineWidth = 5.0f; 
-
-               final BasicStroke st = (BasicStroke) stroke;
-               /*
-                * Define a stroke for the line segment icon
-                */
-               if ((st != null) && (st.getDashArray() != null)) {
-                       this.stroke = new BasicStroke(lineWidth, 
BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
-                                                     st.getMiterLimit(), 
st.getDashArray(),
-                                                     st.getDashPhase());
-               } else {
-                       this.stroke = new BasicStroke(lineWidth, 
BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
-               }
-       }
-
-       /**
-        * DOCUMENT ME!
-        *
-        * @param c DOCUMENT ME!
-        * @param g DOCUMENT ME!
-        * @param x DOCUMENT ME!
-        * @param y DOCUMENT ME!
-        */
-       public void paintIcon(Component c, Graphics g, int x, int y) {
-               g2d = (Graphics2D) g;
-               g2d.setColor(color);
-               // AA on
-               g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON);
-
-               g2d.translate(leftPad, bottomPad);
-
-               float[] dashDef = null;
-
-               //        if (stroke.getDashArray() != null)
-               //            dashDef = stroke.getDashArray();
-               //
-               //        final BasicStroke lineStroke = new BasicStroke(
-               //                stroke.getLineWidth(),
-               //                BasicStroke.CAP_BUTT,
-               //                BasicStroke.JOIN_MITER,
-               //                10.0f,
-               //                dashDef,
-               //                0.0f);
-               g2d.setStroke(stroke);
-               g2d.draw(new Line2D.Double(20, (height + 20) / 2, width, 
(height + 20) / 2));
-
-               /*
-                * Superimpose text if text object is not empty.
-                */
-               if (superimposedText != null) {
-                       int strWidth = 
SwingUtilities.computeStringWidth(g2d.getFontMetrics(), superimposedText);
-
-                       if (textColor == null) {
-                               g2d.setColor(Color.DARK_GRAY);
-                       } else
-                               g2d.setColor(textColor);
-
-                       if (textFont == null) {
-                               g2d.setFont(new Font("SansSerif", Font.BOLD, 
24));
-                       } else {
-                               g2d.setFont(textFont);
-                       }
-
-                       g2d.drawString(superimposedText, 20, (height + 40) / 2);
-               }
-
-               g2d.translate(-leftPad, -bottomPad);
-               g2d.setFont(new Font("SansSerif", Font.BOLD, 14));
-       }
-
-       /**
-        *  DOCUMENT ME!
-        *
-        * @param text DOCUMENT ME!
-        */
-       public void setText(final String text) {
-               this.superimposedText = text;
-       }
-
-       /**
-        *  DOCUMENT ME!
-        *
-        * @param font DOCUMENT ME!
-        */
-       public void setTextFont(final Font font) {
-               this.textFont = font;
-       }
-
-       /**
-        *  DOCUMENT ME!
-        *
-        * @param color DOCUMENT ME!
-        */
-       public void setTextColor(final Color color) {
-               this.textColor = color;
-       }
-}

Added: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/ObjectPositionIcon.java
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/ObjectPositionIcon.java
                            (rev 0)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/ObjectPositionIcon.java
    2010-12-28 00:55:39 UTC (rev 23268)
@@ -0,0 +1,35 @@
+package org.cytoscape.ding.icon;
+
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+
+import org.cytoscape.ding.ObjectPlacerGraphic;
+import org.cytoscape.ding.ObjectPosition;
+
+public class ObjectPositionIcon extends VisualPropertyIcon<ObjectPosition> {
+       
+       private static final long serialVersionUID = 6852491198236306710L;
+       
+       private Graphics2D g2d;
+
+       public ObjectPositionIcon(final ObjectPosition value, int width, int 
height, String name) {
+               super(value, width, height, name);
+       }
+
+       
+       
+       @Override public void paintIcon(Component c, Graphics g, int x, int y) {
+               
+               g2d = (Graphics2D) g;
+               // AA on
+               g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON);
+               
+               final ObjectPlacerGraphic lp = new ObjectPlacerGraphic(width, 
false, "Label");
+               lp.setObjectPosition(value);
+               lp.applyPosition();
+               lp.paint(g2d);
+               
+       }
+}

Copied: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/StrokeIcon.java
 (from rev 23255, 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/LineTypeIcon.java)
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/StrokeIcon.java
                            (rev 0)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/StrokeIcon.java
    2010-12-28 00:55:39 UTC (rev 23268)
@@ -0,0 +1,143 @@
+/*
+ Copyright (c) 2006, 2007, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications.  In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage.  See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+package org.cytoscape.ding.icon;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Stroke;
+import java.awt.geom.Line2D;
+
+import javax.swing.SwingUtilities;
+
+/**
+ * Icon generator for Stroke objects.
+ *
+ */
+public class StrokeIcon extends VisualPropertyIcon<Stroke> {
+       private final static long serialVersionUID = 1202339875918391L;
+
+       private Graphics2D g2d;
+
+       // If not null, this message will be shown over the icon.
+       private String superimposedText = null;
+       private Font textFont = null;
+       private Color textColor = null;
+
+       /**
+        * Creates a new LineTypeIcon object.
+        *
+        * @param stroke DOCUMENT ME!
+        * @param width DOCUMENT ME!
+        * @param height DOCUMENT ME!
+        * @param name DOCUMENT ME!
+        * @param color DOCUMENT ME!
+        */
+       public StrokeIcon(final Stroke stroke, int width, int height, String 
name) {
+               super(stroke, width, height, name);
+       }
+
+       /**
+        * DOCUMENT ME!
+        *
+        * @param c DOCUMENT ME!
+        * @param g DOCUMENT ME!
+        * @param x DOCUMENT ME!
+        * @param y DOCUMENT ME!
+        */
+       @Override public void paintIcon(Component c, Graphics g, int x, int y) {
+               g2d = (Graphics2D) g;
+               g2d.setColor(color);
+               // AA on
+               g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON);
+
+               g2d.translate(leftPad, bottomPad);
+               g2d.setStroke(value);
+               g2d.draw(new Line2D.Double(20, (height + 20) / 2, width*2, 
(height + 20) / 2));
+
+               /*
+                * Superimpose text if text object is not empty.
+                */
+               if (superimposedText != null) {
+                       int strWidth = 
SwingUtilities.computeStringWidth(g2d.getFontMetrics(), superimposedText);
+
+                       if (textColor == null) {
+                               g2d.setColor(Color.DARK_GRAY);
+                       } else
+                               g2d.setColor(textColor);
+
+                       if (textFont == null) {
+                               g2d.setFont(new Font("SansSerif", Font.BOLD, 
24));
+                       } else {
+                               g2d.setFont(textFont);
+                       }
+
+                       g2d.drawString(superimposedText, 20, (height + 40) / 2);
+               }
+
+               g2d.translate(-leftPad, -bottomPad);
+               g2d.setFont(new Font("SansSerif", Font.BOLD, 14));
+       }
+
+       /**
+        *  DOCUMENT ME!
+        *
+        * @param text DOCUMENT ME!
+        */
+       public void setText(final String text) {
+               this.superimposedText = text;
+       }
+
+       /**
+        *  DOCUMENT ME!
+        *
+        * @param font DOCUMENT ME!
+        */
+       public void setTextFont(final Font font) {
+               this.textFont = font;
+       }
+
+       /**
+        *  DOCUMENT ME!
+        *
+        * @param color DOCUMENT ME!
+        */
+       public void setTextColor(final Color color) {
+               this.textColor = color;
+       }
+}

Modified: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIcon.java
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIcon.java
    2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIcon.java
    2010-12-28 00:55:39 UTC (rev 23268)
@@ -35,7 +35,6 @@
 package org.cytoscape.ding.icon;
 
 import java.awt.Color;
-import java.awt.Shape;
 
 import javax.swing.ImageIcon;
 

Modified: 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIconFactory.java
===================================================================
--- 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIconFactory.java
     2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/icon/VisualPropertyIconFactory.java
     2010-12-28 00:55:39 UTC (rev 23268)
@@ -1,11 +1,13 @@
 package org.cytoscape.ding.icon;
 
 import java.awt.Color;
+import java.awt.Stroke;
 
 import javax.swing.Icon;
 
 import org.cytoscape.ding.LineStyle;
 import org.cytoscape.ding.NodeShape;
+import org.cytoscape.ding.ObjectPosition;
 import org.cytoscape.ding.customgraphics.CyCustomGraphics;
 import org.cytoscape.view.model.VisualProperty;
 
@@ -28,10 +30,12 @@
                        icon = new ColorIcon((Color) value, w, h, 
value.toString());
                } else if(value instanceof NodeShape) {
                        icon = new NodeIcon(((NodeShape) value).getShape(), w, 
h, ((NodeShape) value).getShapeName());
-               } else if(value instanceof LineStyle) {
-                       icon = new LineTypeIcon(((LineStyle) 
value).getStroke(5), w, h, ((LineStyle) value).name());
+               } else if(value instanceof Stroke) {
+                       icon = new StrokeIcon((Stroke) value, w, h, 
value.toString());
                } else if(value instanceof CyCustomGraphics) {
                        icon = new CustomGraphicsIcon(((CyCustomGraphics) 
value), w, h, ((CyCustomGraphics) value).getDisplayName());
+               } else if(value instanceof ObjectPosition) {
+                       icon = new ObjectPositionIcon((ObjectPosition) value, 
w, h, "Label");
                } else {
                        icon = new TextIcon(value, w, h, value.toString());
                }

Modified: 
core3/vizmap-gui-api/trunk/src/main/java/org/cytoscape/view/vizmap/gui/editor/ValueEditor.java
===================================================================
--- 
core3/vizmap-gui-api/trunk/src/main/java/org/cytoscape/view/vizmap/gui/editor/ValueEditor.java
      2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/vizmap-gui-api/trunk/src/main/java/org/cytoscape/view/vizmap/gui/editor/ValueEditor.java
      2010-12-28 00:55:39 UTC (rev 23268)
@@ -15,8 +15,8 @@
         * 
         * @return
         */
-       public <S extends V> V showEditor(Component parent, S initialValue);
+       <S extends V> V showEditor(Component parent, S initialValue);
        
-       public Class<V> getType();
+       Class<V> getType();
 
 }

Modified: 
core3/vizmap-gui-impl/trunk/src/main/java/org/cytoscape/view/vizmap/gui/internal/editor/valueeditor/DiscreteValueEditor.java
===================================================================
--- 
core3/vizmap-gui-impl/trunk/src/main/java/org/cytoscape/view/vizmap/gui/internal/editor/valueeditor/DiscreteValueEditor.java
        2010-12-24 01:25:38 UTC (rev 23267)
+++ 
core3/vizmap-gui-impl/trunk/src/main/java/org/cytoscape/view/vizmap/gui/internal/editor/valueeditor/DiscreteValueEditor.java
        2010-12-28 00:55:39 UTC (rev 23268)
@@ -63,7 +63,7 @@
 import org.jdesktop.swingx.border.DropShadowBorder;
 
 /**
- * Chooser for any discrete values. This includes:
+ * Value chooser for any discrete values. This includes
  * <ul>
  * <li>node shape</li>
  * <li>arrow shape</li>
@@ -76,15 +76,19 @@
        
        private final static long serialVersionUID = 1202339876950593L;
        
+       // Default icon size.
        private static final int ICON_SIZE = 32;
+       private static final int ICON_SIZE_LARGE = 64;
 
-       private final Class<T> type;    
+       // Value data type for this chooser.
+       private final Class<T> type;
+       
+       // Range object.  Actual values will be provided from 
        private final DiscreteRange<T> range;
        private final VisualProperty<T> vp;
        
        private final CyApplicationManager appManager;
        
-       
        private Map<T, Icon> iconMap;
 //     
 //     private List<T> orderedKeyList;
@@ -116,7 +120,7 @@
         * Use current renderer to create icons.
         * @param values
         */
-       private void renderIcons(final Set<T> values) {
+       private void renderIcons(final Set<T> values, final int iconSize) {
                final RenderingEngine<CyNetwork> engine = 
appManager.getCurrentRenderingEngine();
                
                // CCurrent engine is not ready yet.
@@ -125,7 +129,7 @@
                
                iconMap.clear();
                for(T value: values)
-                       iconMap.put(value, engine.createIcon(vp, value, 
ICON_SIZE, ICON_SIZE));
+                       iconMap.put(value, engine.createIcon(vp, value, 
iconSize, iconSize));
        }
 
 
@@ -248,7 +252,7 @@
        private void setListItems() {
 
                final Set<T> values = range.values();
-               renderIcons(values);
+               renderIcons(values, ICON_SIZE_LARGE);
                
                model = new DefaultListModel();
                iconList.setModel(model);
@@ -266,7 +270,7 @@
                iconList.repaint();
        }
 
-       // TODO: tuning icon layout
+       // TODO: optimize icon layout
        public class IconCellRenderer extends JLabel implements 
ListCellRenderer {
                private final static long serialVersionUID = 1202339876940871L;
                private final Font SELECTED_FONT = new Font("SansSerif", 
Font.ITALIC,

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to