|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.mail.commands.AddAttachmentCommand
AddAttachmentCommand is a Command interface implementation that can be executed to add a File Attachment to a list of Attachments. It will show a FileDialog to choose an Attachment from and then create an Attachment with a FileDataSource for the selected file. The new Attachment is added to the attachmentList. If the file does not exist or a SecurityException is thrown, the errorHandler will be called.
Attachment, Serialized Form| Field Summary | |
protected OrderedCollectionInterface |
attachmentList
|
protected Component |
parentComponent
|
static String |
RB_KEY
|
protected String |
text
|
| Constructor Summary | |
AddAttachmentCommand(Component parent,
OrderedCollectionInterface list)
Constructor for AddAttachmentCommand. |
|
| Method Summary | |
Object |
clone()
Get a clone of the AddAttachmentCommand. |
void |
execute(Object arg)
Allow the user to chose a file to add as an Attachment to a list of Attachments. |
ErrorHandlerInterface |
getErrorHandler()
Get the errorHandler to be notified when an error occurs. |
String |
getText()
Get the text of the Command. |
boolean |
isExecutable()
Return true, this Command is executable. |
boolean |
isUndoable()
Return false, this Command is not undoable. |
void |
setErrorHandler(ErrorHandlerInterface errHandler)
Set the errorHandler to be notified when an error occurs. |
void |
setText(String txt)
Set the text of the Command. |
void |
undo()
This does nothing. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String RB_KEY
protected String text
protected OrderedCollectionInterface attachmentList
protected Component parentComponent
| Constructor Detail |
public AddAttachmentCommand(Component parent,
OrderedCollectionInterface list)
| Method Detail |
public Object clone()
throws CloneNotSupportedException
clone in interface Commandclone in class ObjectCloneNotSupportedException - thrown if the command doesn't support creating a clone of itselfpublic boolean isExecutable()
isExecutable in interface Commandpublic boolean isUndoable()
isUndoable in interface Commandpublic void undo()
undo in interface Commandcom.sas.util.CommandSimpleCommand.execute(Object)public void execute(Object arg)
execute in interface SimpleCommandarg - this parameter is not usedpublic ErrorHandlerInterface getErrorHandler()
getErrorHandler in interface SupportsErrorHandlerInterfacepublic void setErrorHandler(ErrorHandlerInterface errHandler)
setErrorHandler in interface SupportsErrorHandlerInterfaceerrHandler - the error handler to be notified when an error occurspublic String getText()
getText in interface StringDataInterfacepublic void setText(String txt)
setText in interface StringDataInterfacetxt - the new text
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||