sebb 2004/03/04 17:30:58
Modified: src/core/org/apache/jmeter/gui NamePanel.java
AbstractJMeterGuiComponent.java
JMeterGUIComponent.java
Log:
New getLabelResource() method to return the GUI label resource name;
getStaticLabel() can now be done in the parent class, and can move to
using the resource name as the anchor in component_reference.xml
Revision Changes Path
1.15 +10 -3 jakarta-jmeter/src/core/org/apache/jmeter/gui/NamePanel.java
Index: NamePanel.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/NamePanel.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- NamePanel.java 13 Feb 2004 02:40:53 -0000 1.14
+++ NamePanel.java 5 Mar 2004 01:30:58 -0000 1.15
@@ -155,8 +155,15 @@
/* Implements JMeterGUIComponent.getStaticLabel() */
public String getStaticLabel()
{
- return JMeterUtils.getResString("root");
+ return JMeterUtils.getResString(getLabelResource());
}
+
+ /* (non-Javadoc)
+ * @see org.apache.jmeter.gui.JMeterGUIComponent#getLabelResource()
+ */
+ public String getLabelResource() {
+ return "root";
+ }
/* Implements JMeterGUIComponent.getMenuCategories() */
public Collection getMenuCategories()
1.28 +8 -3
jakarta-jmeter/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
Index: AbstractJMeterGuiComponent.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- AbstractJMeterGuiComponent.java 13 Feb 2004 02:21:37 -0000 1.27
+++ AbstractJMeterGuiComponent.java 5 Mar 2004 01:30:58 -0000 1.28
@@ -33,6 +33,7 @@
import org.apache.jmeter.testelement.property.BooleanProperty;
import org.apache.jmeter.testelement.property.NullProperty;
import org.apache.jmeter.testelement.property.StringProperty;
+import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
@@ -51,8 +52,7 @@
* @see org.apache.jmeter.visualizers.gui.AbstractVisualizer
* @see org.apache.jmeter.samplers.gui.AbstractSamplerGui
*
- * @author mstover
- * @version $Revision$
+ * @version $Revision$ on $Date$
*/
public abstract class AbstractJMeterGuiComponent
extends JPanel
@@ -311,4 +311,9 @@
pane.setPreferredSize(pane.getMinimumSize());
return pane;
}
+
+ public String getStaticLabel()
+ {
+ return JMeterUtils.getResString(getLabelResource());
+ }
}
1.13 +13 -3
jakarta-jmeter/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java
Index: JMeterGUIComponent.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- JMeterGUIComponent.java 13 Feb 2004 02:21:37 -0000 1.12
+++ JMeterGUIComponent.java 5 Mar 2004 01:30:58 -0000 1.13
@@ -39,8 +39,7 @@
* @see org.apache.jmeter.visualizers.gui.AbstractVisualizer
* @see org.apache.jmeter.samplers.gui.AbstractSamplerGui
*
- * @author Michael Stover
- * @version $Revision$
+ * @version $Revision$ on $Date$
*
*/
@@ -70,10 +69,21 @@
* component in a list of many. It should therefore be a descriptive
* name for the end user to see. It must be unique to the class.
*
+ * It is also used by Help to find the appropriate location in the documentation
+ *
* @return GUI label for the component.
*/
String getStaticLabel();
+ /**
+ * Get the component's resource name, which getStaticLabel uses
+ * to derive the component's label in the local language.
+ * The resource name is fixed, and does not vary with the selected language.
+ *
+ * @return the resource name
+ */
+ String getLabelResource();
+
/**
* JMeter test components are separated into a model and a GUI
* representation. The model holds the data and the GUI displays it. The
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]