Author: echatellier Date: 2010-11-18 09:39:36 +0100 (Thu, 18 Nov 2010) New Revision: 309 Url: http://nuiton.org/repositories/revision/nuiton-widgets/309 Log: Remove DatePicker (use swingx one) Removed: trunk/src/main/java/org/nuiton/widget/DatePicker.java Modified: trunk/src/main/java/org/nuiton/widget/SwingWidgetFactory.java Deleted: trunk/src/main/java/org/nuiton/widget/DatePicker.java =================================================================== --- trunk/src/main/java/org/nuiton/widget/DatePicker.java 2010-11-18 08:38:04 UTC (rev 308) +++ trunk/src/main/java/org/nuiton/widget/DatePicker.java 2010-11-18 08:39:36 UTC (rev 309) @@ -1,63 +0,0 @@ -/* - * #%L - * Graphical Widget - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -package org.nuiton.widget; - -import java.text.DateFormat; -import java.text.ParseException; -import java.util.Date; - -import javax.swing.JTextField; - -/** - * @deprecate since 1.0.4 will be remove in 1.1 use swingx date picker instead - */ -@Deprecated -public class DatePicker extends JTextField { - - private static final long serialVersionUID = 1L; - - protected DateFormat dateFormat = null; - - public DatePicker(DateFormat dateFormat) { - super(); - this.dateFormat = dateFormat; - } - - public void setDate(Date date) { - super.setText(dateFormat.format(date)); - } - - public Date getDate() throws InvalidDateException { - Date date; - try { - date = dateFormat.parse(super.getText()); - } catch (ParseException e) { - throw new InvalidDateException(e); - } - return date; - } - -} Modified: trunk/src/main/java/org/nuiton/widget/SwingWidgetFactory.java =================================================================== --- trunk/src/main/java/org/nuiton/widget/SwingWidgetFactory.java 2010-11-18 08:38:04 UTC (rev 308) +++ trunk/src/main/java/org/nuiton/widget/SwingWidgetFactory.java 2010-11-18 08:39:36 UTC (rev 309) @@ -106,7 +106,6 @@ /** * Creates and returns a <code>JToolBar</code> */ - @Deprecated public static JToolBar createToolBar() { JToolBar toolBar = new JToolBar(); @@ -125,7 +124,6 @@ /** * Creates and returns a <code>JMenuBar</code> */ - @Deprecated public static JMenuBar createMenuBar() { JMenuBar menuBar = new JMenuBar(); @@ -149,13 +147,4 @@ menuItem.setText(action.getShortText()); return menuItem; } - - /** - * @deprecate since 1.0.4 will be remove in 1.1 use swingx date picker instead - */ - @Deprecated - public static DatePicker createDatePicker(DateFormat dateFormat) { - return new DatePicker(dateFormat); - } - }
participants (1)
-
echatellier@users.nuiton.org