Source for javax.swing.text.StyledEditorKit

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