Java Swing - (How to cite a web site) O Reilly 19.1 The Swing Text

Java Swing - O Reilly 19.1 The Swing Text Components The five concrete Swing text component classes all have quite a bit in common. Consequently, they share a common base class, JTextComponent. Figure 19.2 shows the class hierarchy for the Swing text components. As you can see, JTextComponent is the only one of these classes defined in the text package; the rest can be found in javax.swing [1] with the rest of the Swing component classes. [1] All of the other text-related classes (discussed in the subsequent chapters) are part of the javax.swing.text package. Figure 19.2. The Swing text components 19.1.1 The JTextComponent Class JTextComponent is an abstract class that serves as the base class for all text-based Swing components. It defines a large number of properties and methods that apply to its subclasses. In this introductory chapter, we’ll pass quickly over many of these properties, as they require an understanding of the underlying model and view aspects of the text framework. 19.1.1.1 Properties JTextComponent defines the properties and default values shown in Table 19.1. document is a reference to the Document model for the component. This is where the component’s data is stored. We’ll get into a lot of detail on the Document interface and its implementations in the next chapter. The UI property for all text components is a TextUI. Table 19.1, JTextComponent Properties Property Data Type get is set bound Default Value document Document null UI TextUI from L&F accessibleContext* AccessibleContext AccessibleJTextComponent actions Action[] From the UI’s EditorKit caret Caret null caretColor Color null caretPosition int From caret disabledTextColor Color null editable boolean true enabled* boolean true - 579
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Leave a Reply