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

ServiceType (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide
Class ServiceType

java.lang.Object
  extended byorg.openide.ServiceType
All Implemented Interfaces:
HelpCtx.Provider, Serializable
Direct Known Subclasses:
IndentEngine

public abstract class ServiceType
extends Object
implements Serializable, HelpCtx.Provider

This class represents an abstract subclass for services (compilation, execution, debugging, etc.) that can be registered in the system.

See Also:
Serialized Form

Nested Class Summary
static class ServiceType.Handle
          Handle for a service type.
static class ServiceType.Registry
          Deprecated. Use lookup instead.
 
Field Summary
static String PROP_NAME
          Name of property for the name of the service type.
 
Constructor Summary
ServiceType()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add a property change listener.
protected  Object clone()
          Deprecated. Service instance files should instead be copied in order to clone them.
 ServiceType createClone()
          Deprecated. Service instance files should instead be copied in order to clone them.
protected  String displayName()
          Default human-presentable name of the service type.
protected  void firePropertyChange(String name, Object o, Object n)
          Fire information about change of a property in the service type.
abstract  HelpCtx getHelpCtx()
          Get context help for this service type.
 String getName()
          Get the name of the service type.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a property change listener.
 void setName(String name)
          Set the name of the service type.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_NAME

public static final String PROP_NAME
Name of property for the name of the service type.

See Also:
Constant Field Values
Constructor Detail

ServiceType

public ServiceType()
Method Detail

displayName

protected String displayName()
Default human-presentable name of the service type. In the default implementation, taken from the bean descriptor.

Returns:
initial value of the human-presentable name
See Also:
FeatureDescriptor.getDisplayName()

createClone

public final ServiceType createClone()
Deprecated. Service instance files should instead be copied in order to clone them.

Method that creates a cloned instance of this object. Subclasses are encouraged to implement the Cloneable interface, in such case the clone method is called as a result of calling this method. If the subclass does not implement Cloneable, it is serialized and deserialized, thus new instance created.

Returns:
new instance
Throws:
IllegalStateException - if something goes wrong, but should not happen

clone

protected Object clone()
                throws CloneNotSupportedException
Deprecated. Service instance files should instead be copied in order to clone them.

Correctly implements the clone operation on this object. In order to work really correctly, the subclass has to implement the Cloneable interface.

Returns:
a new cloned instance that does not have any listeners
Throws:
CloneNotSupportedException

setName

public void setName(String name)
Set the name of the service type. Usually it suffices to override displayName(), or just to provide a BeanDescriptor for the class.

Parameters:
name - the new human-presentable name

getName

public String getName()
Get the name of the service type. The default value is given by displayName().

Returns:
a human-presentable name for the service type

getHelpCtx

public abstract HelpCtx getHelpCtx()
Get context help for this service type.

Specified by:
getHelpCtx in interface HelpCtx.Provider
Returns:
context help

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener.

Parameters:
l - the listener to add

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener.

Parameters:
l - the listener to remove

firePropertyChange

protected final void firePropertyChange(String name,
                                        Object o,
                                        Object n)
Fire information about change of a property in the service type.

Parameters:
name - name of the property
o - old value
n - new value


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