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

CompletionJavaDoc (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor.ext
Class CompletionJavaDoc

java.lang.Object
  extended by org.netbeans.editor.ext.CompletionJavaDoc
All Implemented Interfaces:
ActionListener, PropertyChangeListener, EventListener, SettingsChangeListener

public abstract class CompletionJavaDoc
extends Object
implements ActionListener, SettingsChangeListener, PropertyChangeListener

Support for javadoc in code completion. Contains also static utilities methods for preparing javadoc HTML content

Since:
03/2002

Nested Class Summary
static interface CompletionJavaDoc.JavaDocTagItem
           
 
Field Summary
protected  boolean addToHistory
           
static String BUNDLE_PREFIX
           
protected  Object currentContent
           
protected  ExtEditorUI extEditorUI
          Editor UI supporting this completion
static String LOADING
           
 
Constructor Summary
CompletionJavaDoc(ExtEditorUI extEditorUI)
          Creates a new instance of CompletionJavaDoc
 
Method Summary
 void actionPerformed(ActionEvent e)
          Invoked when an action occurs.
 void addToHistory(Object url)
           
protected  boolean alwaysDisplayPopup()
          If true, the javadoc popup will remain open during completion item change and "Searching..." dialog will be shown.
 boolean autoPopup()
          Returns whether javadoc window should be invoked automatically
 void backHistory()
           
 void cancelPerformingThread()
          Interrupts timer that is responsible for delayed popup of javadoc window
 void clearHistory()
           
protected  Object convertCompletionObject(Object obj)
           
 void forwardHistory()
           
protected  Comparator getContentComparator()
           
protected  Object getCurrentContent()
           
 JavaDocPane getJavaDocPane()
          Returns JavaDoc popup pane
 JavaDocView getJavaDocView()
          Returns JavaDoc View
protected  String getTagName(CompletionJavaDoc.JavaDocTagItem tag)
           
 void goToSource()
           
 boolean isExternalJavaDocMounted()
           
 boolean isVisible()
           
 void openInExternalBrowser()
           
 Object parseLink(String link, Object baseObj)
          Parses given link such as java.awt.Component#addHierarchyListener and returns parsed Object
 void propertyChange(PropertyChangeEvent evt)
           
 void setContent(Object content)
          Sets content of javadoc with postRequest setted to true
 void setContent(Object content, boolean postRequest)
          Sets content of javadoc
 void setContent(Object content, boolean postRequest, boolean addToHistory)
          Sets content of javadoc
 void setContent(String content)
          Immediately sets Content of javadoc withou popup delay
 void setJavaDocVisible(boolean visible)
          Sets javadoc popup window visibility
 void settingsChange(SettingsChangeEvent evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extEditorUI

protected ExtEditorUI extEditorUI
Editor UI supporting this completion


currentContent

protected Object currentContent

addToHistory

protected boolean addToHistory

BUNDLE_PREFIX

public static final String BUNDLE_PREFIX
See Also:
Constant Field Values

LOADING

public static final String LOADING
See Also:
Constant Field Values
Constructor Detail

CompletionJavaDoc

public CompletionJavaDoc(ExtEditorUI extEditorUI)
Creates a new instance of CompletionJavaDoc

Method Detail

convertCompletionObject

protected Object convertCompletionObject(Object obj)

alwaysDisplayPopup

protected boolean alwaysDisplayPopup()
If true, the javadoc popup will remain open during completion item change and "Searching..." dialog will be shown. If the javadoc item will not be found, the "Javadoc Not Found" message will be also shown If false, then only valid javadoc content will be shown


getContentComparator

protected Comparator getContentComparator()

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

getJavaDocPane

public JavaDocPane getJavaDocPane()
Returns JavaDoc popup pane


getJavaDocView

public JavaDocView getJavaDocView()
Returns JavaDoc View


setJavaDocVisible

public void setJavaDocVisible(boolean visible)
Sets javadoc popup window visibility


addToHistory

public void addToHistory(Object url)

backHistory

public void backHistory()

forwardHistory

public void forwardHistory()

clearHistory

public void clearHistory()

isVisible

public boolean isVisible()

cancelPerformingThread

public void cancelPerformingThread()
Interrupts timer that is responsible for delayed popup of javadoc window


getCurrentContent

protected Object getCurrentContent()

setContent

public void setContent(Object content,
                       boolean postRequest,
                       boolean addToHistory)
Sets content of javadoc

Parameters:
content - it is Object of the java member such as JCClass, JCMethod, JCField or JCConstructor
postRequest - if false, javadoc window is popuped without delay
addToHistory - if true, the content item will be added to history queue

setContent

public void setContent(Object content,
                       boolean postRequest)
Sets content of javadoc

Parameters:
content - it is Object of the java member such as JCClass, JCMethod, JCField or JCConstructor
postRequest - if false, javadoc window is popuped without delay

setContent

public void setContent(Object content)
Sets content of javadoc with postRequest setted to true

See Also:
setContent(java.lang.Object, boolean)

setContent

public void setContent(String content)
Immediately sets Content of javadoc withou popup delay

Parameters:
content - String representation of the displayed text. In the case of current implementation it is an HTML document Can be null in this case javaDoc popup will be hidden

actionPerformed

public void actionPerformed(ActionEvent e)
Invoked when an action occurs.

Specified by:
actionPerformed in interface ActionListener

autoPopup

public boolean autoPopup()
Returns whether javadoc window should be invoked automatically


settingsChange

public void settingsChange(SettingsChangeEvent evt)
Specified by:
settingsChange in interface SettingsChangeListener

parseLink

public Object parseLink(String link,
                        Object baseObj)
Parses given link such as java.awt.Component#addHierarchyListener and returns parsed Object

Returns:
Object of JCClass, JCMethod, JCConstructor or JCField

getTagName

protected String getTagName(CompletionJavaDoc.JavaDocTagItem tag)

goToSource

public void goToSource()

openInExternalBrowser

public void openInExternalBrowser()

isExternalJavaDocMounted

public boolean isExternalJavaDocMounted()

org.netbeans.modules.editor.lib/1 1.14.0 3

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