Revision 13133
trunk/libraries/libUI/src/org/gvsig/gui/beans/swing/JIncrementalNumberField.java | ||
---|---|---|
138 | 138 |
accum.actionPerformed(new ActionEvent(b, 12431, b.getActionCommand())); |
139 | 139 |
|
140 | 140 |
long currTime = System.currentTimeMillis(); |
141 |
if (delay > 5 && ((currTime - time) > 1000)) { |
|
141 |
/* |
|
142 |
* each 1000 milliseconds the delay between value change |
|
143 |
* will be reduced to a half until it reaches 20 millis of |
|
144 |
* minimum delay, so it speeds up the increase/decrease |
|
145 |
* process to let the user to reach far values in less time |
|
146 |
* by keeping the button pressed. |
|
147 |
*/ |
|
148 |
if (delay > 20 && ((currTime - time) > 1000)) { |
|
142 | 149 |
delay /= 2; |
143 | 150 |
time = currTime; |
144 | 151 |
} |
Also available in: Unified diff