258 |
} |
} |
259 |
|
|
260 |
/** |
/** |
261 |
|
* A <code>JSpinner</code> editor used for the {@link SpinnerListModel}. |
262 |
|
* This editor uses a <code>JFormattedTextField</code> to edit the values |
263 |
|
* of the spinner. |
264 |
|
* |
265 |
|
* @author Roman Kennke (kennke@aicas.com) |
266 |
|
*/ |
267 |
|
public static class ListEditor extends DefaultEditor |
268 |
|
{ |
269 |
|
/** |
270 |
|
* Creates a new instance of <code>ListEditor</code>. |
271 |
|
* |
272 |
|
* @param spinner the spinner for which this editor is used |
273 |
|
*/ |
274 |
|
public ListEditor(JSpinner spinner) |
275 |
|
{ |
276 |
|
super(spinner); |
277 |
|
} |
278 |
|
|
279 |
|
public SpinnerListModel getModel() |
280 |
|
{ |
281 |
|
return (SpinnerListModel) getSpinner().getModel(); |
282 |
|
} |
283 |
|
} |
284 |
|
|
285 |
|
/** |
286 |
* An editor class for a <code>JSpinner</code> that is used |
* An editor class for a <code>JSpinner</code> that is used |
287 |
* for displaying and editing dates (e.g. that uses |
* for displaying and editing dates (e.g. that uses |
288 |
* <code>SpinnerDateModel</code> as model). |
* <code>SpinnerDateModel</code> as model). |
332 |
/** |
/** |
333 |
* Initializes the JFormattedTextField for this editor. |
* Initializes the JFormattedTextField for this editor. |
334 |
* |
* |
335 |
* @param the date format to use in the formatted text field |
* @param format the date format to use in the formatted text field |
336 |
*/ |
*/ |
337 |
private void init(SimpleDateFormat format) |
private void init(SimpleDateFormat format) |
338 |
{ |
{ |