org.openide.filesystems
Class FileEvent
java.lang.Object
|
+--java.util.EventObject
|
+--org.openide.filesystems.FileEvent
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- FileAttributeEvent, FileRenameEvent
- public class FileEvent
- extends EventObject
Event for listening on file system changes.
By calling getFile()
the original file where the action occurred
can be obtained.
- See Also:
- Serialized Form
FileEvent
public FileEvent(FileObject src)
- Creates new
FileEvent
. The FileObject
where the action occurred
is assumed to be the same as the source object.
- Parameters:
src
- source file which sent this event
FileEvent
public FileEvent(FileObject src,
FileObject file)
- Creates new
FileEvent
, specifying the action object.
Note that the two arguments of this method need not be identical
in cases where it is reasonable that a different file object from
the one affected would be listened to by other components. E.g.,
in the case of a file creation event, the event source (which
listeners are attached to) would be the containing folder, while
the action object would be the newly created file object.
- Parameters:
src
- source file which sent this eventfile
- FileObject
where the action occurred
FileEvent
public FileEvent(FileObject src,
FileObject file,
boolean expected)
- Creates new
FileEvent
, specifying the action object.
Note that the two arguments of this method need not be identical
in cases where it is reasonable that a different file object from
the one affected would be listened to by other components. E.g.,
in the case of a file creation event, the event source (which
listeners are attached to) would be the containing folder, while
the action object would be the newly created file object.
- Parameters:
src
- source file which sent this eventfile
- FileObject
where the action occurredexpected
- sets flag whether the value was expected
getFile
public final FileObject getFile()
- Returns:
- the original file where action occurred
getTime
public final long getTime()
- The time when this event has been created.
- Returns:
- the milliseconds
isExpected
public final boolean isExpected()
- Getter to test whether the change has been expected or not.
toString
public String toString()
- Overrides:
toString
in class EventObject
Built on February 22 2001. | Portions Copyright 1997-2000 Sun Microsystems, Inc. All rights reserved.