Merge from the pain train
[official-gcc.git] / libjava / javax / swing / text / StyledEditorKit.java
blob148ebd32bd28d66a34361c516733c25d6d6d74ba
1 /* StyledEditorKit.java --
2 Copyright (C) 2002, 2004 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package javax.swing.text;
41 import java.awt.Color;
42 import java.awt.event.ActionEvent;
43 import java.beans.PropertyChangeEvent;
44 import java.beans.PropertyChangeListener;
45 import java.io.Serializable;
47 import javax.swing.Action;
48 import javax.swing.JEditorPane;
49 import javax.swing.event.CaretEvent;
50 import javax.swing.event.CaretListener;
52 /**
53 * StyledEditorKit
55 * @author Andrew Selkirk
57 public class StyledEditorKit extends DefaultEditorKit
59 private static final long serialVersionUID = 7002391892985555948L;
61 /**
62 * UnderlineAction
64 public static class UnderlineAction extends StyledEditorKit.StyledTextAction
66 /**
67 * Constructor UnderlineAction
69 public UnderlineAction()
71 super("TODO");
72 // TODO
75 /**
76 * actionPerformed
77 * @param event TODO
79 public void actionPerformed(ActionEvent event)
81 // TODO
85 /**
86 * ItalicAction
88 public static class ItalicAction extends StyledEditorKit.StyledTextAction
90 /**
91 * Constructor ItalicAction
93 public ItalicAction()
95 super("TODO");
96 // TODO
99 /**
100 * actionPerformed
101 * @param event TODO
103 public void actionPerformed(ActionEvent event)
105 // TODO
110 * BoldAction
112 public static class BoldAction extends StyledEditorKit.StyledTextAction
115 * Constructor BoldAction
117 public BoldAction()
119 super("TODO");
120 // TODO
124 * actionPerformed
125 * @param event TODO
127 public void actionPerformed(ActionEvent event)
129 // TODO
134 * AlignmentAction
136 public static class AlignmentAction extends StyledEditorKit.StyledTextAction
141 private int a;
144 * Constructor AlignmentAction
145 * @param nm TODO
146 * @param a TODO
148 public AlignmentAction(String nm, int a)
150 super("TODO");
151 // TODO
155 * actionPerformed
156 * @param event TODO
158 public void actionPerformed(ActionEvent event)
160 // TODO
165 * ForegroundAction
167 public static class ForegroundAction extends StyledEditorKit.StyledTextAction
170 * fg
172 private Color fg;
175 * Constructor ForegroundAction
176 * @param nm TODO
177 * @param fg TODO
179 public ForegroundAction(String nm, Color fg)
181 super("TODO");
182 // TODO
186 * actionPerformed
187 * @param event TODO
189 public void actionPerformed(ActionEvent event)
191 // TODO
196 * FontSizeAction
198 public static class FontSizeAction extends StyledEditorKit.StyledTextAction
201 * size
203 private int size;
206 * Constructor FontSizeAction
207 * @param nm TODO
208 * @param size TODO
210 public FontSizeAction(String nm, int size)
212 super("TODO");
213 // TODO
217 * actionPerformed
218 * @param event TODO
220 public void actionPerformed(ActionEvent event)
222 // TODO
227 * FontFamilyAction
229 public static class FontFamilyAction extends StyledEditorKit.StyledTextAction
232 * family
234 private String family;
237 * Constructor FontFamilyAction
238 * @param nm TODO
239 * @param family TODO
241 public FontFamilyAction(String nm, String family)
243 super("TODO");
244 // TODO
248 * actionPerformed
249 * @param event TODO
251 public void actionPerformed(ActionEvent event)
253 // TODO
258 * StyledTextAction
260 public abstract static class StyledTextAction extends TextAction
263 * Constructor StyledTextAction
264 * @param nm TODO
266 public StyledTextAction(String nm)
268 super(nm);
269 // TODO
273 * getEditor
274 * @param event TODO
275 * @returns JEditorPane
277 protected final JEditorPane getEditor(ActionEvent event)
279 return null; // TODO
283 * setCharacterAttributes
284 * @param value0 TODO
285 * @param value1 TODO
286 * @param value2 TODO
288 protected final void setCharacterAttributes(JEditorPane value0,
289 AttributeSet value1,
290 boolean value2)
292 // TODO
296 * getStyledDocument
297 * @param value0 TODO
298 * @returns StyledDocument
300 protected final StyledDocument getStyledDocument(JEditorPane value0)
302 return null; // TODO
306 * getStyledEditorKit
307 * @param value0 TODO
308 * @returns StyledEditorKit
310 protected final StyledEditorKit getStyledEditorKit(JEditorPane value0)
312 return null; // TODO
316 * setParagraphAttributes
317 * @param value0 TODO
318 * @param value1 TODO
319 * @param value2 TODO
321 protected final void setParagraphAttributes(JEditorPane value0,
322 AttributeSet value1,
323 boolean value2)
325 // TODO
330 * StyledViewFactory
332 static class StyledViewFactory
333 implements ViewFactory
336 * Constructor StyledViewFactory
338 StyledViewFactory()
340 // TODO
344 * create
345 * @param value0 TODO
346 * @returns View
348 public View create(Element value0)
350 return null; // TODO
355 * AttributeTracker
357 class AttributeTracker
358 implements CaretListener, PropertyChangeListener, Serializable
361 * Constructor AttributeTracker
362 * @param value0 TODO
364 AttributeTracker(StyledEditorKit value0)
366 // TODO
370 * updateInputAttributes
371 * @param value0 TODO
372 * @param value1 TODO
373 * @param value2 TODO
375 void updateInputAttributes(int value0, int value1, JTextComponent value2)
377 // TODO
381 * propertyChange
382 * @param value0 TODO
384 public void propertyChange(PropertyChangeEvent value0)
386 // TODO
390 * caretUpdate
391 * @param value0 TODO
393 public void caretUpdate(CaretEvent value0)
395 // TODO
400 * currentRun
402 Element currentRun;
405 * currentParagraph
407 Element currentParagraph;
410 * inputAttributes
412 MutableAttributeSet inputAttributes;
415 * Constructor StyledEditorKit
417 public StyledEditorKit()
419 // TODO
423 * clone
424 * @returns Object
426 public Object clone()
428 return null; // TODO
432 * getActions
433 * @returns Action[]
435 public Action[] getActions()
437 return null; // TODO
441 * getInputAttributes
442 * @returns MutableAttributeSet
444 public MutableAttributeSet getInputAttributes()
446 return null; // TODO
450 * getCharacterAttributeRun
451 * @returns Element
453 public Element getCharacterAttributeRun()
455 return null; // TODO
459 * createDefaultDocument
460 * @returns Document
462 public Document createDefaultDocument()
464 return null; // TODO
468 * install
469 * @param component TODO
471 public void install(JEditorPane component)
473 // TODO
477 * deinstall
478 * @param component TODO
480 public void deinstall(JEditorPane component)
482 // TODO
486 * getViewFactory
487 * @returns ViewFactory
489 public ViewFactory getViewFactory()
491 return null; // TODO
495 * createInputAttributes
496 * @param element TODO
497 * @param set TODO
499 protected void createInputAttributes(Element element, MutableAttributeSet set)
501 // TODO