|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.windows.CloneableOpenSupport org.openide.text.CloneableEditorSupport org.openide.text.DataEditorSupport
Support for associating an editor and a Swing Document
to a data object.
Nested Class Summary | |
static class |
DataEditorSupport.Env
Environment that connects the data object and the CloneableEditorSupport. |
Nested classes inherited from class org.openide.text.CloneableEditorSupport |
CloneableEditorSupport.Pane |
Field Summary |
Fields inherited from class org.openide.text.CloneableEditorSupport |
EDITOR_MODE |
Fields inherited from class org.openide.windows.CloneableOpenSupport |
allEditors, env |
Constructor Summary | |
DataEditorSupport(DataObject obj,
CloneableEditorSupport.Env env)
Editor support for a given data object. |
Method Summary | |
protected boolean |
canClose()
Checks whether is possible to close support components. |
static CloneableEditorSupport |
create(DataObject obj,
MultiDataObject.Entry entry,
CookieSet set)
Factory method to create simple CloneableEditorSupport for a given entry of a given DataObject. |
protected StyledDocument |
createStyledDocument(EditorKit kit)
Let's the super method create the document and also annotates it with Title and StreamDescription properities. |
protected String |
documentID()
|
static DataObject |
findDataObject(Line l)
Support method that extracts a DataObject from a Line. |
DataObject |
getDataObject()
Getter of the data object that this support is associated with. |
protected void |
initializeCloneableEditor(CloneableEditor editor)
Annotates the editor with icon from the data object and also sets appropriate selected node. |
protected String |
messageHtmlName()
|
protected String |
messageLine(Line line)
Computes display name for a line based on the name of the associated DataObject and the line number. |
protected String |
messageName()
Constructs message that should be used to name the editor component. |
protected String |
messageOpened()
Message to display when an object has been opened. |
protected String |
messageOpening()
Message to display when an object is being opened. |
protected String |
messageSave()
Constructs message that should be displayed when the data object is modified and is being closed. |
protected String |
messageToolTip()
Text to use as tooltip for component. |
protected void |
notifyClosed()
Called when closed all components. |
void |
saveDocument()
Saves document. |
Methods inherited from class org.openide.windows.CloneableOpenSupport |
close, edit, openCloneableTopComponent, view |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataEditorSupport(DataObject obj, CloneableEditorSupport.Env env)
obj
- object to work withenv
- environment to pass toMethod Detail |
public static CloneableEditorSupport create(DataObject obj, MultiDataObject.Entry entry, CookieSet set)
getCookieSet().add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), getCookieSet()));
obj
- the data objectentry
- the entry to read and write fromset
- cookie set to add remove additional cookies (currently only SaveCookie
)
OpenCookie
,
EditCookie
,
EditorCookie.Observable
,
PrintCookie
,
CloseCookie
public final DataObject getDataObject()
protected String messageOpening()
protected String messageOpened()
protected String messageSave()
protected String messageName()
protected String messageHtmlName()
protected String documentID()
protected String messageToolTip()
protected String messageLine(Line line)
line
- the line object to compute display name for
protected void initializeCloneableEditor(CloneableEditor editor)
editor
- the editor that has been created and should be annotatedprotected void notifyClosed()
protected StyledDocument createStyledDocument(EditorKit kit)
kit
- kit to user to create the document
protected boolean canClose()
public void saveDocument() throws IOException
IOException
public static DataObject findDataObject(Line l)
l
- line object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |