org.openide.src 1.8.22

org.openide.cookies
Interface SourceCookie.Editor

All Superinterfaces:
EditorCookie, LineCookie, Node.Cookie, SourceCookie
Enclosing interface:
SourceCookie

public static interface SourceCookie.Editor
extends SourceCookie, EditorCookie

Extended source cookie permitting for bidirectional translation with Swing text elements.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openide.cookies.SourceCookie
SourceCookie.Editor
 
Nested classes/interfaces inherited from interface org.openide.cookies.EditorCookie
EditorCookie.Observable
 
Method Summary
 Element findElement(int offset)
          Find the element at the specified offset in the document.
 Element sourceToText(Element element)
          Translate a source element to text.
 Element textToSource(Element element)
          Translate a text element to a source element, if it is possible to do so.
 
Methods inherited from interface org.openide.cookies.SourceCookie
getSource
 
Methods inherited from interface org.openide.cookies.EditorCookie
close, getDocument, getOpenedPanes, isModified, open, openDocument, prepareDocument, saveDocument
 
Methods inherited from interface org.openide.cookies.LineCookie
getLineSet
 

Method Detail

sourceToText

Element sourceToText(Element element)
Translate a source element to text.

Parameters:
element - an element from the source hierarchy
Returns:
a text element

textToSource

Element textToSource(Element element)
                     throws NoSuchElementException
Translate a text element to a source element, if it is possible to do so.

Parameters:
element - a text element
Returns:
the element from the source hierarchy
Throws:
NoSuchElementException - if the text element doesn't match any element from the source hierarchy

findElement

Element findElement(int offset)
Find the element at the specified offset in the document.

Parameters:
offset - The position of the element
Returns:
the element at the position.

org.openide.src 1.8.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.