Revision: 17614
http://sourceforge.net/p/gate/code/17614
Author: markagreenwood
Date: 2014-03-10 11:03:05 +0000 (Mon, 10 Mar 2014)
Log Message:
-----------
finally figured out a proper fix for the boolean param renderer that not only
doesn't trigger an unused code warning, but actually does the right thing in
the GUI
Modified Paths:
--------------
gate/trunk/src/main/gate/gui/BooleanRenderer.java
Modified: gate/trunk/src/main/gate/gui/BooleanRenderer.java
===================================================================
--- gate/trunk/src/main/gate/gui/BooleanRenderer.java 2014-03-10 09:14:31 UTC
(rev 17613)
+++ gate/trunk/src/main/gate/gui/BooleanRenderer.java 2014-03-10 11:03:05 UTC
(rev 17614)
@@ -16,6 +16,7 @@
import java.awt.Component;
+import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
@@ -27,15 +28,15 @@
@Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
- super.getTableCellRendererComponent(table, "", isSelected, hasFocus, row,
+ JLabel component = (JLabel)super.getTableCellRendererComponent(table, "",
isSelected, hasFocus, row,
column);
if(value instanceof Boolean && value != null
&& ((Boolean)value).booleanValue()) {
- setIcon(MainFrame.getIcon("tick"));
+ component.setIcon(MainFrame.getIcon("tick"));
// setIcon(MainFrame.getIcon((isSelected) ? "tick_white" :
// "tick"));
} else {
- setIcon(null);
+ component.setIcon(null);
}
return this;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs