|
org.openide.loaders 5.9.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.util.Task org.openide.loaders.FolderInstance org.openide.loaders.FolderLookup
public class FolderLookup
Implements a lookup, that scans a content of a folder for its data objects and asks them for instance cookie, the created objects are then used to for the content of the lookup.
Any instances which are in fact instances of Lookup
will be proxied to, permitting one file to generate many instances
in the lookup system easily.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.openide.cookies.InstanceCookie |
---|
InstanceCookie.Of |
Field Summary |
---|
Fields inherited from class org.openide.loaders.FolderInstance |
---|
folder |
Fields inherited from class org.openide.util.Task |
---|
EMPTY |
Constructor Summary | |
---|---|
FolderLookup(DataObject.Container df)
Constructs the FolderLookup for given container. |
|
FolderLookup(DataObject.Container df,
String prefix)
Constructs the FolderLookup for given container. |
Method Summary | |
---|---|
protected InstanceCookie |
acceptContainer(DataObject.Container df)
Container is recognized as underlying FolderLookup which passes
its items to parent FolderLookup . |
protected InstanceCookie |
acceptFolder(DataFolder df)
Folder is recognized as underlying FolderLookup which passes
its items to parent FolderLookup . |
protected Object |
createInstance(InstanceCookie[] cookies)
Updates the content of the lookup. |
Lookup |
getLookup()
Getter for the lookup that should be used. |
Class |
instanceClass()
The correct class that this folder recognizes. |
protected Object |
instanceForCookie(DataObject dobj,
InstanceCookie cookie)
Overrides superclass method. |
protected Task |
postCreationTask(Runnable run)
Starts the creation of the object in the Folder recognizer thread. |
Methods inherited from class org.openide.loaders.FolderInstance |
---|
acceptCookie, acceptDataObject, instanceCreate, instanceFinished, instanceName, recreate, run, toString, waitFinished |
Methods inherited from class org.openide.util.Task |
---|
addTaskListener, isFinished, notifyFinished, notifyRunning, removeTaskListener, waitFinished |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FolderLookup(DataObject.Container df)
df
- container (or folder) to work onpublic FolderLookup(DataObject.Container df, String prefix)
df
- container (or folder) to work onprefix
- the prefix to useMethod Detail |
---|
public final Class instanceClass()
instanceClass
in interface InstanceCookie
instanceClass
in class FolderInstance
public final Lookup getLookup()
Serializable since 3.27.
protected final Object createInstance(InstanceCookie[] cookies) throws IOException, ClassNotFoundException
createInstance
in class FolderInstance
cookies
- updated array of instance cookies for the folder
IOException
- an I/O error occured
ClassNotFoundException
- a class has not been foundprotected Object instanceForCookie(DataObject dobj, InstanceCookie cookie) throws IOException, ClassNotFoundException
DataObject
&InstanceCookie
'pair'.
If the instance is of FolderLookup.Lkp
class it is created otherwise
new Lkp.ICItem
created and returned.
instanceForCookie
in class FolderInstance
dobj
- the data object that is the source of the cookiecookie
- the instance cookie to read the instance from
IOException
- when there I/O error
ClassNotFoundException
- if the class cannot be foundprotected InstanceCookie acceptFolder(DataFolder df)
FolderLookup
which passes
its items to parent FolderLookup
.
acceptFolder
in class FolderInstance
df
- the folder found
protected InstanceCookie acceptContainer(DataObject.Container df)
FolderLookup
which passes
its items to parent FolderLookup
.
acceptContainer
in class FolderInstance
df
- the container found
protected final Task postCreationTask(Runnable run)
postCreationTask
in class FolderInstance
run
- runable to start
null
, because the runnable is started immediatelly
|
org.openide.loaders 5.9.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |