| org.netbeans.editor.BaseDocument org.netbeans.editor.GuardedDocument
GuardedDocument | public class GuardedDocument extends BaseDocument implements StyledDocument(Code) | | Extension to the guarded document that implements StyledDocument interface
author: Miloslav Metelka version: 1.00 |
Method Summary | |
public Style | addStyle(String styleName, Style parent) | public void | addStyleToLayerMapping(String styleName, String layerName) | protected DrawLayer | addStyledLayer(String layerName, Style style) | protected BaseDocumentEvent | createDocumentEvent(int offset, int length, DocumentEvent.EventType type) | public Color | getBackground(AttributeSet attr) Takes a set of attributes and turn it into a background color
specification. | public Element | getCharacterElement(int pos) Gets the element that represents the character that is at the given
offset within the document. | public Font | getFont(AttributeSet attr) Takes a set of attributes and turn it into a font specification. | public Color | getForeground(AttributeSet attr) Takes a set of attributes and turn it into a foreground color
specification. | public MarkBlockChain | getGuardedBlockChain() | public Style | getLogicalStyle(int pos) | public Style | getStyle(String styleName) | public Enumeration | getStyleNames() | public boolean | isPosGuarded(int pos) | protected void | preInsertCheck(int offset, String text, AttributeSet a) This method is called automatically before the document is updated as
result of removal. | protected void | preRemoveCheck(int offset, int len) This method is called automatically before the document is updated as
result of removal. | public void | removeStyle(String styleName) | public void | runAtomic(Runnable r) | public void | runAtomicAsUser(Runnable r) | public void | setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) | public void | setLogicalStyle(int pos, Style s) Sets the logical style to use for the paragraph at the given position. | public void | setNormalStyleName(String normalStyleName) Set the name for normal style. | public void | setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) Change attributes for part of the text. | public String | toStringDetail() |
FMT_GUARDED_INSERT_LOCALE | final public static String FMT_GUARDED_INSERT_LOCALE(Code) | | |
FMT_GUARDED_REMOVE_LOCALE | final public static String FMT_GUARDED_REMOVE_LOCALE(Code) | | |
GUARDED_ATTRIBUTE | final public static String GUARDED_ATTRIBUTE(Code) | | Guarded attribute used for specifying that the inserted block will be
guarded.
|
atomicAsUser | boolean atomicAsUser(Code) | | |
breakGuarded | boolean breakGuarded(Code) | | Break the guarded flag, so inserts/removals over guarded areas will work
|
normalStyleName | protected String normalStyleName(Code) | | Name of the normal style. The normal style is used to reset the effect of
all styles applied to the line.
|
stylesToLayers | protected Hashtable stylesToLayers(Code) | | Style to layer name mapping
|
GuardedDocument | public GuardedDocument(Class kitClass)(Code) | | |
GuardedDocument | public GuardedDocument(Class kitClass, boolean addToRegistry, StyleContext styles)(Code) | | Create base document with a specified syntax and style context.
Parameters: kitClass - class used to initialize this document with proper settingscategory based on the editor kit for which this document iscreated Parameters: syntax - syntax scanner to use with this document Parameters: styles - style context to use |
addStyleToLayerMapping | public void addStyleToLayerMapping(String styleName, String layerName)(Code) | | |
getBackground | public Color getBackground(AttributeSet attr)(Code) | | Takes a set of attributes and turn it into a background color
specification. This might be used to specify things like brighter, more
hue, etc.
Parameters: attr - the set of attributes the color |
getCharacterElement | public Element getCharacterElement(int pos)(Code) | | Gets the element that represents the character that is at the given
offset within the document.
Parameters: pos - the offset >= 0 the element |
getFont | public Font getFont(AttributeSet attr)(Code) | | Takes a set of attributes and turn it into a font specification. This can
be used to turn things like family, style, size, etc into a font that is
available on the system the document is currently being used on.
Parameters: attr - the set of attributes the font |
getForeground | public Color getForeground(AttributeSet attr)(Code) | | Takes a set of attributes and turn it into a foreground color
specification. This might be used to specify things like brighter, more
hue, etc.
Parameters: attr - the set of attributes the color |
getGuardedBlockChain | public MarkBlockChain getGuardedBlockChain()(Code) | | Get the chain of the guarded blocks
|
getLogicalStyle | public Style getLogicalStyle(int pos)(Code) | | Get logical style for position in paragraph
|
getStyleNames | public Enumeration getStyleNames()(Code) | | Fetches the list of style names
|
isPosGuarded | public boolean isPosGuarded(int pos)(Code) | | |
preInsertCheck | protected void preInsertCheck(int offset, String text, AttributeSet a) throws BadLocationException(Code) | | This method is called automatically before the document is updated as
result of removal. This function can throw BadLocationException or its
descendants to stop the ongoing insert from being actually done.
Parameters: evt - document event containing the change including array ofcharacters that will be inserted |
preRemoveCheck | protected void preRemoveCheck(int offset, int len) throws BadLocationException(Code) | | This method is called automatically before the document is updated as
result of removal.
|
removeStyle | public void removeStyle(String styleName)(Code) | | Removes style from document
|
setCharacterAttributes | public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)(Code) | | |
setLogicalStyle | public void setLogicalStyle(int pos, Style s)(Code) | | Sets the logical style to use for the paragraph at the given position. If
attributes aren't explicitly set for character and paragraph attributes
they will resolve through the logical style assigned to the paragraph,
which in turn may resolve through some hierarchy completely independent
of the element hierarchy in the document.
Parameters: pos - the starting position >= 0 Parameters: s - the style to set |
setNormalStyleName | public void setNormalStyleName(String normalStyleName)(Code) | | Set the name for normal style. Normal style is used to reset the effect
of all aplied styles.
|
setParagraphAttributes | public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)(Code) | | Change attributes for part of the text.
|
Methods inherited from org.netbeans.editor.BaseDocument | public boolean addLayer(DrawLayer layer, int visibility)(Code)(Java Doc) final public synchronized void atomicLock()(Code)(Java Doc) final public synchronized void atomicUnlock()(Code)(Java Doc) final public void breakAtomicLock()(Code)(Java Doc) protected BaseDocumentEvent createDocumentEvent(int pos, int length, DocumentEvent.EventType type)(Code)(Java Doc) public Position createPosition(int offset, Position.Bias bias) throws BadLocationException(Code)(Java Doc) final public synchronized void extWriteLock()(Code)(Java Doc) final public synchronized void extWriteUnlock()(Code)(Java Doc) public int find(Finder finder, int startPos, int limitPos) throws BadLocationException(Code)(Java Doc) public DrawLayer findLayer(String layerName)(Code)(Java Doc) protected void fireChangedUpdate(DocumentEvent e)(Code)(Java Doc) protected void fireInsertUpdate(DocumentEvent e)(Code)(Java Doc) protected void fireRemoveUpdate(DocumentEvent e)(Code)(Java Doc) public synchronized Annotations getAnnotations()(Code)(Java Doc) final protected int getAtomicDepth()(Code)(Java Doc) public synchronized Bookmarks getBookmarks()(Code)(Java Doc) public char[] getChars(int pos, int len) throws BadLocationException(Code)(Java Doc) public char[] getChars(int[] block) throws BadLocationException(Code)(Java Doc) public void getChars(int pos, char ret, int offset, int len) throws BadLocationException(Code)(Java Doc) public Element getDefaultRootElement()(Code)(Java Doc) final DrawLayerList getDrawLayerList()(Code)(Java Doc) public Formatter getFormatter()(Code)(Java Doc) Syntax getFreeSyntax()(Code)(Java Doc) final public Class getKitClass()(Code)(Java Doc) final public int getLength()(Code)(Java Doc) public int getNextBookmark(int pos, boolean wrap) throws BadLocationException(Code)(Java Doc) public Element getParagraphElement(int pos)(Code)(Java Doc) public Element[] getRootElements()(Code)(Java Doc) public int getShiftWidth()(Code)(Java Doc) int getStoredPosition(int posID)(Code)(Java Doc) public SyntaxSupport getSyntaxSupport()(Code)(Java Doc) public int getTabSize()(Code)(Java Doc) public String getText(int[] block) throws BadLocationException(Code)(Java Doc) public void insertString(int offset, String text, AttributeSet a) throws BadLocationException(Code)(Java Doc) public void invalidateSyntaxMarks()(Code)(Java Doc) final public boolean isAtomicLock()(Code)(Java Doc) public boolean isIdentifierPart(char ch)(Code)(Java Doc) public boolean isModified()(Code)(Java Doc) public boolean isWhitespace(char ch)(Code)(Java Doc) protected void preInsertCheck(int offset, String text, AttributeSet a) throws BadLocationException(Code)(Java Doc) protected void preRemoveCheck(int offset, int len) throws BadLocationException(Code)(Java Doc) public void print(PrintContainer container)(Code)(Java Doc) public int processText(TextBatchProcessor tbp, int startPos, int endPos) throws BadLocationException(Code)(Java Doc) public void read(Reader reader, int pos) throws IOException, BadLocationException(Code)(Java Doc) void releaseSyntax(Syntax syntax)(Code)(Java Doc) public void remove(int offset, int len) throws BadLocationException(Code)(Java Doc) void removeStoredPosition(int posID)(Code)(Java Doc) public void render(Runnable r)(Code)(Java Doc) public void repaintBlock(int startOffset, int endOffset)(Code)(Java Doc) public void resetUndoMerge()(Code)(Java Doc) public void runAtomic(Runnable r)(Code)(Java Doc) public void runAtomicAsUser(Runnable r)(Code)(Java Doc) public void settingsChange(SettingsChangeEvent evt)(Code)(Java Doc) int storePosition(int pos) throws BadLocationException(Code)(Java Doc) public String toString()(Code)(Java Doc) public String toStringDetail()(Code)(Java Doc) public boolean toggleBookmark(int pos) throws BadLocationException(Code)(Java Doc) public void write(Writer writer, int pos, int len) throws IOException, BadLocationException(Code)(Java Doc)
|
|
|