01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: /**
18: * @author Alexander T. Simbirtsev
19: * @version $Revision$
20: */package javax.swing.text;
21:
22: import java.io.IOException;
23: import java.io.InputStream;
24: import java.io.OutputStream;
25: import java.io.Reader;
26: import java.io.Serializable;
27: import java.io.Writer;
28: import javax.swing.Action;
29: import javax.swing.JEditorPane;
30:
31: public abstract class EditorKit implements Cloneable, Serializable {
32:
33: public abstract Caret createCaret();
34:
35: public abstract Document createDefaultDocument();
36:
37: public Object clone() {
38: Object result = null;
39: try {
40: result = super .clone();
41: } catch (final CloneNotSupportedException e) {
42: }
43:
44: return result;
45: }
46:
47: public void install(final JEditorPane jep) {
48: }
49:
50: public void deinstall(final JEditorPane jep) {
51: }
52:
53: public abstract Action[] getActions();
54:
55: public abstract String getContentType();
56:
57: public abstract ViewFactory getViewFactory();
58:
59: public abstract void read(InputStream in, Document doc, int pos)
60: throws IOException, BadLocationException;
61:
62: public abstract void read(Reader in, Document doc, int pos)
63: throws IOException, BadLocationException;
64:
65: public abstract void write(OutputStream out, Document doc, int pos,
66: int len) throws IOException, BadLocationException;
67:
68: public abstract void write(Writer out, Document doc, int pos,
69: int len) throws IOException, BadLocationException;
70:
71: }
|