1 /*******************************************************************************
2 * JDateButton: JavaFX Date Button
3 * Copyright 2012,2014 Tony Washer
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * ------------------------------------------------------------
17 * SubVersion Revision Information:
18 * $URL: https://svn.code.sf.net/p/jdatebutton/code/tags/v2.1.0-b3/jdatebutton-core/src/main/java/net/sourceforge/jdatebutton/JDateFormatter.java $
19 * $Revision: 26 $
20 * $Author: tonywasher $
21 * $Date: 2015-03-04 15:02:58 +0000 (Wed, 04 Mar 2015) $
22 ******************************************************************************/
23 package net.sourceforge.jdatebutton;
24
25 import java.time.LocalDate;
26 import java.util.Locale;
27
28 /**
29 * Interface definition to allow configuration of a single formatter to control all JDateButton instances.
30 * @author Tony Washer
31 */
32 public interface JDateFormatter {
33 /**
34 * Format a LocalDate instance.
35 * @param pDate the date to format.
36 * @return the formatted date
37 */
38 String formatLocalDate(final LocalDate pDate);
39
40 /**
41 * Get the locale for the formatter.
42 * @return the locale
43 */
44 Locale getLocale();
45 }