Merge pull request #64 in ITERATE/cyberduck from feature/windows/9074 to master
[cyberduck.git] / source / ch / cyberduck / binding / application / NSSavePanel.java
blobc86e5f1ad7d2decfadf00e7592b68ddb9752d8f4
1 package ch.cyberduck.binding.application;
3 /*
4 * Copyright (c) 2002-2009 David Kocher. All rights reserved.
6 * http://cyberduck.ch/
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * Bug fixes, suggestions and comments should be sent to:
19 * dkocher@cyberduck.ch
22 import ch.cyberduck.binding.foundation.NSArray;
23 import ch.cyberduck.binding.foundation.NSURL;
25 import org.rococoa.ID;
26 import org.rococoa.ObjCClass;
27 import org.rococoa.cocoa.foundation.NSInteger;
29 /// <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:30</i>
30 public abstract class NSSavePanel extends NSPanel {
31 private static final _Class CLASS = org.rococoa.Rococoa.createClass("NSSavePanel", _Class.class);
33 public static NSSavePanel savePanel() {
34 return CLASS.savePanel();
37 public interface _Class extends ObjCClass {
38 /**
39 * Original signature : <code>NSSavePanel* savePanel()</code><br>
40 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:67</i>
42 NSSavePanel savePanel();
45 /**
46 * Original signature : <code>NSURL* URL()</code><br>
47 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:69</i>
49 public abstract NSURL URL();
51 /**
52 * Original signature : <code>NSString* filename()</code><br>
53 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:71</i>
55 public abstract String filename();
57 /**
58 * Original signature : <code>NSString* directory()</code><br>
59 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:73</i>
61 public abstract String directory();
63 /**
64 * Original signature : <code>void setDirectory(NSString*)</code><br>
65 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:74</i>
67 public abstract void setDirectory(String path);
69 /**
70 * A file specified in the save panel is saved with the designated filename and this file type as an extension. This method is equivalent to calling allowedFileTypes and returning the first element of the list of allowed types, or nil if there are none. It is preferred to use 'allowedFileTypes' over this method.<br>
71 * Original signature : <code>NSString* requiredFileType()</code><br>
72 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:78</i>
74 public abstract String requiredFileType();
76 /**
77 * Original signature : <code>void setRequiredFileType(NSString*)</code><br>
78 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:79</i>
80 public abstract void setRequiredFileType(String type);
82 /**
83 * An array NSStrings specifying the file types the user can save the file as. The fil type can be a common file extension, or a UTI. A nil value indicates that any file type can be used. If the array is not nil and the array contains no items, an exception will be raised. If the user specifies a type not in the array, and 'allowsOtherFileTypes' is YES, they will be presented with another dialog when prompted to save. The default value is 'nil'.<br>
84 * Original signature : <code>NSArray* allowedFileTypes()</code><br>
85 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:84</i>
87 public abstract NSArray allowedFileTypes();
89 /**
90 * Original signature : <code>void setAllowedFileTypes(NSArray*)</code><br>
91 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:85</i>
93 public abstract void setAllowedFileTypes(NSArray types);
95 /**
96 * Returns a BOOL value that indicates whether the receiver allows the user to save files with an extension that’s not in the list of 'allowedFileTypes'.<br>
97 * Original signature : <code>BOOL allowsOtherFileTypes()</code><br>
98 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:89</i>
100 public abstract boolean allowsOtherFileTypes();
103 * Original signature : <code>void setAllowsOtherFileTypes(BOOL)</code><br>
104 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:90</i>
106 public abstract void setAllowsOtherFileTypes(boolean flag);
109 * Original signature : <code>NSView* accessoryView()</code><br>
110 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:93</i>
112 public abstract NSView accessoryView();
115 * Original signature : <code>void setAccessoryView(NSView*)</code><br>
116 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:94</i>
118 public abstract void setAccessoryView(NSView view);
121 * Original signature : <code>BOOL isExpanded()</code><br>
122 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:101</i>
124 public abstract boolean isExpanded();
127 * Original signature : <code>BOOL canCreateDirectories()</code><br>
128 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:104</i>
130 public abstract boolean canCreateDirectories();
133 * Original signature : <code>void setCanCreateDirectories(BOOL)</code><br>
134 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:105</i>
136 public abstract void setCanCreateDirectories(boolean flag);
139 * Original signature : <code>BOOL canSelectHiddenExtension()</code><br>
140 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:109</i>
142 public abstract boolean canSelectHiddenExtension();
145 * Original signature : <code>void setCanSelectHiddenExtension(BOOL)</code><br>
146 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:111</i>
148 public abstract void setCanSelectHiddenExtension(boolean flag);
151 * Original signature : <code>BOOL isExtensionHidden()</code><br>
152 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:112</i>
154 public abstract boolean isExtensionHidden();
157 * Original signature : <code>void setExtensionHidden(BOOL)</code><br>
158 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:113</i>
160 public abstract void setExtensionHidden(boolean flag);
163 * Original signature : <code>BOOL treatsFilePackagesAsDirectories()</code><br>
164 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:115</i>
166 public abstract boolean treatsFilePackagesAsDirectories();
169 * Original signature : <code>void setTreatsFilePackagesAsDirectories(BOOL)</code><br>
170 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:116</i>
172 public abstract void setTreatsFilePackagesAsDirectories(boolean flag);
175 * Original signature : <code>NSString* prompt()</code><br>
176 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:118</i>
178 public abstract String prompt();
181 * Original signature : <code>void setPrompt(NSString*)</code><br>
182 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:119</i>
184 public abstract void setPrompt(String prompt);
187 * Original signature : <code>NSString* nameFieldLabel()</code><br>
188 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:125</i>
190 public abstract String nameFieldLabel();
193 * Original signature : <code>void setNameFieldLabel(NSString*)</code><br>
194 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:126</i>
196 public abstract void setNameFieldLabel(String label);
199 * Original signature : <code>NSString* message()</code><br>
200 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:130</i>
202 public abstract String message();
205 * Original signature : <code>void setMessage(NSString*)</code><br>
206 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:131</i>
208 public abstract void setMessage(String message);
211 * Original signature : <code>void validateVisibleColumns()</code><br>
212 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:134</i>
214 public abstract void validateVisibleColumns();
217 * A method that was deprecated in Mac OS 10.3. -[NSSavePanel selectText:] does nothing.<br>
218 * Original signature : <code>void selectText(id)</code><br>
219 * <i>native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:138</i>
221 public abstract void selectText(final ID sender);
224 * Original signature : <code>void ok(id)</code><br>
225 * <i>from NSSavePanelRuntime native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:145</i>
227 public abstract void ok(final ID sender);
230 * Original signature : <code>void cancel(id)</code><br>
231 * <i>from NSSavePanelRuntime native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:146</i>
233 public abstract void cancel(final ID sender);
236 * <i>from NSSavePanelRuntime native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:152</i><br>
237 * Conversion Error : /**<br>
238 * * didEndSelector should have the signature:<br>
239 * * - (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;<br>
240 * * The value passed as returnCode will be either NSCancelButton or NSOKButton.<br>
241 * * Original signature : <code>void beginSheetForDirectory(NSString*, NSString*, NSWindow*, id, null, void*)</code><br>
242 * * /<br>
243 * - (void)beginSheetForDirectory:(NSString*)path file:(NSString*)name modalForWindow:(NSWindow*)docWindow modalDelegate:(id)delegate didEndSelector:(null)didEndSelector contextInfo:(void*)contextInfo; (Argument didEndSelector cannot be converted)
245 public abstract void beginSheetForDirectory_file_modalForWindow_modalDelegate_didEndSelector_contextInfo(String path, String name, NSWindow docWindow, ID delegate, org.rococoa.Selector didEndSelector, ID contextInfo);
247 public void beginSheetForDirectory(String path, String name, NSWindow docWindow, ID delegate, org.rococoa.Selector didEndSelector, ID contextInfo) {
248 this.beginSheetForDirectory_file_modalForWindow_modalDelegate_didEndSelector_contextInfo(path, name, docWindow, delegate, didEndSelector, contextInfo);
252 * Original signature : <code>NSInteger runModalForDirectory(NSString*, NSString*)</code><br>
253 * <i>from NSSavePanelRuntime native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:154</i>
255 public abstract NSInteger runModalForDirectory_file(String path, String name);
257 public NSInteger runModal(String directory, String file) {
258 return this.runModalForDirectory_file(directory, file);
262 * Original signature : <code>NSInteger runModal()</code><br>
263 * <i>from NSSavePanelRuntime native declaration : /System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:155</i>
265 public abstract NSInteger runModal();