|
From: Michal P. <mic...@us...> - 2002-09-05 14:06:45
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views
In directory usw-pr-cvs1:/tmp/cvs-serv17026/net/sourceforge/javaprofiler/module/views
Modified Files:
AllocHistogramTable.java
Log Message:
Removed compilation ambiguities.
Index: AllocHistogramTable.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/views/AllocHistogramTable.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** AllocHistogramTable.java 19 Aug 2002 09:07:20 -0000 1.10
--- AllocHistogramTable.java 5 Sep 2002 14:06:42 -0000 1.11
***************
*** 130,183 ****
public LongStringRenderer() {
super();
! setOpaque( true );
! setBorder(noFocusBorder);
!
//setHorizontalAlignment( RIGHT );
}
public Component getTableCellRendererComponent(
! JTable table, Object astr, boolean isSelected,
! boolean hasFocus, int row, int column)
{
String str = (String) astr;
if (isSelected) {
! setForeground(table.getSelectionForeground());
! setBackground(table.getSelectionBackground());
}
else {
! setForeground(table.getForeground());
! setBackground(table.getBackground());
}
!
if (hasFocus) {
! setBorder( UIManager.getBorder("Table.focusCellHighlightBorder") );
if (table.isCellEditable(row, column)) {
super.setForeground( UIManager.getColor("Table.focusCellForeground") );
super.setBackground( UIManager.getColor("Table.focusCellBackground") );
}
! }
else {
! setBorder(noFocusBorder);
}
!
//setFont(table.getFont());
! if (font == null) {
font = table.getFont().deriveFont( Font.BOLD );
! setFont( font );
}
!
setText( str );
!
! if ( getPreferredSize().width >= getColumnModel().getColumn(column).getWidth() )
//if ( str.length() > 50 )
! setToolTipText( str );
else
! setToolTipText( null );
!
return this;
}
}
!
//renderer of histogram bars //PENDING all
--- 130,183 ----
public LongStringRenderer() {
super();
! this.setOpaque( true );
! this.setBorder(noFocusBorder);
!
//setHorizontalAlignment( RIGHT );
}
public Component getTableCellRendererComponent(
! JTable table, Object astr, boolean isSelected,
! boolean hasFocus, int row, int column)
{
String str = (String) astr;
if (isSelected) {
! this.setForeground(table.getSelectionForeground());
! this.setBackground(table.getSelectionBackground());
}
else {
! this.setForeground(table.getForeground());
! this.setBackground(table.getBackground());
}
!
if (hasFocus) {
! this.setBorder( UIManager.getBorder("Table.focusCellHighlightBorder") );
if (table.isCellEditable(row, column)) {
super.setForeground( UIManager.getColor("Table.focusCellForeground") );
super.setBackground( UIManager.getColor("Table.focusCellBackground") );
}
! }
else {
! this.setBorder(noFocusBorder);
}
!
//setFont(table.getFont());
! if (font == null) {
font = table.getFont().deriveFont( Font.BOLD );
! this.setFont( font );
}
!
setText( str );
!
! if ( this.getPreferredSize().width >= getColumnModel().getColumn(column).getWidth() )
//if ( str.length() > 50 )
! this.setToolTipText( str );
else
! this.setToolTipText( null );
!
return this;
}
}
!
//renderer of histogram bars //PENDING all
***************
*** 186,190 ****
Border selectedBorder = null;
boolean isBordered = true;
!
JProgressBar bar;
long barMax = 1000;
--- 186,190 ----
Border selectedBorder = null;
boolean isBordered = true;
!
JProgressBar bar;
long barMax = 1000;
***************
*** 200,221 ****
public Component getTableCellRendererComponent(
! JTable table, Object allocObj, boolean isSelected,
boolean hasFocus, int row, int column) {
AllocStat alloc = (AllocStat) allocObj;
bar.setMaximum( 100 ); //percent
!
while( barMax < alloc.getLiveInstancesCount() ) {
barMax = barMax * 2;
!
! repaint();
}
!
bar.setValue( (int) ((100*alloc.getLiveInstancesCount())/barMax) );
!
//??
if ( bar.getValue() < 1 && alloc.getLiveInstancesCount() > 0) {
bar.setValue(1);
}
!
if (isBordered) {
if (isSelected) {
--- 200,221 ----
public Component getTableCellRendererComponent(
! JTable table, Object allocObj, boolean isSelected,
boolean hasFocus, int row, int column) {
AllocStat alloc = (AllocStat) allocObj;
bar.setMaximum( 100 ); //percent
!
while( barMax < alloc.getLiveInstancesCount() ) {
barMax = barMax * 2;
!
! this.repaint();
}
!
bar.setValue( (int) ((100*alloc.getLiveInstancesCount())/barMax) );
!
//??
if ( bar.getValue() < 1 && alloc.getLiveInstancesCount() > 0) {
bar.setValue(1);
}
!
if (isBordered) {
if (isSelected) {
***************
*** 224,228 ****
table.getSelectionBackground());
}
! setBorder(selectedBorder);
} else {
if (unselectedBorder == null) {
--- 224,228 ----
table.getSelectionBackground());
}
! this.setBorder(selectedBorder);
} else {
if (unselectedBorder == null) {
***************
*** 230,234 ****
table.getBackground());
}
! setBorder(unselectedBorder);
}
}
--- 230,234 ----
table.getBackground());
}
! this.setBorder(unselectedBorder);
}
}
***************
*** 253,256 ****
--- 253,260 ----
/*
* $Log$
+ * Revision 1.11 2002/09/05 14:06:42 michalpise
+ *
+ * Removed compilation ambiguities.
+ *
* Revision 1.10 2002/08/19 09:07:20 vachis
* added loggin of changes
|