Home >> All >> javax >> swing >> [ text Javadoc ] |
| javax.swing.text.html.* (26) | | javax.swing.text.html.parser.* (10) | | javax.swing.text.rtf.* (7) |
javax.swing.text: Javadoc index of package javax.swing.text.
Package Samples:
javax.swing.text.html
javax.swing.text.html.parser
javax.swing.text.rtf
Classes:
DocumentParser: A simple error-tolerant HTML parser that uses a DTD document to access data on the possible tokens, arguments and syntax. The parser reads an HTML content from a Reader and calls various notifying methods (which should be overridden in a subclass) when tags or data are encountered. Some HTML elements need no opening or closing tags. The task of this parser is to invoke the tag handling methods also when the tags are not explicitly specified and must be supposed using information, stored in the DTD. For example, parsing the document <table><tr><td>a<td>b<td>c</tr> ...
DTD: Representation or the SGML DTD document. Provides basis for describing a syntax of the HTML documents. The fields of this class are NOT initialized in constructor. You need to do this separately before passing this data structure to the HTML parser. The subclasses with the fields, pre- initialized, for example, for HTML 4.01, can be available only between the implementation specific classes ( for example, gnu.javax.swing.text.html.parser.HTML_401F in this implementation). If you need more information about SGML DTD documents, the author suggests to read SGML tutorial on http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html ...
AsyncBoxView: A View implementation that lays out its child views in a box, either vertically or horizontally. The difference to BoxView is that the layout is performed in an asynchronous manner. This helps to keep the eventqueue free from non-GUI related tasks. This view is currently not used in standard text components. In order to use it you would have to implement a special EditorKit with a ViewFactory that returns this view. For example: static class AsyncEditorKit extends StyledEditorKit implements ViewFactory { public View create(Element el) { if (el.getName().equals(AbstractDocument.SectionElementName)) ...
Parser: A simple error-tolerant HTML parser that uses a DTD document to access data on the possible tokens, arguments and syntax. The parser reads an HTML content from a Reader and calls various notifying methods (which should be overridden in a subclass) when tags or data are encountered. Some HTML elements need no opening or closing tags. The task of this parser is to invoke the tag handling methods also when the tags are not explicitly specified and must be supposed using information, stored in the DTD. For example, parsing the document <table><tr><td>a<td>b<td>c</tr> ...
FormView: A View that renders HTML form elements like buttons and input fields. This is implemented as a javax.swing.text.ComponentView that creates different Swing component depending on the type and setting of the different form elements. Namely, this view creates the following components: Element type Swing component input, button JButton input, checkbox JButton input, image JButton input, password JButton input, radio JButton input, reset JButton input, submit JButton input, text JButton select, size > 1 or with multiple attribute JList in JScrollPane select, size unspecified or == 1 JComboBox textarea, ...
ContentModel: A representation of the element content. The instances of this class can be arranged into the linked list, representing a BNF expression. The content model is constructed as a branched tree structure in the following way: a = new ContentModel('+', A, null); // a reprensents A+ b = new ContentModel('&', B, a); // b represents B & A+ c = new ContentModel('*', b, null); // c represents ( B & A+) * d = new ContentModel('|', new ContentModel('*', A, null), new ContentModel('?', B, null)); // d represents ( A* | B? ) where the valid operations are: E* E occurs zero or more times E+ E occurs ...
AttributeList: Stores the attribute information, obtained by parsing SGML (DTD) tag <!ATTLIST .. > Elements can have a associated named properties (attributes) having the assigned values. The element start tag can have any number of attribute value pairs, separated by spaces. They can appear in any order. SGML requires you to delimit the attribute values using either double (") or single (') quotation marks. In HTML, it is possible (but not recommended) to specify the value of an attribute without quotation marks. Such attribute value may only contain letters, digits, hyphens (-) and periods (.) . The AttributeList ...
DefaultStyledDocument: The default implementation of StyledDocument . The document is modeled as an Element tree, which has a DefaultStyledDocument.SectionElement as single root, which has one or more AbstractDocument.BranchElement s as paragraph nodes and each paragraph node having one or more AbstractDocument.LeafElement s as content nodes.
StyleSheet: This class adds support for defining the visual characteristics of HTML views being rendered. This enables views to be customized by a look-and-feel, mulitple views over the same model can be rendered differently. Each EditorPane has its own StyleSheet, but by default one sheet will be shared by all of the HTMLEditorKit instances. An HTMLDocument can also have a StyleSheet, which holds specific CSS specs. In order for Views to store less state and therefore be more lightweight, the StyleSheet can act as a factory for painters that handle some of the rendering tasks. Since the StyleSheet may be ...
IconView: A View that can render an icon. This view is created by the StyledEditorKit 's view factory for all elements that have name StyleConstants.IconElementName 55 . This is usually created by inserting an icon into JTextPane using JTextPane.insertIcon(Icon) > JTextPane.insertIcon(Icon) 55 The icon is determined using the attribute StyleConstants.IconAttribute 55 , which's value must be an javax.swing.Icon .
ObjectView: A view for HTML <object> tags. This is a javax.swing.text.ComponentView that creates special components depending on the object specification. If the object tag has a classid attribute, then this view will try to load the class specified by this attribute using the classloader that loaded the associated document. If the class could be loaded, an instance is created and the type narrowed to java.awt.Component . It is also possible to set bean properties on the created component using nested <param> tags. For example:
TableView: A View implementation for rendering tables inside styled text. Tables are rendered as vertical boxes (see BoxView ). These boxes have a number of child views, which are the rows of the table. These are horizontal boxes containing the actuall cells of the table. These cells can be arbitrary view implementations and are fetched via the ViewFactory returned by View.getViewFactory() 55 .
CSSParser: Parses a CSS document. This works by way of a delegate that implements the CSSParserCallback interface. The delegate is notified of the following events: - Import statement: handleImport - Selectors handleSelector. This is invoked for each string. For example if the Reader contained p, bar , a {}, the delegate would be notified 4 times, for 'p,' 'bar' ',' and 'a'. - When a rule starts, startRule - Properties in the rule via the handleProperty. This is invoked one per property/value key, eg font size: foo;, would cause the delegate to be notified once with a value of 'font size'. - Values in the ...
DTDConstants: This class defines the SGML basic types, used for describing HTML 4.01 at http://www.w3.org/TR/html4/types.html . Not all constants, defined here, are actually used in HTML 4.01 SGML specification. Some others are defined just as part of the required implementation. If you need more information about SGML DTD documents, the author suggests to read SGML tutorial on http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html . We also recommend Goldfarb C.F (1991) The SGML Handbook , Oxford University Press, 688 p, ISBN: 0198537379.
Element: Stores the element information, obtained by parsing SGML DTD tag <!ELEMENT .. > . This class has no public constructor and can only be instantiated using the DTD methods SGML defines elements that represent structures or behavior. An element typically consists of a start tag, content, and an end tag. Hence the elements are not tags. The HTML 4.0 definition specifies that some elements are not required to have the end tags. Also, some HTML elements (like <hr> ) have no content. Element names are case sensitive.
GapContent: This implementation of AbstractDocument.Content uses a gapped buffer. This takes advantage of the fact that text area content is mostly inserted sequentially. The buffer is a char array that maintains a gap at the current insertion point. If characters a inserted at gap boundaries, the cost is minimal (simple array access). The array only has to be shifted around when the insertion point moves (then the gap also moves and one array copy is necessary) or when the gap is filled up and the buffer has to be enlarged. TODO: Implement UndoableEdit support stuff
ComponentView: A View implementation that is able to render arbitrary java.awt.Component s. This uses the attribute StyleConstants.ComponentAttribute 55 to determine the Component that should be rendered. This Component becomes a direct child of the JTextComponent that contains this ComponentView , so this view must not be shared between multiple JTextComponent s.
FlowView: A View that can flows it's children into it's layout space. The FlowView manages a set of logical views (that are the children of the layoutPool 55 field). These are translated at layout time into a set of physical views. These are the views that are managed as the real child views. Each of these child views represents a row and are laid out within a box using the superclasses behaviour. The concrete implementation of the rows must be provided by subclasses.
DefaultFormatter: The DefaultFormatter is a concrete formatter for use in javax.swing.JFormattedTextField s. It can format arbitrary values by invoking their Object.toString() > Object.toString() 55 method. In order to convert a String back to a value, the value class must provide a single argument constructor that takes a String object as argument value. If no such constructor is found, the String itself is passed back by #stringToValue.
ElementIterator: This class can be used to iterate over the Element tree of a Document or an Element . This iterator performs an "in-order" traversal -- first it visits a node, then each of the node's children in order. No locking is performed during the iteration; that is up to the caller.
AttributeSet: A set of attributes. An attribute has a key and a value. They typically describe features of a piece of text that make up its graphical representation. An AttributeSet may have a resolving parent, that is another AttributeSet that is searched for attribute keys that are not stored locally in this AttributeSet .
Home | Contact Us | Privacy Policy | Terms of Service |