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.
jtulach@71
     1
package accessprotectedmethod;
jtulach@71
     2
jtulach@71
     3
import javax.swing.text.AbstractDocument;
jtulach@71
     4
import javax.swing.text.Element;
jtulach@71
     5
import javax.swing.text.StringContent;
jtulach@71
     6
jtulach@71
     7
// BEGIN: public.accessor
jtulach@71
     8
public class MyDocument  extends AbstractDocument {
jtulach@71
     9
    public MyDocument() {super(new StringContent());}
jtulach@71
    10
    
jtulach@71
    11
    final void writeLockAccess() {
jtulach@71
    12
        writeLock();
jtulach@71
    13
    }
jtulach@181
    14
// FINISH: public.accessor
jtulach@71
    15
jtulach@71
    16
    @Override
jtulach@71
    17
    public Element getDefaultRootElement() {
jtulach@71
    18
        throw new UnsupportedOperationException("Not supported yet.");
jtulach@71
    19
    }
jtulach@71
    20
jtulach@71
    21
    @Override
jtulach@71
    22
    public Element getParagraphElement(int pos) {
jtulach@71
    23
        throw new UnsupportedOperationException("Not supported yet.");
jtulach@71
    24
    }
jtulach@71
    25
}