当前页面:
在线文档首页 >
NetBeans API Javadoc 5.0.0
SourceCookie.Editor (NetBeans Java Hierarchy API) - NetBeans API Javadoc 5.0.0
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.
sourceToText
public Element sourceToText(Element element)
- Translate a source element to text.
- Parameters:
element
- an element from the source hierarchy
- Returns:
- a text element
textToSource
public 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
public 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.