1 /* JFormattedTextField.java --
2 Copyright (C) 2003 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
41 import java
.awt
.event
.FocusEvent
;
42 import java
.io
.Serializable
;
43 import java
.text
.Format
;
44 import java
.text
.ParseException
;
45 import javax
.swing
.text
.Document
;
46 import javax
.swing
.text
.DocumentFilter
;
47 import javax
.swing
.text
.NavigationFilter
;
50 * @author Michael Koch
53 public class JFormattedTextField
extends JTextField
55 public abstract static class AbstractFormatter
implements Serializable
57 public AbstractFormatter ()
62 protected Object
clone ()
64 throw new InternalError ("not implemented");
67 protected Action
[] getActions ()
69 throw new InternalError ("not implemented");
72 protected DocumentFilter
getDocumentFilter ()
74 throw new InternalError ("not implemented");
77 protected JFormattedTextField
getFormattedTextField ()
79 throw new InternalError ("not implemented");
82 protected NavigationFilter
getNavigationFilter ()
84 throw new InternalError ("not implemented");
87 public void install (JFormattedTextField ftf
)
89 throw new InternalError ("not implemented");
92 public void uninstall ()
94 throw new InternalError ("not implemented");
97 protected void invalidEdit ()
99 throw new InternalError ("not implemented");
102 protected void setEditValid ()
104 throw new InternalError ("not implemented");
107 public abstract Object
stringToValue (String text
);
109 public abstract String
valueToString (Object value
);
112 public abstract static class AbstractFormatterFactory
114 public AbstractFormatterFactory ()
119 public abstract AbstractFormatter
getFormatter (JFormattedTextField tf
);
122 public static final int COMMIT
= 0;
123 public static final int COMMIT_OR_REVERT
= 1;
124 public static final int REVERT
= 2;
125 public static final int PERSIST
= 3;
127 public JFormattedTextField ()
129 throw new InternalError ("not implemented");
132 public JFormattedTextField (Format format
)
134 throw new InternalError ("not implemented");
137 public JFormattedTextField (AbstractFormatter formatter
)
139 throw new InternalError ("not implemented");
142 public JFormattedTextField (AbstractFormatterFactory factory
)
144 throw new InternalError ("not implemented");
147 public JFormattedTextField (AbstractFormatterFactory factory
, Object value
)
149 throw new InternalError ("not implemented");
152 public JFormattedTextField (Object value
)
154 throw new InternalError ("not implemented");
157 public void commitEdit ()
159 throw new InternalError ("not implemented");
162 public Action
[] getActions ()
164 throw new InternalError ("not implemented");
167 public int getFocusLostBehaviour ()
169 throw new InternalError ("not implemented");
172 public AbstractFormatter
getFormatter ()
174 throw new InternalError ("not implemented");
177 public AbstractFormatterFactory
getFormatterFactory ()
179 throw new InternalError ("not implemented");
182 public String
getUIClassID ()
184 throw new InternalError ("not implemented");
187 public Object
getValue ()
189 throw new InternalError ("not implemented");
192 protected void invalidEdit ()
194 throw new InternalError ("not implemented");
197 public boolean isEditValid ()
199 throw new InternalError ("not implemented");
202 protected void processFocusEvent (FocusEvent evt
)
204 throw new InternalError ("not implemented");
207 public void setDocument (Document document
)
209 throw new InternalError ("not implemented");
212 public void setLostFocusBehavior (int behavior
)
214 throw new InternalError ("not implemented");
217 protected void setFormatter (AbstractFormatter formatter
)
219 throw new InternalError ("not implemented");
222 public void setFormatterFactory (AbstractFormatterFactory factory
)
224 throw new InternalError ("not implemented");
227 public void setValue (Object value
)
229 throw new InternalError ("not implemented");