Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views
In directory usw-pr-cvs1:/tmp/cvs-serv30855
Modified Files:
AllocHistogramTable.java AllocHistogramTableModel.java
Log Message:
tooltips,
columns renamed (max -> total),
used HasChildren interface
Index: AllocHistogramTable.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views/AllocHistogramTable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** AllocHistogramTable.java 24 Jul 2002 22:30:11 -0000 1.3
--- AllocHistogramTable.java 27 Jul 2002 22:27:03 -0000 1.4
***************
*** 103,109 ****
setText( str );
!
//if ( str.length() > 50 )
! // setToolTipText( str );
return this;
}
--- 103,113 ----
setText( str );
!
! if ( getPreferredSize().width >= getColumnModel().getColumn(column).getWidth() )
//if ( str.length() > 50 )
! setToolTipText( str );
! else
! setToolTipText( null );
!
return this;
}
Index: AllocHistogramTableModel.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views/AllocHistogramTableModel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** AllocHistogramTableModel.java 24 Jul 2002 23:56:29 -0000 1.4
--- AllocHistogramTableModel.java 27 Jul 2002 22:27:03 -0000 1.5
***************
*** 34,38 ****
public class AllocHistogramTableModel extends AbstractTableModel {
private List allocStats;
! private String columnNames[] = { "name", "count", "max count", "histogram", "space", "max space" };
private Class columnClasses[] = { String.class, Long.class, Long.class, AllocStat.class, Long.class, Long.class };
private AllocStatListener statListener;
--- 34,38 ----
public class AllocHistogramTableModel extends AbstractTableModel {
private List allocStats;
! private String columnNames[] = { "name", "count", "total count", "histogram", "space", "total space" };
private Class columnClasses[] = { String.class, Long.class, Long.class, AllocStat.class, Long.class, Long.class };
private AllocStatListener statListener;
***************
*** 42,48 ****
/** Creates a new instance of HistogramTableModel
*@param allocStats list of <code> AllocStat </code> objects that have <code> getType() </code> method
! * At last one instance of <code> AllocStat </code> must be in the <code> List </code>.
*/
! public AllocHistogramTableModel(List allocStats) {
this.allocStats = allocStats;
statListener = new HistogramStatListener();
--- 42,50 ----
/** Creates a new instance of HistogramTableModel
*@param allocStats list of <code> AllocStat </code> objects that have <code> getType() </code> method
! *@param parent Parent where <code> allosStats </code> list resides. (We need subscribe for changes in this list).
! *@param listType this param is passed as type to <code> parent.addChildrenListener </code> method. Its constant from
! * <code> net.sourceforge.javaprofiler.jpi.Constants </code>
*/
! public AllocHistogramTableModel(List allocStats, HasChildren parent, int type) {
this.allocStats = allocStats;
statListener = new HistogramStatListener();
***************
*** 53,61 ****
}
! ((TypeRef) allocStats.get(0)).getVirtualMachineImage()
! .addChildrenListener( Constants.TYPE,
! new HistogramChildrenListener() );
! //PENDING listeners to other types
! //parent.addChildListener( type, new HistogramChildrenListener );
}
--- 55,59 ----
}
! parent.addChildrenListener( type, new HistogramChildrenListener() );
}
***************
*** 73,77 ****
switch ( colIndex ) {
case 0: {
! return ((HasType) alloc).getType().getName();
}
case 1: {
--- 71,75 ----
switch ( colIndex ) {
case 0: {
! return ((HasTypeRoot) alloc).getType().getName();
}
case 1: {
***************
*** 104,110 ****
public boolean isCellEditable(int rowIndex, int columnIndex) {
- //if ( columnIndex == 0 )
- // return true; //It's true, beceaus it assumes special editor, that don't let you change anything
- //else
return false;
}
--- 102,105 ----
***************
*** 167,170 ****
};
}
!
}
--- 162,167 ----
};
}
!
!
! //pending unsubscribing
}
|