public class RemoveFromDiskCommand extends RemoveFileCommand
RemoveFileCommand class implements the command to delete
the file(s) on disk that are associated with the selected element(s).| Constructor and Description |
|---|
RemoveFromDiskCommand()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected UpdateMessage |
createUpdateMessage()
Creates an
UpdateMessage whose ID is
UpdateMessage.CHILD_REMOVED and stores the
command ID as a user property. |
int |
doit()
Presents the user with the selected list of element files to delete
from disk using SelectFilesPanel.showDialog().
|
protected boolean |
isNeedConfirmClose()
Override default behavior to suppress the 'Save Files' dialog
when files are about to be removed from disk.
|
protected boolean |
remove(Node node,
Folder owner)
Removes
element from owner. |
void |
setSilently(boolean silently) |
buildFileNamesString, canRemove, canRemove, getAffectedNodes, remove, removeenableConfirmation, getContext, getData, getId, getName, getProgressHandle, getType, isGlobal, setContext, setData, setTaskInfo, undopublic void setSilently(boolean silently)
public int doit()
throws java.lang.Exception
doit in class RemoveFileCommandjava.lang.Exceptionprotected boolean remove(Node node, Folder owner)
RemoveFileCommandelement from owner.remove in class RemoveFileCommandfalse if the element could not be removed.protected UpdateMessage createUpdateMessage()
RemoveFileCommandUpdateMessage whose ID is
UpdateMessage.CHILD_REMOVED and stores the
command ID as a user property.createUpdateMessage in class RemoveFileCommandUpdateMessage whose ID is
UpdateMessage.CHILD_REMOVED.UpdateMessage.CHILD_REMOVEDprotected boolean isNeedConfirmClose()
isNeedConfirmClose in class RemoveFileCommandtrue if the user should be prompted to save
dirty nodes prior to removing them. This allows suppression of
the 'Save Files' dialog when the files are about to be removed
from disk altogether.