|
|
|
@ -349,16 +349,17 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver,
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void componentInitListeners() { |
|
|
|
|
initButtonFocusListeners(); |
|
|
|
|
preButton.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
preAction = true; |
|
|
|
|
setValue(value + dierta); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
nextButton.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
nextAction = true; |
|
|
|
|
setValue(value - dierta); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -374,31 +375,6 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver,
|
|
|
|
|
initTextFiledListeners(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void initButtonFocusListeners() { |
|
|
|
|
preButton.addFocusListener(new FocusAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void focusGained(FocusEvent e) { |
|
|
|
|
preAction = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void focusLost(FocusEvent e) { |
|
|
|
|
preAction = false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
nextButton.addFocusListener(new FocusAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void focusGained(FocusEvent e) { |
|
|
|
|
nextAction = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void focusLost(FocusEvent e) { |
|
|
|
|
nextAction = false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void initTextFiledListeners() { |
|
|
|
|
textField.getDocument().removeDocumentListener(docListener); |
|
|
|
|
textField.getDocument().addDocumentListener(docListener); |
|
|
|
|