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

ExtensionList (NetBeans Loaders API) - NetBeans API Javadoc 5.0.0

 

org.openide.loaders
Class ExtensionList

java.lang.Object
  extended byorg.openide.loaders.ExtensionList
All Implemented Interfaces:
Cloneable, Serializable

public class ExtensionList
extends Object
implements Cloneable, Serializable

Property class that collects a modifiable list of file extensions and permits checking of whether a name or a file object has a given extension. It comes with a property editor to allow the user to modify the extensions.

See Also:
Serialized Form

Constructor Summary
ExtensionList()
          Default constructor.
 
Method Summary
 void addExtension(String ext)
          Add a new extension.
 void addMimeType(String mime)
          Adds new mime type.
 Object clone()
          Clone new object.
 boolean equals(Object o)
           
 Enumeration extensions()
          Get all extensions.
 int hashCode()
           
 boolean isRegistered(FileObject fo)
          Tests whether the file object is acceptable.
 boolean isRegistered(String s)
          Test whether the name in the string is acceptable.
 Enumeration mimeTypes()
          Get all mime types.
 void removeExtension(String ext)
          Remove an extension.
 void removeMimeType(String mime)
          Removes a mime type.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtensionList

public ExtensionList()
Default constructor.

Method Detail

clone

public Object clone()
Clone new object.


addExtension

public void addExtension(String ext)
Add a new extension.

Parameters:
ext - the extension

removeExtension

public void removeExtension(String ext)
Remove an extension.

Parameters:
ext - the extension

addMimeType

public void addMimeType(String mime)
Adds new mime type.

Parameters:
mime - the mime type

removeMimeType

public void removeMimeType(String mime)
Removes a mime type.

Parameters:
mime - the name of the type

isRegistered

public boolean isRegistered(String s)
Test whether the name in the string is acceptable. It should end with a dot and be one of the registered extenstions.

Parameters:
s - the name
Returns:
true if the name is acceptable

isRegistered

public boolean isRegistered(FileObject fo)
Tests whether the file object is acceptable. Its extension should be registered.

Parameters:
fo - the file object to test
Returns:
true if the file object is acceptable

extensions

public Enumeration extensions()
Get all extensions.

Returns:
enumeration of Strings

mimeTypes

public Enumeration mimeTypes()
Get all mime types.

Returns:
enumeration of Strings

toString

public String toString()

equals

public boolean equals(Object o)

hashCode

public int hashCode()

 

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