|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openide.util.SharedClassObject
org.openide.loaders.DataLoader
org.openide.loaders.MultiFileLoader
org.openide.loaders.UniFileLoader
Support class for loader handling one file at a time. This is used for many file types, e.g. HTML, images, etc. File extensions recognized by the loader may be set.
| Nested Class Summary |
| Nested classes inherited from class org.openide.loaders.DataLoader |
DataLoader.RecognizedFiles |
| Field Summary | |
static String |
PROP_EXTENSIONS
name of property with extensions |
| Fields inherited from class org.openide.loaders.DataLoader |
PROP_ACTIONS, PROP_DISPLAY_NAME |
| Constructor Summary | |
protected |
UniFileLoader(Class representationClass)
Constructor. |
protected |
UniFileLoader(String representationClassName)
Constructor. |
| Method Summary | |
protected abstract MultiDataObject |
createMultiObject(FileObject primaryFile)
Creates the right data object for a given primary file. |
protected MultiDataObject.Entry |
createPrimaryEntry(MultiDataObject obj,
FileObject primaryFile)
Creates the right primary entry for a given primary file. |
protected MultiDataObject.Entry |
createSecondaryEntry(MultiDataObject obj,
FileObject secondaryFile)
Do not create a seconday entry. |
protected FileObject |
findPrimaryFile(FileObject fo)
Get the primary file. |
ExtensionList |
getExtensions()
Get the extension list for this data loader. |
void |
readExternal(ObjectInput oi)
Reads nothing from the stream. |
void |
setExtensions(ExtensionList ext)
Set the extension list for this data loader. |
void |
writeExternal(ObjectOutput oo)
Writes extensions to the stream. |
| Methods inherited from class org.openide.loaders.MultiFileLoader |
handleFindDataObject |
| Methods inherited from class org.openide.loaders.DataLoader |
actionsContext, clearSharedData, defaultActions, defaultDisplayName, findDataObject, getActions, getDisplayName, getLoader, getRepresentationClass, getRepresentationClassName, markFile, setActions, setDisplayName |
| Methods inherited from class org.openide.util.SharedClassObject |
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, initialize, putProperty, putProperty, removeNotify, removePropertyChangeListener, reset, writeReplace |
| Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String PROP_EXTENSIONS
| Constructor Detail |
protected UniFileLoader(Class representationClass)
representationClass - class that is produced by this loaderprotected UniFileLoader(String representationClassName)
representationClassName - the fully qualified name of the
representation class.| Method Detail |
protected FileObject findPrimaryFile(FileObject fo)
findPrimaryFile in class MultiFileLoaderfo - the file to find the primary file for
null if its extension is not recognizedprotected abstract MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException
MultiFileLoaderMultiFileLoader.findPrimaryFile(org.openide.filesystems.FileObject).
createMultiObject in class MultiFileLoaderprimaryFile - the primary file
DataObjectExistsException - if the primary file already has a data object
IOExceptionprotected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, FileObject primaryFile)
MultiFileLoader
createPrimaryEntry in class MultiFileLoaderobj - requesting objectprimaryFile - primary file recognized by this loader
protected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, FileObject secondaryFile)
createSecondaryEntry in class MultiFileLoaderobj - ignoredsecondaryFile - ignored
UnsupportedOperationException - because this loader supports only a primary file objectpublic void setExtensions(ExtensionList ext)
ext - new list of extensionspublic ExtensionList getExtensions()
public void writeExternal(ObjectOutput oo) throws IOException
writeExternal in interface ExternalizablewriteExternal in class DataLoaderoo - ignored
IOExceptionpublic void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DataLoaderoi - ignored
IOException
ClassNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||