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

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

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

org.netbeans.editor
Class Registry

java.lang.Object
  extended by org.netbeans.editor.Registry

Deprecated. Without any replacement.

public class Registry
extends Object

All the documents and components register here so that they become available to the processing that crosses different components and documents such as cross document position stack or word matching.


Constructor Summary
Registry()
          Deprecated.  
 
Method Summary
static void activate(BaseDocument doc)
          Deprecated. Put the document to the first position in the array of last accessed documents.
static void activate(JTextComponent c)
          Deprecated. Put the component to the first position in the array of last accessed components.
static void addChangeListener(ChangeListener l)
          Deprecated. Add weak listener to listen to change of activity of documents or components.
static int addComponent(JTextComponent c)
          Deprecated. Add component to registry.
static int addDocument(BaseDocument doc)
          Deprecated. Add document to registry.
static JTextComponent getComponent(int compID)
          Deprecated. Get component when its ID is known.
static Iterator getComponentIterator()
          Deprecated. Get the iterator over the active components.
static BaseDocument getDocument(int docID)
          Deprecated. Get document when its ID is known.
static Iterator getDocumentIterator()
          Deprecated. Get the iterator over the active documents.
static int getID(BaseDocument doc)
          Deprecated. Get document ID from the document.
static int getID(JTextComponent c)
          Deprecated. Get component ID from the component.
static JTextComponent getLeastActiveComponent()
          Deprecated.  
static BaseDocument getLeastActiveDocument()
          Deprecated.  
static JTextComponent getLessActiveComponent(int compID)
          Deprecated.  
static JTextComponent getLessActiveComponent(JTextComponent c)
          Deprecated.  
static BaseDocument getLessActiveDocument(BaseDocument doc)
          Deprecated.  
static BaseDocument getLessActiveDocument(int docID)
          Deprecated.  
static JTextComponent getMoreActiveComponent(int compID)
          Deprecated.  
static JTextComponent getMoreActiveComponent(JTextComponent c)
          Deprecated.  
static BaseDocument getMoreActiveDocument(BaseDocument doc)
          Deprecated.  
static BaseDocument getMoreActiveDocument(int docID)
          Deprecated.  
static JTextComponent getMostActiveComponent()
          Deprecated.  
static BaseDocument getMostActiveDocument()
          Deprecated.  
static String registryToString()
          Deprecated. Debug the registry into string.
static void removeChangeListener(ChangeListener l)
          Deprecated. Remove listener for changes in activity.
static int removeComponent(JTextComponent c)
          Deprecated. Remove component from registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registry

public Registry()
Deprecated. 
Method Detail

addChangeListener

public static void addChangeListener(ChangeListener l)
Deprecated. 
Add weak listener to listen to change of activity of documents or components. The caller must hold the listener object in some instance variable to prevent it from being garbage collected.

Parameters:
l - listener to add

removeChangeListener

public static void removeChangeListener(ChangeListener l)
Deprecated. 
Remove listener for changes in activity. It's optional to remove the listener. It would be done automatically if the object holding the listener would be garbage collected.

Parameters:
l - listener to remove

getID

public static int getID(BaseDocument doc)
Deprecated. 
Get document ID from the document.

Returns:
document id or -1 if document was not yet added to the registry by addDocument().

getID

public static int getID(JTextComponent c)
Deprecated. 
Get component ID from the component.

Returns:
component id or -1 if component was not yet added to the registry by addComponent().

getDocument

public static BaseDocument getDocument(int docID)
Deprecated. 
Get document when its ID is known. It's rather cheap operation.

Parameters:
docID - document ID. It can be retrieved from the document by getID(doc).
Returns:
document instance or null when document no longer exists

getComponent

public static JTextComponent getComponent(int compID)
Deprecated. 
Get component when its ID is known. It's rather cheap operation.

Parameters:
compID - component ID. It can be retrieved from the component by getID(c).
Returns:
component instance or null when document no longer exists

addDocument

public static int addDocument(BaseDocument doc)
Deprecated. 
Add document to registry. Doesn't search for repetitive adding.

Returns:
registry unique ID of the document

addComponent

public static int addComponent(JTextComponent c)
Deprecated. 
Add component to registry. If the component is already registered it returns the existing} ID. The document that is currently assigned to the component is _not_ registered automatically.

Returns:
ID of the component

removeComponent

public static int removeComponent(JTextComponent c)
Deprecated. 
Remove component from registry. It's usually done when the UI of the component is being deinstalled.

Returns:
ID that the component had in the registry. The possible new ID will be different from this one. -1 will be returned if the component was not yet added to the registry.

activate

public static void activate(JTextComponent c)
Deprecated. 
Put the component to the first position in the array of last accessed components. The activate of document is also called automatically.


activate

public static void activate(BaseDocument doc)
Deprecated. 
Put the document to the first position in the array of last accessed documents. The document must be registered otherwise nothing is done.

Parameters:
doc - document to be activated

getMostActiveDocument

public static BaseDocument getMostActiveDocument()
Deprecated. 

getLeastActiveDocument

public static BaseDocument getLeastActiveDocument()
Deprecated. 

getLessActiveDocument

public static BaseDocument getLessActiveDocument(BaseDocument doc)
Deprecated. 

getLessActiveDocument

public static BaseDocument getLessActiveDocument(int docID)
Deprecated. 

getMoreActiveDocument

public static BaseDocument getMoreActiveDocument(BaseDocument doc)
Deprecated. 

getMoreActiveDocument

public static BaseDocument getMoreActiveDocument(int docID)
Deprecated. 

getDocumentIterator

public static Iterator getDocumentIterator()
Deprecated. 
Get the iterator over the active documents. It starts with the most active document till the least active document. It's just the current snapshot so the iterator will not reflect future changes.


getMostActiveComponent

public static JTextComponent getMostActiveComponent()
Deprecated. 

getLeastActiveComponent

public static JTextComponent getLeastActiveComponent()
Deprecated. 

getLessActiveComponent

public static JTextComponent getLessActiveComponent(JTextComponent c)
Deprecated. 

getLessActiveComponent

public static JTextComponent getLessActiveComponent(int compID)
Deprecated. 

getMoreActiveComponent

public static JTextComponent getMoreActiveComponent(JTextComponent c)
Deprecated. 

getMoreActiveComponent

public static JTextComponent getMoreActiveComponent(int compID)
Deprecated. 

getComponentIterator

public static Iterator getComponentIterator()
Deprecated. 
Get the iterator over the active components. It starts with the most active component till the least active component.


registryToString

public static String registryToString()
Deprecated. 
Debug the registry into string.


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.