1 19 package org.openide.text; 20 21 import javax.swing.text.*; 22 23 24 26 32 public class FilterStyledDocument extends FilterDocument { 33 36 public FilterStyledDocument(StyledDocument original) { 37 super(original); 38 } 39 40 44 60 public Style addStyle(String nm, Style parent) { 61 return ((StyledDocument) original).addStyle(nm, parent); 62 } 63 64 69 public void removeStyle(String nm) { 70 ((StyledDocument) original).removeStyle(nm); 71 } 72 73 79 public Style getStyle(String nm) { 80 return ((StyledDocument) original).getStyle(nm); 81 } 82 83 102 public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) { 103 ((StyledDocument) original).setCharacterAttributes(offset, length, s, replace); 104 } 105 106 119 public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) { 120 ((StyledDocument) original).setParagraphAttributes(offset, length, s, replace); 121 } 122 123 134 public void setLogicalStyle(int pos, Style s) { 135 ((StyledDocument) original).setLogicalStyle(pos, s); 136 } 137 138 144 public Style getLogicalStyle(int p) { 145 return ((StyledDocument) original).getLogicalStyle(p); 146 } 147 148 155 public Element getParagraphElement(int pos) { 156 return ((StyledDocument) original).getParagraphElement(pos); 157 } 158 159 166 public Element getCharacterElement(int pos) { 167 return ((StyledDocument) original).getCharacterElement(pos); 168 } 169 170 178 public java.awt.Color getForeground(AttributeSet attr) { 179 return ((StyledDocument) original).getForeground(attr); 180 } 181 182 190 public java.awt.Color getBackground(AttributeSet attr) { 191 return ((StyledDocument) original).getBackground(attr); 192 } 193 194 203 public java.awt.Font getFont(AttributeSet attr) { 204 return ((StyledDocument) original).getFont(attr); 205 } 206 } 207 | Popular Tags |