|
|
|
@ -22,8 +22,19 @@ import javax.swing.event.ChangeListener;
|
|
|
|
|
import javax.swing.event.DocumentEvent; |
|
|
|
|
import javax.swing.event.DocumentListener; |
|
|
|
|
import javax.swing.plaf.ButtonUI; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.*; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.GridLayout; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.FocusAdapter; |
|
|
|
|
import java.awt.event.FocusEvent; |
|
|
|
|
import java.awt.event.FocusListener; |
|
|
|
|
import java.awt.event.MouseWheelEvent; |
|
|
|
|
import java.awt.event.MouseWheelListener; |
|
|
|
|
|
|
|
|
|
public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver { |
|
|
|
|
|
|
|
|
@ -61,6 +72,7 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
|
|
|
|
|
init(minValue, maxValue, dierta); |
|
|
|
|
textField.setValue(defaultValue); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void init(double minValue, double maxValue, double dierta) { |
|
|
|
|
this.minValue = minValue; |
|
|
|
|
this.maxValue = maxValue; |
|
|
|
@ -399,6 +411,7 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
|
|
|
|
|
public boolean shouldResponseNameListener() { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 程序入口 测试 |
|
|
|
|
* |
|
|
|
|