站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

SaveAsCapable (Datasystems API) - NetBeans API Javadoc (Current Development Version)

org.openide.loaders 6.4

org.openide.loaders
Interface SaveAsCapable


public interface SaveAsCapable

Save document under a different file name and/or extension. The default implementation is available in DataEditorSupport. So if your editor support inherits from DataEditorSupport you can implement "Save As" feature for your documents by adding the following lines into your DataObject's constructor:

        getCookieSet().assign( SaveAsCapable.class, new SaveAsCapable() {
            public void saveAs(FileObject folder, String fileName) throws IOException {
                getDataEditorSupport().saveAs( folder, fileName );
            }
        });

Since:
6.3

Method Summary
 void saveAs(FileObject folder, String name)
          Invoke the save operation.
 

Method Detail

saveAs

void saveAs(FileObject folder,
            String name)
            throws IOException
Invoke the save operation.

Parameters:
folder - Folder to save to.
name - New file name to save to.
Throws:
IOException - if the object could not be saved

org.openide.loaders 6.4

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.