Author: rozagh
Date: 2012-07-17 15:46:11 -0700 (Tue, 17 Jul 2012)
New Revision: 29914
Modified:
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CustomHeaderRenderer.java
Log:
fixes #1263 making all of the UI fixes other than showing the column sorting
order in tooltip
Modified:
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CustomHeaderRenderer.java
===================================================================
---
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CustomHeaderRenderer.java
2012-07-17 22:45:22 UTC (rev 29913)
+++
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CustomHeaderRenderer.java
2012-07-17 22:46:11 UTC (rev 29914)
@@ -111,21 +111,21 @@
// Set datatype icon if available
this.setIcon(getIcon(col.getType(), col));
+
String toolTip = null;
if(col.getType() == List.class) {
- toolTip = "<html>This is a List column<br />" +
- "The lists contain " +
col.getListElementType() + "</html>";
+ toolTip = "<html>Name: " + col.getName() + "<br />
Type: List "+ getMinimizedType( col.getListElementType().getName()) + "</html>";
} else if(text.equals(CyIdentifiable.SUID))
toolTip = "Session-Unique ID (Primary Key). This is
column is immutable.";
else
- toolTip = "Data type of this column is " +
col.getType().getName().substring(col.getType().getName().lastIndexOf('.')+1);
+ toolTip = "<html>Name: " + col.getName()+ "<br /> Type:
" + getMinimizedType(col.getType().getName());
if (col.getVirtualColumnInfo().isVirtual()) {
setForeground(COLUMN_TITLE_COLOR);
setBackground(COLUMN_VIRTUAL_COLOR);
- toolTip = "<html>" +
col.getType().getName().substring(col.getType().getName().lastIndexOf('.')+1) +
"<br />Virtual Column</html>";
+ toolTip = "<html>Name:" + col.getName() + "<br /> Type:
" + getMinimizedType(col.getType().getName()) + "<br />Virtual Column</html>";
} else {
setForeground(COLUMN_TITLE_COLOR);
setBackground(COLUMN_COLOR);
@@ -143,11 +143,15 @@
return this;
}
+ private String getMinimizedType (String type){
+ return type.substring(type.lastIndexOf('.')+1);
+ }
+
private Icon getIcon(final Class<?> dataType, final CyColumn col) {
if(col.isPrimaryKey())
return PRIMARY_KEY_ICON;
-
+ /*
if(dataType == String.class)
return STRING_ICON;
else if(dataType == Double.class || dataType == Float.class)
@@ -158,7 +162,7 @@
return LIST_ICON;
else if (dataType == Integer.class || dataType == Long.class)
return INTEGER_ICON;
-
+ */
return null;
}
--
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.