Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views
In directory usw-pr-cvs1:/tmp/cvs-serv18167
Modified Files:
AllocHistogramTable.java AllocHistogramTableModel.java
Log Message:
using new interface hasType
Index: AllocHistogramTable.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views/AllocHistogramTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** AllocHistogramTable.java 22 Jul 2002 23:39:21 -0000 1.2
--- AllocHistogramTable.java 24 Jul 2002 22:30:11 -0000 1.3
***************
*** 60,63 ****
--- 60,65 ----
//string renderer with tooltips for log string
private class LongStringRenderer extends JLabel implements TableCellRenderer {
+ Font font;
+
public LongStringRenderer() {
super();
***************
*** 82,88 ****
setBackground(table.getBackground());
}
! //setFont(table.getFont());
! setFont( table.getFont().deriveFont( Font.BOLD ) );
!
if (hasFocus) {
setBorder( UIManager.getBorder("Table.focusCellHighlightBorder") );
--- 84,88 ----
setBackground(table.getBackground());
}
!
if (hasFocus) {
setBorder( UIManager.getBorder("Table.focusCellHighlightBorder") );
***************
*** 95,98 ****
--- 95,104 ----
setBorder(noFocusBorder);
}
+
+ //setFont(table.getFont());
+ if (font == null) {
+ font = table.getFont().deriveFont( Font.BOLD );
+ setFont( font );
+ }
setText( str );
***************
*** 132,138 ****
barMax = barMax * 2;
! //PENDING fire event
! //?invoke later
! //fireTableDataChanged();
}
--- 138,143 ----
barMax = barMax * 2;
! //FIXME??invoke later
! repaint();
}
Index: AllocHistogramTableModel.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views/AllocHistogramTableModel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** AllocHistogramTableModel.java 22 Jul 2002 23:39:21 -0000 1.2
--- AllocHistogramTableModel.java 24 Jul 2002 22:30:11 -0000 1.3
***************
*** 58,71 ****
//PENDING listeners to other types
//parent.addChildListener( type, new HistogramChildrenListener );
-
- /*if ( ! (allocStats.get(0) instanceof TypeRef) ) {
- try {
- Method method_getName = allocStats.get(0).getClass()
- .getMethod( "getType", null );
- }
- catch (NoSuchMethodException e) {
- throw new RuntimeException( e.getMessage() + " requested method: getType()" );
- }
- }*/
}
--- 58,61 ----
***************
*** 81,105 ****
AllocStat alloc = (AllocStat) allocStats.get( rowIndex );
- //??FIXME
switch ( colIndex ) {
case 0: {
! //return ((HaveTypeRoot) alloc).getType().getName();
! //FIXME
! if ( alloc instanceof TypeRef ) {
! return ((TypeRef) alloc).getName();
! }
! //FIXME add interface with getType method
! /*try {
! return ((TypeRef) method_getName.invoke( alloc, null )).getName();
! }
! catch (SecurityException e) {
! throw new RuntimeException( e.getMessage() + " requested method: getType()" );
! }
! catch (IllegalAccessException e) {
! throw new RuntimeException( e.getMessage() + " requested method: getType()" );
! }
! catch (InvocationTargetException e) {
! throw new RuntimeException( e.getMessage() + " requested method: getType()" );
! }*/
}
case 1: {
--- 71,77 ----
AllocStat alloc = (AllocStat) allocStats.get( rowIndex );
switch ( colIndex ) {
case 0: {
! return ((HasType) alloc).getType().getName();
}
case 1: {
|