|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| SampleEditor.java | 0% | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
package abbot.editor.editors;
|
|
| 2 |
|
|
| 3 |
import java.awt.event.ActionEvent;
|
|
| 4 |
import javax.swing.JTextField;
|
|
| 5 |
import java.util.*;
|
|
| 6 |
|
|
| 7 |
import abbot.i18n.Strings;
|
|
| 8 |
import abbot.script.Sample;
|
|
| 9 |
|
|
| 10 |
/** Provide convenient editing of a Sample step. */
|
|
| 11 |
public class SampleEditor extends PropertyCallEditor { |
|
| 12 |
|
|
| 13 |
private Sample step;
|
|
| 14 |
private JTextField property;
|
|
| 15 |
|
|
| 16 | 0 |
public SampleEditor(Sample step) {
|
| 17 | 0 |
super(step);
|
| 18 | 0 |
this.step = step;
|
| 19 | 0 |
property = addTextField(Strings.get("PropertyName"),
|
| 20 |
step.getPropertyName()); |
|
| 21 |
} |
|
| 22 |
|
|
| 23 | 0 |
public void actionPerformed(ActionEvent ev) { |
| 24 | 0 |
Object src = ev.getSource(); |
| 25 | 0 |
if (src == property) {
|
| 26 | 0 |
String name = property.getText().trim(); |
| 27 | 0 |
if (!"".equals(name)) { |
| 28 | 0 |
step.setPropertyName(name); |
| 29 | 0 |
fireStepChanged(); |
| 30 |
} |
|
| 31 |
} |
|
| 32 |
else {
|
|
| 33 | 0 |
super.actionPerformed(ev);
|
| 34 |
} |
|
| 35 |
} |
|
| 36 |
} |
|
| 37 |
|
|
||||||||||