woolfel 2005/08/30 18:48:54
Modified: src/core/org/apache/jmeter/config/gui ArgumentsPanel.java
Log:
made a change to allow different color background
peter
Revision Changes Path
1.29 +30 -2
jakarta-jmeter/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
Index: ArgumentsPanel.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ArgumentsPanel.java 12 Jul 2005 20:50:59 -0000 1.28
+++ ArgumentsPanel.java 31 Aug 2005 01:48:53 -0000 1.29
@@ -18,6 +18,7 @@
package org.apache.jmeter.config.gui;
+import java.awt.Color;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
@@ -69,6 +70,11 @@
/** A button for removing arguments from the table. */
private JButton delete;
+ /**
+ * Added background support for reporting tool
+ */
+ private Color background;
+
/**
* Boolean indicating whether this component is a standalong component
or it
* is intended to be used as a subpanel for another component.
@@ -110,6 +116,19 @@
init();
}
+ /**
+ * Create a new ArgumentsPanel with a border and color background
+ * @param label
+ * @param borderHeight
+ * @param borderWidth
+ */
+ public ArgumentsPanel(String label, Color bkg) {
+ tableLabel = new JLabel(label);
+ this.background = bkg;
+ standalone = false;
+ init();
+ }
+
/**
* This is the list of menu categories this gui component will be
available
* under.
@@ -348,6 +367,9 @@
initializeTableModel();
table = new JTable(tableModel);
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ if (this.background != null) {
+ table.setBackground(this.background);
+ }
return makeScrollPane(table);
}
@@ -359,6 +381,9 @@
protected Component makeLabelPanel() {
JPanel labelPanel = new JPanel(new
FlowLayout(FlowLayout.CENTER));
labelPanel.add(tableLabel);
+ if (this.background != null) {
+ labelPanel.setBackground(this.background);
+ }
return labelPanel;
}
@@ -379,6 +404,9 @@
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0,
10));
+ if (this.background != null) {
+ buttonPanel.setBackground(this.background);
+ }
add.addActionListener(this);
delete.addActionListener(this);
buttonPanel.add(add);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]