Exemplo n.º 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);
       }
     };
   }
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 7
0
 public Document createDefaultDocument() {
   Document ret = delegate.createDefaultDocument();
   if (Settings.debug) System.err.println("Delegating createDefaultDocument: " + ret);
   return ret;
 }
Exemplo n.º 8
0
 public Caret createCaret() {
   if (Settings.debug) System.err.println("Delegating createCaret");
   return delegate.createCaret();
 }
Exemplo n.º 9
0
 public Action[] getActions() {
   if (Settings.debug) System.err.println("Delegating getActions");
   return delegate.getActions();
 }
Exemplo n.º 10
0
 // Delegated methods:
 public String getContentType() {
   String ret = delegate.getContentType();
   if (Settings.debug) System.err.println("Delegating getContentType: " + ret);
   return ret;
 }
Exemplo n.º 11
0
 public void deinstall(JEditorPane pane) {
   if (Settings.debug) System.err.println("Deinstalling kit from pane");
   panes.remove(pane);
   delegate.deinstall(pane);
 }