Revision 9788 trunk/libraries/libUI/src/org/gvsig/gui/beans/textBoxWithCalendar/JCalendarDateDialog.java
JCalendarDateDialog.java | ||
---|---|---|
63 | 63 |
* |
64 | 64 |
* @author Pablo Piqueras Bartolom? (p_queras@hotmail.com) |
65 | 65 |
*/ |
66 |
public class JCalendarDateDialog extends JDialog implements Serializable { |
|
67 |
private static final long serialVersionUID = -7227766513840835160L; |
|
66 |
public class JCalendarDateDialog extends JDialog implements IMethodsForGraphicalCalendarComponents, Serializable { |
|
68 | 67 |
private JCalendar jCalendar = null; |
69 | 68 |
private final int defaultWidth = 350; |
70 | 69 |
private final int defaultHeight = 230; |
... | ... | |
185 | 184 |
* @param width (the new Width for the panel) |
186 | 185 |
* @param height (the new Height for the panel) |
187 | 186 |
*/ |
188 |
public void setInitialSize()
|
|
187 |
public void resizeToInitialSize()
|
|
189 | 188 |
{ |
190 | 189 |
getContentPane().setSize(this.defaultWidth, this.defaultHeight); |
191 | 190 |
getJCalendar().revalidate(); |
... | ... | |
353 | 352 |
return jCalendar; |
354 | 353 |
} |
355 | 354 |
|
356 |
/** |
|
357 |
* Gets the date of the calendar (default or last selected) |
|
358 |
* |
|
359 |
* @return Date |
|
360 |
*/ |
|
355 |
/* |
|
356 |
* (non-Javadoc) |
|
357 |
* @see org.gvsig.gui.beans.textBoxWithCalendar.IMethodsForGraphicalCalendarComponents#getDate() |
|
358 |
*/ |
|
361 | 359 |
public Date getDate() { |
362 | 360 |
return jCalendar.getDate(); |
363 | 361 |
} |
364 | 362 |
|
365 |
/** |
|
366 |
* Sets the date to the calendar |
|
367 |
* |
|
368 |
* @param Date |
|
363 |
/* |
|
364 |
* (non-Javadoc) |
|
365 |
* @see org.gvsig.gui.beans.textBoxWithCalendar.IMethodsForGraphicalCalendarComponents#setDate(java.util.Date) |
|
369 | 366 |
*/ |
370 | 367 |
public void setDate(Date date) |
371 | 368 |
{ |
... | ... | |
382 | 379 |
return new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(d); |
383 | 380 |
} |
384 | 381 |
|
385 |
/** |
|
386 |
* Returns the date selected, formatted |
|
387 |
* |
|
388 |
* @return String The formatted date |
|
382 |
/* |
|
383 |
* (non-Javadoc) |
|
384 |
* @see org.gvsig.gui.beans.textBoxWithCalendar.IMethodsForGraphicalCalendarComponents#getFormattedDate() |
|
389 | 385 |
*/ |
390 | 386 |
public String getFormattedDate() { |
391 | 387 |
return new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(this.getDate()); |
Also available in: Unified diff