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