站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

RevisionEditorSupport (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.versioning
Class RevisionEditorSupport

java.lang.Object
  extended byorg.openide.windows.CloneableOpenSupport
      extended byorg.openide.text.CloneableEditorSupport
          extended byorg.netbeans.modules.vcscore.versioning.RevisionEditorSupport
All Implemented Interfaces:
CloseCookie, EditorCookie, EditorCookie.Observable, LineCookie, Node.Cookie, OpenCookie, PrintCookie, ViewCookie

public class RevisionEditorSupport
extends CloneableEditorSupport
implements EditorCookie.Observable, OpenCookie, ViewCookie, PrintCookie, CloseCookie

Support for associating an editor and a Swing Document to a revision object. This is a modification of org.openide.text.DataEditorSupport


Nested Class Summary
static class RevisionEditorSupport.Env
          Environment that connects the data object and the CloneableEditorSupport.
 
Nested classes inherited from class org.openide.text.CloneableEditorSupport
CloneableEditorSupport.Pane
 
Nested classes inherited from class org.openide.cookies.EditorCookie
EditorCookie.Observable
 
Field Summary
 
Fields inherited from class org.openide.text.CloneableEditorSupport
EDITOR_MODE
 
Fields inherited from class org.openide.windows.CloneableOpenSupport
allEditors, env
 
Fields inherited from interface org.openide.cookies.EditorCookie.Observable
PROP_DOCUMENT, PROP_MODIFIED, PROP_OPENED_PANES
 
Constructor Summary
RevisionEditorSupport(RevisionList list, RevisionItem revisionItem)
          Editor support for a given data object.
 
Method Summary
protected  StyledDocument createStyledDocument(EditorKit kit)
          Let's the super method create the document and also annotates it with Title and StreamDescription properities.
 FileObject getFileObject()
          Getter of the file object that this support is associated with.
 String getRevision()
          Getter of the revision 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 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.
 
Methods inherited from class org.openide.text.CloneableEditorSupport
addChangeListener, addPropertyChangeListener, canClose, close, createCloneableEditor, createCloneableTopComponent, createEditorKit, createPane, createPositionRef, createUndoRedoManager, documentID, firePropertyChange, getDocument, getInputStream, getLineSet, getOpenedPanes, getUndoRedo, isDocumentLoaded, isModified, loadFromStreamToKit, messageLine, notifyClosed, notifyModified, notifyUnmodified, open, openAt, openDocument, prepareDocument, print, reloadDocument, removeChangeListener, removePropertyChangeListener, saveDocument, saveFromKitToStream, setMIMEType, updateTitles
 
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
 
Methods inherited from interface org.openide.cookies.EditorCookie.Observable
addPropertyChangeListener, removePropertyChangeListener
 
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
 
Methods inherited from interface org.openide.cookies.OpenCookie
open
 
Methods inherited from interface org.openide.cookies.ViewCookie
view
 
Methods inherited from interface org.openide.cookies.PrintCookie
print
 
Methods inherited from interface org.openide.cookies.CloseCookie
close
 

Constructor Detail

RevisionEditorSupport

public RevisionEditorSupport(RevisionList list,
                             RevisionItem revisionItem)
Editor support for a given data object. The file is taken from the data object and is updated if the object moves or renames itself.

Method Detail

getFileObject

public final FileObject getFileObject()
Getter of the file object that this support is associated with.

Returns:
file object passed in constructor

getRevision

public final String getRevision()
Getter of the revision that this support is associated with.

Returns:
revision passed in constructor

messageOpening

protected String messageOpening()
Message to display when an object is being opened.

Returns:
the message or null if nothing should be displayed

messageOpened

protected String messageOpened()
Message to display when an object has been opened.

Returns:
the message or null if nothing should be displayed

messageSave

protected String messageSave()
Constructs message that should be displayed when the data object is modified and is being closed.

Returns:
text to show to the user

messageName

protected String messageName()
Constructs message that should be used to name the editor component.

Returns:
name of the editor

messageToolTip

protected String messageToolTip()
Text to use as tooltip for component.

Returns:
text to show to the user

initializeCloneableEditor

protected void initializeCloneableEditor(CloneableEditor editor)
Annotates the editor with icon from the data object and also sets appropriate selected node. This implementation also listen to display name and icon chamges of the node and keeps editor top component up-to-date. If you override this method and not call super, please note that you will have to keep things synchronized yourself.

Parameters:
editor - the editor that has been created and should be annotated

createStyledDocument

protected StyledDocument createStyledDocument(EditorKit kit)
Let's the super method create the document and also annotates it with Title and StreamDescription properities.

Parameters:
kit - kit to user to create the document
Returns:
the document annotated by the properties

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.