samples/privilegedcreator/test/accessprotectedmethod/MyDocument.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:59:27 +0200
changeset 181 81d72f69fa42
parent 180 131332825eab
permissions -rw-r--r--
Incorporating Patrick's changes. I am not reall sure about the changes after the war, it is really 'or' it cannot be 'and'. I will change that when I do the reading through the whole chapter.
     1 package accessprotectedmethod;
     2 
     3 import javax.swing.text.AbstractDocument;
     4 import javax.swing.text.Element;
     5 import javax.swing.text.StringContent;
     6 
     7 // BEGIN: public.accessor
     8 public class MyDocument  extends AbstractDocument {
     9     public MyDocument() {super(new StringContent());}
    10     
    11     final void writeLockAccess() {
    12         writeLock();
    13     }
    14 // FINISH: public.accessor
    15 
    16     @Override
    17     public Element getDefaultRootElement() {
    18         throw new UnsupportedOperationException("Not supported yet.");
    19     }
    20 
    21     @Override
    22     public Element getParagraphElement(int pos) {
    23         throw new UnsupportedOperationException("Not supported yet.");
    24     }
    25 }