Author: sebb Date: Tue Feb 23 23:55:42 2010 New Revision: 915596 URL: http://svn.apache.org/viewvc?rev=915596&view=rev Log: [gs]etNode() are not used
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java?rev=915596&r1=915595&r2=915596&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java Tue Feb 23 23:55:42 2010 @@ -28,7 +28,6 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.border.Border; -import javax.swing.tree.TreeNode; import org.apache.jmeter.gui.util.VerticalPanel; import org.apache.jmeter.testelement.TestElement; @@ -65,9 +64,6 @@ /** Flag indicating whether or not this component is enabled. */ private boolean enabled = true; - /** The tree node which this component is associated with. */ - private TreeNode node; - /** A GUI panel containing the name of this component. */ protected NamePanel namePanel; // used by AbstractReportGui @@ -242,23 +238,6 @@ } /** - * Provides a default implementation for the node property. It is unlikely - * developers would need to override this method. - */ - public void setNode(TreeNode node) { - this.node = node; - getNamePanel().setNode(node); - } - - /** - * Provides a default implementation for the node property. It is unlikely - * developers would need to override this method. - */ - protected TreeNode getNode() { - return node; - } - - /** * Create a standard title section for JMeter components. This includes the * title for the component and the Name Panel allowing the user to change * the name for the component. This method is typically added to the top of Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java?rev=915596&r1=915595&r2=915596&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/JMeterGUIComponent.java Tue Feb 23 23:55:42 2010 @@ -22,7 +22,6 @@ import javax.swing.JPopupMenu; -import javax.swing.tree.TreeNode; import org.apache.jmeter.testelement.TestElement; /** @@ -179,14 +178,6 @@ Collection<String> getMenuCategories(); /** - * Sets the tree node which this component is associated with. - * - * @param node - * the tree node corresponding to this component - */ - void setNode(TreeNode node); - - /** * Clear the gui and return it to initial default values. This is necessary * because most gui classes are instantiated just once and re-used for * multiple test element objects and thus they need to be cleared between Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java?rev=915596&r1=915595&r2=915596&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/NamePanel.java Tue Feb 23 23:55:42 2010 @@ -25,11 +25,7 @@ import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.JTextField; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import javax.swing.tree.TreeNode; -import org.apache.jmeter.gui.tree.NamedTreeNode; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.WorkBench; import org.apache.jmeter.testelement.property.StringProperty; @@ -44,10 +40,7 @@ /** The label for the text field. */ private JLabel nameLabel; - /** The node which this component is providing the name for. */ - private TreeNode node; - - /** + /** * Create a new NamePanel with the default name. */ public NamePanel() { @@ -65,20 +58,6 @@ nameLabel.setName("name"); nameLabel.setLabelFor(nameField); - nameField.getDocument().addDocumentListener(new DocumentListener() { - public void insertUpdate(DocumentEvent e) { - updateName(nameField.getText()); - } - - public void removeUpdate(DocumentEvent e) { - updateName(nameField.getText()); - } - - public void changedUpdate(DocumentEvent e) { - // not for text fields - } - }); - add(nameLabel, BorderLayout.WEST); add(nameField, BorderLayout.CENTER); } @@ -107,20 +86,6 @@ nameField.setText(name); } - /** - * Get the tree node which this component provides the name for. - * - * @return the tree node corresponding to this component - */ - protected TreeNode getNode() { - return node; - } - - /** {...@inheritdoc} */ - public void setNode(TreeNode node) { - this.node = node; - } - /** {...@inheritdoc} */ public void configure(TestElement testElement) { setName(testElement.getName()); @@ -161,19 +126,6 @@ } /** - * Called when the name changes. The tree node which this component names - * will be notified of the change. - * - * @param newValue - * the new name - */ - private void updateName(String newValue) { - if (getNode() != null) { - ((NamedTreeNode)getNode()).nameChanged(); - } - } - - /** * {...@inheritdoc} */ public String getDocAnchor() { --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org