Author: kono
Date: 2010-02-04 13:40:13 -0800 (Thu, 04 Feb 2010)
New Revision: 19184

Added:
   
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/IconTableCellRenderer.java
Modified:
   
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/NetworkPanel.java
Log:
Internal cell renderer class extracted.

Added: 
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/IconTableCellRenderer.java
===================================================================
--- 
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/IconTableCellRenderer.java
                         (rev 0)
+++ 
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/IconTableCellRenderer.java
 2010-02-04 21:40:13 UTC (rev 19184)
@@ -0,0 +1,25 @@
+package cytoscape.view;
+
+import java.awt.Component;
+
+import javax.swing.Icon;
+import javax.swing.JLabel;
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+
+public class IconTableCellRenderer implements TableCellRenderer {
+
+       public Component getTableCellRendererComponent(JTable table, Object 
value,
+                       boolean isSelected, boolean hasFocus, int row, int 
column) {
+
+               final JLabel label;
+               if (value != null && value instanceof Icon) {
+                       label = new JLabel();
+                       label.setIcon((Icon) value);
+               } else
+                       label = new JLabel("?");
+
+               return label;
+       }
+
+}
\ No newline at end of file

Modified: 
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/NetworkPanel.java
===================================================================
--- 
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/NetworkPanel.java
  2010-02-04 21:31:44 UTC (rev 19183)
+++ 
cytoscape/branches/cytoscape_27_experimental_features/src/cytoscape/view/NetworkPanel.java
  2010-02-04 21:40:13 UTC (rev 19184)
@@ -541,24 +541,8 @@
        }
        
 
-       private class IconTableCellRenderer implements TableCellRenderer {
+       
 
-               public Component getTableCellRendererComponent(JTable table,
-                               Object value, boolean isSelected, boolean 
hasFocus, int row,
-                               int column) {
-
-                       final JLabel label;
-                       if(value != null && value instanceof Icon) { 
-                               label = new JLabel();
-                               label.setIcon((Icon) value);
-                       } else
-                               label = new JLabel("?");
-                       
-                       return label;
-               }
-               
-       }
-
        /**
         * This class listens to mouse events from the TreeTable, if the mouse 
event
         * is one that is canonically associated with a popup menu (ie, a right

-- 
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