Revision 9788 trunk/libraries/libUI/src/org/gvsig/gui/beans/textBoxWithCalendar/JCalendarDatePanel.java
JCalendarDatePanel.java | ||
---|---|---|
27 | 27 |
* |
28 | 28 |
* @author Pablo Piqueras Bartolom? (p_queras@hotmail.com) |
29 | 29 |
*/ |
30 |
public class JCalendarDatePanel extends JPanel implements Serializable{ |
|
30 |
public class JCalendarDatePanel extends JPanel implements IMethodsForGraphicalCalendarComponents, Serializable{
|
|
31 | 31 |
private static final long serialVersionUID = -3708600032851165498L; |
32 | 32 |
private JButton jButton = null; |
33 | 33 |
private JCalendarDateDialog jDialogCalendar = null; |
... | ... | |
144 | 144 |
} |
145 | 145 |
|
146 | 146 |
|
147 |
/** |
|
148 |
* Gets the date of the calendar |
|
149 |
* |
|
150 |
* @return Date |
|
147 |
/* |
|
148 |
* (non-Javadoc) |
|
149 |
* @see org.gvsig.gui.beans.textBoxWithCalendar.IMethodsForGraphicalCalendarComponents#getDate() |
|
151 | 150 |
*/ |
152 | 151 |
public Date getDate() { |
153 | 152 |
return this.getJCalendarDateDialog().getDate(); |
154 | 153 |
} |
155 | 154 |
|
156 |
/** |
|
157 |
* Sets the date to the calendar |
|
158 |
* |
|
159 |
* @param Date |
|
155 |
/* |
|
156 |
* (non-Javadoc) |
|
157 |
* @see org.gvsig.gui.beans.textBoxWithCalendar.IMethodsForGraphicalCalendarComponents#setDate(java.util.Date) |
|
160 | 158 |
*/ |
161 | 159 |
public void setDate(Date date) |
162 | 160 |
{ |
... | ... | |
187 | 185 |
return new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(d); |
188 | 186 |
} |
189 | 187 |
|
190 |
/** |
|
191 |
* Returns the date selected, formatted |
|
192 |
* |
|
193 |
* @return String The formatted date |
|
188 |
/* |
|
189 |
* (non-Javadoc) |
|
190 |
* @see org.gvsig.gui.beans.textBoxWithCalendar.IMethodsForGraphicalCalendarComponents#getFormattedDate() |
|
194 | 191 |
*/ |
195 | 192 |
public String getFormattedDate() { |
196 | 193 |
return new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(this.getDate()); |
... | ... | |
233 | 230 |
* @param width (the new Width for the button) |
234 | 231 |
* @param height (the new Height for the button) |
235 | 232 |
*/ |
236 |
public void setSizeResizeJButton(int width, int height) {
|
|
233 |
public void setSizeResize(int width, int height) { |
|
237 | 234 |
this.getJButton().setPreferredSize(new Dimension(width, height)); |
238 | 235 |
} |
239 | 236 |
|
Also available in: Unified diff