You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by sd...@apache.org on 2004/01/01 01:36:10 UTC
cvs commit: logging-log4j/src/java/org/apache/log4j/chainsaw/color ColorPanel.java
sdeboy 2003/12/31 16:36:10
Modified: src/java/org/apache/log4j/chainsaw
ChainsawCyclicBufferTableModel.java
ChainsawStatusBar.java
src/java/org/apache/log4j/chainsaw/color ColorPanel.java
Log:
- fixed cyclictablemodel so it will use the 'CHAINSAW_CAPACITY' system property and correctly size the capacity. Will move to a normal pref next.
- sized status bar so it will hold 99k without truncating
Revision Changes Path
1.16 +4 -2 logging-log4j/src/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
Index: ChainsawCyclicBufferTableModel.java
===================================================================
RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ChainsawCyclicBufferTableModel.java 31 Dec 2003 09:54:40 -0000 1.15
+++ ChainsawCyclicBufferTableModel.java 1 Jan 2004 00:36:10 -0000 1.16
@@ -92,8 +92,8 @@
private final int DEFAULT_CAPACITY = 5000;
private int capacity = DEFAULT_CAPACITY;
private static final String PANEL_CAPACITY = "CHAINSAW_CAPACITY";
- List unfilteredList = new CyclicBufferList(capacity);
- List filteredList = new CyclicBufferList(capacity);
+ List unfilteredList;
+ List filteredList;
Set idSet = new HashSet(capacity);
private boolean currentSortAscending;
private int currentSortColumn;
@@ -122,6 +122,8 @@
capacity = Integer.parseInt(System.getProperty(PANEL_CAPACITY));
} catch (NumberFormatException nfe) {}
}
+ unfilteredList = new CyclicBufferList(capacity);
+ filteredList = new CyclicBufferList(capacity);
}
/**
1.10 +1 -5 logging-log4j/src/java/org/apache/log4j/chainsaw/ChainsawStatusBar.java
Index: ChainsawStatusBar.java
===================================================================
RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/ChainsawStatusBar.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ChainsawStatusBar.java 31 Dec 2003 07:04:03 -0000 1.9
+++ ChainsawStatusBar.java 1 Jan 2004 00:36:10 -0000 1.10
@@ -84,12 +84,9 @@
private final JLabel eventCountLabel = new JLabel("", JLabel.CENTER);
private final JLabel receivedEventLabel = new JLabel("0.0", JLabel.CENTER);
private final JLabel receivedConnectionlabel = new JLabel("", JLabel.CENTER);
- private volatile long lastReceivedEvent = System.currentTimeMillis();
private volatile long lastReceivedConnection = System.currentTimeMillis();
private final Thread connectionThread;
private final Icon pausedIcon = new ImageIcon(ChainsawIcons.PAUSE);
- private final Icon radioTowerIcon =
- new ImageIcon(ChainsawIcons.ANIM_RADIO_TOWER);
private final Icon netConnectIcon =
new ImageIcon(ChainsawIcons.ANIM_NET_CONNECT);
private final NumberFormat nf = NumberFormat.getNumberInstance();
@@ -105,7 +102,6 @@
JPanel statusMsgPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 2));
-
statusMsgPanel.add(statusMsg);
statusMsgPanel.setBorder(statusBarComponentBorder);
@@ -130,7 +126,7 @@
eventCountLabel.setMinimumSize(
new Dimension(
eventCountLabel.getFontMetrics(eventCountLabel.getFont())
- .stringWidth("9999:9999") + 5,
+ .stringWidth("99999:99999") + 5,
(int) eventCountLabel.getPreferredSize().getHeight()));
receivedConnectionlabel.setBorder(statusBarComponentBorder);
1.12 +4 -4 logging-log4j/src/java/org/apache/log4j/chainsaw/color/ColorPanel.java
Index: ColorPanel.java
===================================================================
RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/color/ColorPanel.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ColorPanel.java 16 Dec 2003 00:45:26 -0000 1.11
+++ ColorPanel.java 1 Jan 2004 00:36:10 -0000 1.12
@@ -147,10 +147,10 @@
tableModel.setDataVector(data, columns);
table.sizeColumnsToFit(0);
- table.getColumnModel().getColumn(1).setPreferredWidth(70);
- table.getColumnModel().getColumn(2).setPreferredWidth(70);
- table.getColumnModel().getColumn(1).setMaxWidth(70);
- table.getColumnModel().getColumn(2).setMaxWidth(70);
+ table.getColumnModel().getColumn(1).setPreferredWidth(80);
+ table.getColumnModel().getColumn(2).setPreferredWidth(80);
+ table.getColumnModel().getColumn(1).setMaxWidth(80);
+ table.getColumnModel().getColumn(2).setMaxWidth(80);
configureTable();
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org