|
@@ -17,7 +17,7 @@ import java.awt.event.MouseEvent;
|
|
|
public class GripperBlowoutNodeView implements SwingProgramNodeView<GripperBlowoutNodeContribution>{
|
|
|
|
|
|
private final Style style;
|
|
|
- private JTextField jtfPosition, jtfSpeed;
|
|
|
+ private JTextField jtfDelay;
|
|
|
|
|
|
public GripperBlowoutNodeView(Style style) {
|
|
|
this.style = style;
|
|
@@ -34,21 +34,21 @@ public class GripperBlowoutNodeView implements SwingProgramNodeView<GripperBlowo
|
|
|
private Box createInputSpeed(final ContributionProvider<GripperBlowoutNodeContribution> provider) {
|
|
|
Box inputBox = Box.createHorizontalBox();
|
|
|
inputBox.setAlignmentX(Component.LEFT_ALIGNMENT);
|
|
|
- inputBox.add(new JLabel("Speed %:"));
|
|
|
+ inputBox.add(new JLabel("Delay (ms):"));
|
|
|
inputBox.add(createHorizontalSpacing());
|
|
|
|
|
|
- jtfSpeed = new JTextField();
|
|
|
- jtfSpeed.setFocusable(false);
|
|
|
- jtfSpeed.setPreferredSize(style.getInputfieldSize());
|
|
|
- jtfSpeed.setMaximumSize(jtfSpeed.getPreferredSize());
|
|
|
- jtfSpeed.addMouseListener(new MouseAdapter() {
|
|
|
+ jtfDelay = new JTextField();
|
|
|
+ jtfDelay.setFocusable(false);
|
|
|
+ jtfDelay.setPreferredSize(style.getInputfieldSize());
|
|
|
+ jtfDelay.setMaximumSize(jtfDelay.getPreferredSize());
|
|
|
+ jtfDelay.addMouseListener(new MouseAdapter() {
|
|
|
@Override
|
|
|
public void mousePressed(MouseEvent e) {
|
|
|
KeyboardNumberInput keyboardInput = provider.get().getKeyboardForSpeedField();
|
|
|
- keyboardInput.show(jtfSpeed, provider.get().getCallbackForSpeedField());
|
|
|
+ keyboardInput.show(jtfDelay, provider.get().getCallbackForSpeedField());
|
|
|
}
|
|
|
});
|
|
|
- inputBox.add(jtfSpeed);
|
|
|
+ inputBox.add(jtfDelay);
|
|
|
return inputBox;
|
|
|
}
|
|
|
|
|
@@ -60,19 +60,13 @@ public class GripperBlowoutNodeView implements SwingProgramNodeView<GripperBlowo
|
|
|
return Box.createRigidArea(new Dimension(style.getHorizontalSpacing(), 0));
|
|
|
}
|
|
|
|
|
|
- public void setPosition(Integer value) {
|
|
|
- jtfPosition.setText(value.toString());
|
|
|
- }
|
|
|
|
|
|
- public void setSpeed(Integer value) {
|
|
|
- jtfSpeed.setText(value.toString());
|
|
|
+ public void setDelay(Integer value) {
|
|
|
+ jtfDelay.setText(value.toString());
|
|
|
}
|
|
|
|
|
|
- public Integer getPosition() {
|
|
|
- return Integer.parseInt(jtfPosition.getText());
|
|
|
- }
|
|
|
- public Integer getSpeed() {
|
|
|
- return Integer.parseInt(jtfSpeed.getText());
|
|
|
+ public Integer getDelay() {
|
|
|
+ return Integer.parseInt(jtfDelay.getText());
|
|
|
}
|
|
|
|
|
|
|