/[classpath]/classpath/javax/swing/text/StyledEditorKit.java
ViewVC logotype

Diff of /classpath/javax/swing/text/StyledEditorKit.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mkoch, Thu Apr 29 07:00:34 2004 UTC revision 1.5 by mark, Thu Jul 22 19:45:39 2004 UTC
# Line 42  import java.awt.event.ActionEvent; Line 42  import java.awt.event.ActionEvent;
42  import java.beans.PropertyChangeEvent;  import java.beans.PropertyChangeEvent;
43  import java.beans.PropertyChangeListener;  import java.beans.PropertyChangeListener;
44  import java.io.Serializable;  import java.io.Serializable;
   
45  import javax.swing.Action;  import javax.swing.Action;
46  import javax.swing.JEditorPane;  import javax.swing.JEditorPane;
47  import javax.swing.event.CaretEvent;  import javax.swing.event.CaretEvent;
48  import javax.swing.event.CaretListener;  import javax.swing.event.CaretListener;
49    
50    
51  /**  /**
52   * StyledEditorKit   * StyledEditorKit
53     *
54   * @author      Andrew Selkirk   * @author      Andrew Selkirk
  * @version     1.0  
55   */   */
56  public class StyledEditorKit extends DefaultEditorKit  public class StyledEditorKit extends DefaultEditorKit
57  {  {
58    static final long serialVersionUID = 7002391892985555948L;    private static final long serialVersionUID = 7002391892985555948L;
   
         //-------------------------------------------------------------  
         // Classes ----------------------------------------------------  
         //-------------------------------------------------------------  
59    
60          /**          /**
61           * UnderlineAction           * UnderlineAction
62           */           */
63          public static class UnderlineAction extends StyledEditorKit.StyledTextAction {    public static class UnderlineAction extends StyledEditorKit.StyledTextAction
64      {
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
65                  /**                  /**
66                   * Constructor UnderlineAction                   * Constructor UnderlineAction
67                   */                   */
68                  public UnderlineAction() {      public UnderlineAction()
69        {
70                          super("TODO");                          super("TODO");
71                          // TODO                          // TODO
72                  } // UnderlineAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
73    
74                  /**                  /**
75                   * actionPerformed                   * actionPerformed
76                   * @param event TODO                   * @param event TODO
77                   */                   */
78                  public void actionPerformed(ActionEvent event) {      public void actionPerformed(ActionEvent event)
79        {
80                          // TODO                          // TODO
81                  } // actionPerformed()      }
82      }
   
         } // UnderlineAction  
83    
84          /**          /**
85           * ItalicAction           * ItalicAction
86           */           */
87          public static class ItalicAction extends StyledEditorKit.StyledTextAction {    public static class ItalicAction extends StyledEditorKit.StyledTextAction
88      {
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
89                  /**                  /**
90                   * Constructor ItalicAction                   * Constructor ItalicAction
91                   */                   */
92                  public ItalicAction() {      public ItalicAction()
93        {
94                          super("TODO");                          super("TODO");
95                          // TODO                          // TODO
96                  } // ItalicAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
97    
98                  /**                  /**
99                   * actionPerformed                   * actionPerformed
100                   * @param event TODO                   * @param event TODO
101                   */                   */
102                  public void actionPerformed(ActionEvent event) {      public void actionPerformed(ActionEvent event)
103        {
104                          // TODO                          // TODO
105                  } // actionPerformed()      }
106      }
   
         } // ItalicAction  
107    
108          /**          /**
109           * BoldAction           * BoldAction
110           */           */
111          public static class BoldAction extends StyledEditorKit.StyledTextAction {    public static class BoldAction extends StyledEditorKit.StyledTextAction
112      {
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
113                  /**                  /**
114                   * Constructor BoldAction                   * Constructor BoldAction
115                   */                   */
116                  public BoldAction() {      public BoldAction()
117        {
118                          super("TODO");                          super("TODO");
119                          // TODO                          // TODO
120                  } // BoldAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
121    
122                  /**                  /**
123                   * actionPerformed                   * actionPerformed
124                   * @param event TODO                   * @param event TODO
125                   */                   */
126                  public void actionPerformed(ActionEvent event) {      public void actionPerformed(ActionEvent event)
127        {
128                          // TODO                          // TODO
129                  } // actionPerformed()      }
130      }
   
         } // BoldAction  
131    
132          /**          /**
133           * AlignmentAction           * AlignmentAction
134           */           */
135          public static class AlignmentAction extends StyledEditorKit.StyledTextAction {    public static class AlignmentAction extends StyledEditorKit.StyledTextAction
136      {
                 //-------------------------------------------------------------  
                 // Variables --------------------------------------------------  
                 //-------------------------------------------------------------  
   
137                  /**                  /**
138                   * a                   * a
139                   */                   */
140                  private int a;                  private int a;
141    
   
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
142                  /**                  /**
143                   * Constructor AlignmentAction                   * Constructor AlignmentAction
144                   * @param nm TODO                   * @param nm TODO
145                   * @param a TODO                   * @param a TODO
146                   */                   */
147                  public AlignmentAction(String nm, int a) {      public AlignmentAction(String nm, int a)
148        {
149                          super("TODO");                          super("TODO");
150                          // TODO                          // TODO
151                  } // AlignmentAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
152    
153                  /**                  /**
154                   * actionPerformed                   * actionPerformed
155                   * @param event TODO                   * @param event TODO
156                   */                   */
157                  public void actionPerformed(ActionEvent event) {      public void actionPerformed(ActionEvent event)
158        {
159                          // TODO                          // TODO
160                  } // actionPerformed()      }
161      }
   
         } // AlignmentAction  
162    
163          /**          /**
164           * ForegroundAction           * ForegroundAction
165           */           */
166          public static class ForegroundAction extends StyledEditorKit.StyledTextAction {    public static class ForegroundAction extends StyledEditorKit.StyledTextAction
167      {
                 //-------------------------------------------------------------  
                 // Variables --------------------------------------------------  
                 //-------------------------------------------------------------  
   
168                  /**                  /**
169                   * fg                   * fg
170                   */                   */
171                  private Color fg;                  private Color fg;
172    
   
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
173                  /**                  /**
174                   * Constructor ForegroundAction                   * Constructor ForegroundAction
175                   * @param nm TODO                   * @param nm TODO
176                   * @param fg TODO                   * @param fg TODO
177                   */                   */
178                  public ForegroundAction(String nm, Color fg) {      public ForegroundAction(String nm, Color fg)
179        {
180                          super("TODO");                          super("TODO");
181                          // TODO                          // TODO
182                  } // ForegroundAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
183    
184                  /**                  /**
185                   * actionPerformed                   * actionPerformed
186                   * @param event TODO                   * @param event TODO
187                   */                   */
188                  public void actionPerformed(ActionEvent event) {      public void actionPerformed(ActionEvent event)
189        {
190                          // TODO                          // TODO
191                  } // actionPerformed()      }
192      }
   
         } // ForegroundAction  
193    
194          /**          /**
195           * FontSizeAction           * FontSizeAction
196           */           */
197          public static class FontSizeAction extends StyledEditorKit.StyledTextAction {    public static class FontSizeAction extends StyledEditorKit.StyledTextAction
198      {
                 //-------------------------------------------------------------  
                 // Variables --------------------------------------------------  
                 //-------------------------------------------------------------  
   
199                  /**                  /**
200                   * size                   * size
201                   */                   */
202                  private int size;                  private int size;
203    
   
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
204                  /**                  /**
205                   * Constructor FontSizeAction                   * Constructor FontSizeAction
206                   * @param nm TODO                   * @param nm TODO
207                   * @param size TODO                   * @param size TODO
208                   */                   */
209                  public FontSizeAction(String nm, int size) {      public FontSizeAction(String nm, int size)
210        {
211                          super("TODO");                          super("TODO");
212                          // TODO                          // TODO
213                  } // FontSizeAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
214    
215                  /**                  /**
216                   * actionPerformed                   * actionPerformed
217                   * @param event TODO                   * @param event TODO
218                   */                   */
219                  public void actionPerformed(ActionEvent event) {      public void actionPerformed(ActionEvent event)
220        {
221                          // TODO                          // TODO
222                  } // actionPerformed()      }
223      }
   
         } // FontSizeAction  
224    
225          /**          /**
226           * FontFamilyAction           * FontFamilyAction
227           */           */
228          public static class FontFamilyAction extends StyledEditorKit.StyledTextAction {    public static class FontFamilyAction extends StyledEditorKit.StyledTextAction
229      {
                 //-------------------------------------------------------------  
                 // Variables --------------------------------------------------  
                 //-------------------------------------------------------------  
   
230                  /**                  /**
231                   * family                   * family
232                   */                   */
233                  private String family;                  private String family;
234    
   
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
235                  /**                  /**
236                   * Constructor FontFamilyAction                   * Constructor FontFamilyAction
237                   * @param nm TODO                   * @param nm TODO
238                   * @param family TODO                   * @param family TODO
239                   */                   */
240                  public FontFamilyAction(String nm, String family) {      public FontFamilyAction(String nm, String family)
241        {
242                          super("TODO");                          super("TODO");
243                          // TODO                          // TODO
244                  } // FontFamilyAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
245    
246                  /**                  /**
247                   * actionPerformed                   * actionPerformed
248                   * @param event TODO                   * @param event TODO
249                   */                   */
250                  public void actionPerformed(ActionEvent event) {      public void actionPerformed(ActionEvent event)
251        {
252                          // TODO                          // TODO
253                  } // actionPerformed()      }
254      }
   
         } // FontFamilyAction  
255    
256          /**          /**
257           * StyledTextAction           * StyledTextAction
258           */           */
259          public abstract static class StyledTextAction extends TextAction {    public abstract static class StyledTextAction extends TextAction
260      {
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
261                  /**                  /**
262                   * Constructor StyledTextAction                   * Constructor StyledTextAction
263                   * @param nm TODO                   * @param nm TODO
264                   */                   */
265                  public StyledTextAction(String nm) {      public StyledTextAction(String nm)
266        {
267                          super(nm);                          super(nm);
268                          // TODO                          // TODO
269                  } // StyledTextAction()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
270    
271                  /**                  /**
272                   * getEditor                   * getEditor
273                   * @param event TODO                   * @param event TODO
274                   * @returns JEditorPane                   * @returns JEditorPane
275                   */                   */
276                  protected final JEditorPane getEditor(ActionEvent event) {      protected final JEditorPane getEditor(ActionEvent event)
277        {
278                          return null; // TODO                          return null; // TODO
279                  } // getEditor()      }
280    
281                  /**                  /**
282                   * setCharacterAttributes                   * setCharacterAttributes
# Line 378  public class StyledEditorKit extends Def Line 284  public class StyledEditorKit extends Def
284                   * @param value1 TODO                   * @param value1 TODO
285                   * @param value2 TODO                   * @param value2 TODO
286                   */                   */
287                  protected final void setCharacterAttributes(JEditorPane value0, AttributeSet value1, boolean value2) {      protected final void setCharacterAttributes(JEditorPane value0,
288                                                    AttributeSet value1,
289                                                    boolean value2)
290        {
291                          // TODO                          // TODO
292                  } // setCharacterAttributes()      }
293    
294                  /**                  /**
295                   * getStyledDocument                   * getStyledDocument
296                   * @param value0 TODO                   * @param value0 TODO
297                   * @returns StyledDocument                   * @returns StyledDocument
298                   */                   */
299                  protected final StyledDocument getStyledDocument(JEditorPane value0) {      protected final StyledDocument getStyledDocument(JEditorPane value0)
300        {
301                          return null; // TODO                          return null; // TODO
302                  } // getStyledDocument()      }
303    
304                  /**                  /**
305                   * getStyledEditorKit                   * getStyledEditorKit
306                   * @param value0 TODO                   * @param value0 TODO
307                   * @returns StyledEditorKit                   * @returns StyledEditorKit
308                   */                   */
309                  protected final StyledEditorKit getStyledEditorKit(JEditorPane value0) {      protected final StyledEditorKit getStyledEditorKit(JEditorPane value0)
310        {
311                          return null; // TODO                          return null; // TODO
312                  } // getStyledEditorKit()      }
313    
314                  /**                  /**
315                   * setParagraphAttributes                   * setParagraphAttributes
# Line 406  public class StyledEditorKit extends Def Line 317  public class StyledEditorKit extends Def
317                   * @param value1 TODO                   * @param value1 TODO
318                   * @param value2 TODO                   * @param value2 TODO
319                   */                   */
320                  protected final void setParagraphAttributes(JEditorPane value0, AttributeSet value1, boolean value2) {      protected final void setParagraphAttributes(JEditorPane value0,
321                                                    AttributeSet value1,
322                                                    boolean value2)
323        {
324                          // TODO                          // TODO
325                  } // setParagraphAttributes()      }
326      }
   
         } // StyledTextAction  
327    
328          /**          /**
329           * StyledViewFactory           * StyledViewFactory
330           */           */
331          static class StyledViewFactory implements ViewFactory {    static class StyledViewFactory
332        implements ViewFactory
333                  //-------------------------------------------------------------    {
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
334                  /**                  /**
335                   * Constructor StyledViewFactory                   * Constructor StyledViewFactory
336                   */                   */
337                  StyledViewFactory() {      StyledViewFactory()
338        {
339                          // TODO                          // TODO
340                  } // StyledViewFactory()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
341    
342                  /**                  /**
343                   * create                   * create
344                   * @param value0 TODO                   * @param value0 TODO
345                   * @returns View                   * @returns View
346                   */                   */
347                  public View create(Element value0) {      public View create(Element value0)
348        {
349                          return null; // TODO                          return null; // TODO
350                  } // create()      }
351      }
   
         } // StyledViewFactory  
352    
353          /**          /**
354           * AttributeTracker           * AttributeTracker
355           */           */
356           class AttributeTracker implements CaretListener, PropertyChangeListener, Serializable {    class AttributeTracker
357        implements CaretListener, PropertyChangeListener, Serializable
358                  //-------------------------------------------------------------    {
                 // Variables --------------------------------------------------  
                 //-------------------------------------------------------------  
   
   
                 //-------------------------------------------------------------  
                 // Initialization ---------------------------------------------  
                 //-------------------------------------------------------------  
   
359                  /**                  /**
360                   * Constructor AttributeTracker                   * Constructor AttributeTracker
361                   * @param value0 TODO                   * @param value0 TODO
362                   */                   */
363                  AttributeTracker(StyledEditorKit value0) {      AttributeTracker(StyledEditorKit value0)
364        {
365                          // TODO                          // TODO
366                  } // AttributeTracker()      }
   
   
                 //-------------------------------------------------------------  
                 // Methods ----------------------------------------------------  
                 //-------------------------------------------------------------  
367    
368                  /**                  /**
369                   * updateInputAttributes                   * updateInputAttributes
# Line 479  public class StyledEditorKit extends Def Line 371  public class StyledEditorKit extends Def
371                   * @param value1 TODO                   * @param value1 TODO
372                   * @param value2 TODO                   * @param value2 TODO
373                   */                   */
374                  void updateInputAttributes(int value0, int value1, JTextComponent value2) {      void updateInputAttributes(int value0, int value1, JTextComponent value2)
375        {
376                          // TODO                          // TODO
377                  } // updateInputAttributes()      }
378    
379                  /**                  /**
380                   * propertyChange                   * propertyChange
381                   * @param value0 TODO                   * @param value0 TODO
382                   */                   */
383                  public void propertyChange(PropertyChangeEvent value0) {      public void propertyChange(PropertyChangeEvent value0)
384        {
385                          // TODO                          // TODO
386                  } // propertyChange()      }
387    
388                  /**                  /**
389                   * caretUpdate                   * caretUpdate
390                   * @param value0 TODO                   * @param value0 TODO
391                   */                   */
392                  public void caretUpdate(CaretEvent value0) {      public void caretUpdate(CaretEvent value0)
393        {
394                          // TODO                          // TODO
395                  } // caretUpdate()      }
396      }
   
         } // AttributeTracker  
   
   
         //-------------------------------------------------------------  
         // Variables --------------------------------------------------  
         //-------------------------------------------------------------  
397    
398          /**          /**
399           * currentRun           * currentRun
# Line 522  public class StyledEditorKit extends Def Line 410  public class StyledEditorKit extends Def
410           */           */
411          MutableAttributeSet inputAttributes;          MutableAttributeSet inputAttributes;
412    
   
         //-------------------------------------------------------------  
         // Initialization ---------------------------------------------  
         //-------------------------------------------------------------  
   
413          /**          /**
414           * Constructor StyledEditorKit           * Constructor StyledEditorKit
415           */           */
416          public StyledEditorKit() {    public StyledEditorKit()
417      {
418                  // TODO                  // TODO
419          } // StyledEditorKit()    }
   
   
         //-------------------------------------------------------------  
         // Methods ----------------------------------------------------  
         //-------------------------------------------------------------  
420    
421          /**          /**
422           * clone           * clone
423           * @returns Object           * @returns Object
424           */           */
425          public Object clone() {    public Object clone()
426      {
427                  return null; // TODO                  return null; // TODO
428          } // clone()    }
429    
430          /**          /**
431           * getActions           * getActions
432           * @returns Action[]           * @returns Action[]
433           */           */
434          public Action[] getActions() {    public Action[] getActions()
435      {
436                  return null; // TODO                  return null; // TODO
437          } // getActions()    }
438    
439          /**          /**
440           * getInputAttributes           * getInputAttributes
441           * @returns MutableAttributeSet           * @returns MutableAttributeSet
442           */           */
443          public MutableAttributeSet getInputAttributes() {    public MutableAttributeSet getInputAttributes()
444      {
445                  return null; // TODO                  return null; // TODO
446          } // getInputAttributes()    }
447    
448          /**          /**
449           * getCharacterAttributeRun           * getCharacterAttributeRun
450           * @returns Element           * @returns Element
451           */           */
452          public Element getCharacterAttributeRun() {    public Element getCharacterAttributeRun()
453      {
454                  return null; // TODO                  return null; // TODO
455          } // getCharacterAttributeRun()    }
456    
457          /**          /**
458           * createDefaultDocument           * createDefaultDocument
459           * @returns Document           * @returns Document
460           */           */
461          public Document createDefaultDocument() {    public Document createDefaultDocument()
462      {
463                  return null; // TODO                  return null; // TODO
464          } // createDefaultDocument()    }
465    
466          /**          /**
467           * install           * install
468           * @param component TODO           * @param component TODO
469           */           */
470          public void install(JEditorPane component) {    public void install(JEditorPane component)
471      {
472                  // TODO                  // TODO
473          } // install()    }
474    
475          /**          /**
476           * deinstall           * deinstall
477           * @param component TODO           * @param component TODO
478           */           */
479          public void deinstall(JEditorPane component) {    public void deinstall(JEditorPane component)
480      {
481                  // TODO                  // TODO
482          } // deinstall()    }
483    
484          /**          /**
485           * getViewFactory           * getViewFactory
486           * @returns ViewFactory           * @returns ViewFactory
487           */           */
488          public ViewFactory getViewFactory() {    public ViewFactory getViewFactory()
489      {
490                  return null; // TODO                  return null; // TODO
491          } // getViewFactory()    }
492    
493          /**          /**
494           * createInputAttributes           * createInputAttributes
495           * @param element TODO           * @param element TODO
496           * @param set TODO           * @param set TODO
497           */           */
498          protected void createInputAttributes(Element element,    protected void createInputAttributes(Element element, MutableAttributeSet set)
499                          MutableAttributeSet set) {    {
500                  // TODO                  // TODO
501          } // createInputAttributes()    }
502    }
   
 } // StyledEditorKit  

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26