예제 #1
0
 // DefaultEditorKit does not provide a view factory. The private
 // class JEditorPane.PlainEditorKit does the exact same thing.
 public ViewFactory getViewFactory() {
   ViewFactory ret = delegate.getViewFactory();
   if (ret != null) {
     if (Settings.debug) System.err.println("Delegating getViewFactory: " + ret);
     return ret;
   } else {
     if (Settings.debug) System.err.println("Providing own view factory");
     return new ViewFactory() {
       public View create(Element elem) {
         return new WrappedPlainView(elem);
       }
     };
   }
 }
예제 #2
0
 // Here's where the font is set on the editor pane, and we also keep
 // track of the panes in use for future font updates.
 public void install(JEditorPane pane) {
   if (Settings.debug) System.err.println("Installing kit into pane");
   delegate.install(pane);
   panes.add(pane);
   pane.setFont(Settings.font);
 }
예제 #3
0
 public void write(Writer wr, Document doc, int pos, int length)
     throws IOException, BadLocationException {
   if (Settings.debug) System.err.println("Delegating write to Writer");
   delegate.write(wr, doc, pos, length);
 }
예제 #4
0
 public void write(OutputStream os, Document doc, int pos, int length)
     throws IOException, BadLocationException {
   if (Settings.debug) System.err.println("Delegating write to OutputStream");
   delegate.write(os, doc, pos, length);
 }
예제 #5
0
 public void read(Reader rd, Document doc, int pos) throws IOException, BadLocationException {
   if (Settings.debug) System.err.println("Delegating read from Reader");
   delegate.read(rd, doc, pos);
 }
예제 #6
0
 public void read(InputStream is, Document doc, int pos) throws IOException, BadLocationException {
   if (Settings.debug) System.err.println("Delegating read from InputStream");
   delegate.read(is, doc, pos);
 }
예제 #7
0
 public Document createDefaultDocument() {
   Document ret = delegate.createDefaultDocument();
   if (Settings.debug) System.err.println("Delegating createDefaultDocument: " + ret);
   return ret;
 }
예제 #8
0
 public Caret createCaret() {
   if (Settings.debug) System.err.println("Delegating createCaret");
   return delegate.createCaret();
 }
예제 #9
0
 public Action[] getActions() {
   if (Settings.debug) System.err.println("Delegating getActions");
   return delegate.getActions();
 }
예제 #10
0
 // Delegated methods:
 public String getContentType() {
   String ret = delegate.getContentType();
   if (Settings.debug) System.err.println("Delegating getContentType: " + ret);
   return ret;
 }
예제 #11
0
 public void deinstall(JEditorPane pane) {
   if (Settings.debug) System.err.println("Deinstalling kit from pane");
   panes.remove(pane);
   delegate.deinstall(pane);
 }