1 /*
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
80 */
81 private JFormattedTextField.AbstractFormatter defaultFormat;
82
83 /**
84 * <code>JFormattedTextField.AbstractFormatter</code> to use for display.
85 */
86 private JFormattedTextField.AbstractFormatter displayFormat;
87
88 /**
89 * <code>JFormattedTextField.AbstractFormatter</code> to use for editing.
90 */
91 private JFormattedTextField.AbstractFormatter editFormat;
92
93 /**
94 * <code>JFormattedTextField.AbstractFormatter</code> to use if the value
95 * is null.
96 */
97 private JFormattedTextField.AbstractFormatter nullFormat;
98
99
100 public DefaultFormatterFactory() {
101 }
102
103 /**
104 * Creates a <code>DefaultFormatterFactory</code> with the specified
105 * <code>JFormattedTextField.AbstractFormatter</code>.
106 *
107 * @param defaultFormat JFormattedTextField.AbstractFormatter to be used
108 * if a more specific
109 * JFormattedTextField.AbstractFormatter can not be
110 * found.
111 */
112 public DefaultFormatterFactory(JFormattedTextField.
113 AbstractFormatter defaultFormat) {
114 this(defaultFormat, null);
115 }
116
117 /**
118 * Creates a <code>DefaultFormatterFactory</code> with the specified
119 * <code>JFormattedTextField.AbstractFormatter</code>s.
|
1 /*
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
80 */
81 private JFormattedTextField.AbstractFormatter defaultFormat;
82
83 /**
84 * <code>JFormattedTextField.AbstractFormatter</code> to use for display.
85 */
86 private JFormattedTextField.AbstractFormatter displayFormat;
87
88 /**
89 * <code>JFormattedTextField.AbstractFormatter</code> to use for editing.
90 */
91 private JFormattedTextField.AbstractFormatter editFormat;
92
93 /**
94 * <code>JFormattedTextField.AbstractFormatter</code> to use if the value
95 * is null.
96 */
97 private JFormattedTextField.AbstractFormatter nullFormat;
98
99
100 /**
101 * Constructs a {@code DefaultFormatterFactory}.
102 */
103 public DefaultFormatterFactory() {
104 }
105
106 /**
107 * Creates a <code>DefaultFormatterFactory</code> with the specified
108 * <code>JFormattedTextField.AbstractFormatter</code>.
109 *
110 * @param defaultFormat JFormattedTextField.AbstractFormatter to be used
111 * if a more specific
112 * JFormattedTextField.AbstractFormatter can not be
113 * found.
114 */
115 public DefaultFormatterFactory(JFormattedTextField.
116 AbstractFormatter defaultFormat) {
117 this(defaultFormat, null);
118 }
119
120 /**
121 * Creates a <code>DefaultFormatterFactory</code> with the specified
122 * <code>JFormattedTextField.AbstractFormatter</code>s.
|