Java Swing - O Reilly (Jetty web server) public void paint(Graphics g,

Java Swing - O Reilly public void paint(Graphics g, Shape allocation) Calculates the width and height of the cell, adjusting the allocation if the cell spans multiple rows or columns. It calls paintCell() and super.paint(). Chapter 24. EditorKits and TextActions Over the last five chapters we’ve covered just about all of the classes and interfaces that make up the Swing text framework. In this chapter, we’ll look at a class that ties everything together: EditorKit. An EditorKit is used to pull together the document model, document view, document editing actions, and document I/O strategy, serving as a central reference point for a given document type. In addition to looking at EditorKit and its subclasses, this chapter also introduces the TextAction class (an abstract extension of AbstractAction) and the many useful concrete action classes available as inner classes of the EditorKit subclasses. These actions are used for tasks such as copying and pasting text as well as style-oriented tasks such as changing font characteristics. Throughout the course of the chapter, we’ll be building simple but powerful editors for working with increasingly complex document types. 24.1 Overview of the Editor Kits The following sections give an overview of the components of various editor kits. 24.1.1 The EditorKit Class This is the abstract base class for all editor kits. It defines a number of methods that define the model (e.g., createDefaultDocument()), the view (e.g., getViewFactory()), the capabilities (getActions()), and the I/O strategy (read() and write()) for some type of document content. Figure 24.1 shows the EditorKit class and the many classes and interfaces it interacts with. Figure 24.1. EditorKit and related classes - 788
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Leave a Reply