Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.outerj.pollo.* (225)

Package Samples:



Undo: The undo-class enables the undoing of modifications to the DOM-tree. This is achieved by registring this class as mutation-event listener on the DOM tree. Normally for each DOM-event an appropriate Undo.Undoable is created. But sometimes one user action corresponds to multiple modifications to the DOM-tree, such as a drag-and-drop causes both a removal and an insertion of a node. Therefore the concept of UndoTransaction's is introduced. If you're going to do multiple changes, first call startUndoTransaction(String description) 55 , and when you're done, call endUndoTransaction() 55 . There's also ...
AttributesTableModel: A TableModel for the attributes of a DOM element. The attributes are read once during the setElement 55 method, and for each attribute an instance of TempAttrEditInfo is created. These are put in an ArrayList. One of the reasons for working this way is because the attributes of an element have no sequence. Appart from the attributes that exist on the element, the schema is also checked to see what attributes this element can have, and for these also TempAttrEditInfo's are created. If the AttributeTableModel is no longer needed, setElement(null) should be called so that the DOM event listener is ...
JEditTextArea: jEdit's text area component. It is more suited for editing program source code than JEditorPane, because it drops the unnecessary features (images, variable-width lines, and so on) and adds a whole bunch of useful goodies such as: More flexible key binding scheme Supports macro recorders Rectangular selection Bracket highlighting Syntax highlighting Command repetition Block caret can be enabled It is also faster and doesn't have as many problems. It can be used in other applications; the only other part of jEdit it depends on is the syntax package. To use it in your app, treat it like any other ...
CustomTableCellEditor: This class implements the javax.swing.table.TableCellEditor interface. It is meant to be a generic solution where any java.awt.Component can be used as a cell editor. For this to work, two objects must be passed to the constructor: - the component - an object implementing the 'Valuable' interface The reason for this split is to support the case where the component itself is eg a JPanel or a Box containing multiple components (such as a textfield with some buttons next to it). One of the components on the panel will display/edit the value. It is this component that must implement the Valuable interface. ...
SAXEventGenerator: Generates SAX events from a DOM tree. call the makeEvent method to use it. Added notes by Bruno Dumon for the Pollo-specific adjustments: This class is taked from, I didn't find a license but it's obvisiously licensed the same way as the orginial version. What I added is remembering the last node provided that was streamed, so that Pollo can jump to the location where the element occured. It is also possible to specify a node where the validation should stop. This assumes that the contenthandler is of type PolloMsvVerifier. When the specfied node is streamed, the setStopNow method ...
NestedNodeMap: Stores objects based on an (XML) element path (e.g. element/nestedElement). The functionality is 'backwards compatible' with that of NodeMap . The path consits of a series of element names separated by slashes. The path should not begin with a slash. The elements may have namespace prefixes. It is possible to store an object at a path and another object at a subpath of that path, for example you can store an object for 'element' and for 'element/nestedElement'.
ResourceManager: This class is used to managed access to the resources needed by an application.. It is used to internationalize text, icons, and key strokes. Convenience methods are provided for configuring actions, setting menu mnemonics, and registering accelerators. All text strings that must be translated will be taken from a property file. the property file is located along CLASSPATH and must be in the same package as the java file. It is named This class is not internationalizable as it could cause recursion in some error situations.
ExtendedComboBoxTableCellEditor: A TableCellEditor that consists of a combobox with (optionally) some extra components next to it (e.g. a button to browse for a file name, etc.). The extra components are placed left of the dropdown button. This is done by replacing the combobox editor with a panel that contains a textfield and extra components. Because of this, a whole slew of focus-tricks were needed to get it working on both java 1.3 and 1.4. Using the methods in the Valuable interface, the contents of the textfield can be manipulated in a uniform way as for the ExtendedTextFieldCellEditor.
ColorSlider: ColorSlider is a Swing component to let a user select a color using the mouse. The colorslider consists of 3 colored bars for selecting the red, green and blue color components. Since the bars themselves are colored according to the color you will get when you move the slider to a certain position, selecting colors becomes much easier. To get notified of the current color, you can add a PropertyChangeListener that listens for the property ColorSlider.COLOR. The value of the property is a Color object.
View: This is View interface that the XmlModel class uses to communicate with the views on this model. This should not be confused with the View interface in the package org.outerj.pollo.xmleditor.view. While the latter are views on individual nodes of a DOM tree, this View here is rather a window containing a view on the document as a whole. If you create a class that implements this interface (thus a view on an XmlModel), you should register your view with the XmlModel so that it knows about it.
PolloMsvVerifier: Extension of the standard MSV Verifier class. It adds the posiblity to stop validation at a certain moment. This is used for determing the content model of the currently selected node, this works in combination with the SAXEventGenerator how will call setStopNow(true) when it streams the element in question. See MsvSchema.getExpression for how its used. In the end, it would probably be better to write a special DOM version of the Verifier, but this was just quicker to implement.
AttributeEditorSupport: This class provides some basic support for writing new AttributeEditorPlugin's. It will display either a textfield or combobox (if the schema contains predefined values for the attribute). It is possible to add additional components, usually JButtons, to the right of the textfield or combobox. The code behind these buttons can modify the contents of the textfield or combobox through the provided 'Valuable' (see getValuable()). Usage: see the example plugins for Cocoon or Ant.
ExtendedTextFieldTableCellEditor: A TableCellEditor that consists of a textfield with (optionally) some extra components next to it (e.g. a button to browse for a file name, etc.). This behaviour is achieved by placing a textfield and the extra components on a panel, and returning that panel as editor. Using the methods in the Valuable interface, the contents of the textfield can be manipulated in a uniform way as for the ExtendedComboBoxTableCellEditor.
XmlModel: In-memory representation of an XML file. The XML file can be in two formats: as a DOM-tree ('parsed mode'), or as XmlTextDocument ('text mode'). All views on the XmlModel should reflect this, they should be all in parsed mode or text mode. This class also has methods for loading and storing the file. There are some utility functions for searching namespace declarations and getting nodes using xpath expressions.
TokenMarker: A token marker that splits lines of text into tokens. Each token carries a length field and an indentification tag that can be mapped to a color for painting that token. For performance reasons, the linked list of tokens is reused after each line is tokenized. Therefore, the return value of markTokens should only be used for immediate painting. Notably, it cannot be cached.
ChainedDisplaySpecification: A wrapper class around a display specification that allows chaining it. The way chaining works is that if the current instance returns null, the next instance is consulted for a value. Note that the methods in IDisplaySpecification are supposed to always return a value, so make sure that on the end of the chain there's a display specification that always return something for each method.
BasicSchema: Simple schema implementation. This class can provide the following information: which attributes an element can have (optionally) a list of possible attribute values to select form which subelements an element can have The schema information is read from an XML file with a custom syntax, for an example see the sitemapschema.xml file.
MsvSchema: An ISchema implementation using MSV. The schema is read and then flattend out to the same level as the BasicSchema implementation, meaning information about content model, required attributes, etc. is ignored. The MSV grammar is kept however for doing validation (FIXME note to myself: these need to be cached and shared between open files).
NodeDetailsPanel: This panel shows other panels based on the selected node. These other panels are e.g. the AttributesPanel (used to edit attributes) when an element is selected, or a CharDataPanel (to edit the text of a character data node) when a comment is selected. To make this work, the panel must be registered as a listener for selection events.
InputHandler: An input handler converts the user's key strokes into concrete actions. It also takes care of macro recording and action repetition. This class provides all the necessary support code for an input handler, but doesn't actually do any key binding logic. It is up to the implementations of this class to do so.
AttributesPanel: A Panel containing a JTable to edit attribute values, together with buttons to add/delete attributes. The JTable uses an AttributesTableModel to show the attributes.
Token: A linked list of tokens. Each token has three fields - a token identifier, which is a byte value that can be looked up in the array returned by SyntaxDocument.getColors() to get a color value, a length value which is the length of the token in the text, and a pointer to the next token in the list.
DisplaySpecificationToZeroDotFour: Command-line utility class to convert pre-0.4 Pollo display specification files to the 0.4 format. This code was written in half an hour, and is butt-ugly, but at least worked for all Pollo's default display specifications. To use it, pass to parameters on the command line: infile and outfile.

Home | Contact Us | Privacy Policy | Terms of Service