/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#import <sys/stat.h>
#import <Cocoa/Cocoa.h>
#import "CFileDialog.h"
#import "ThreadUtilities.h"
#import "java_awt_FileDialog.h"
#import "sun_lwawt_macosx_CFileDialog.h"
{
fDirectory = inPath;
[fDirectory retain];
}
return self;
}
-(void) disposer {
if (fFileDialog != NULL) {
fFileDialog = NULL;
}
}
-(void) dealloc {
fDirectory = nil;
[super dealloc];
}
//- (void)finalize { [super finalize]; }
- (void)safeSaveOrLoad {
if (fMode == java_awt_FileDialog_SAVE) {
} else {
}
if (fNavigateApps) {
}
if (fMode == java_awt_FileDialog_LOAD) {
}
if ([self userClickedOK]) {
if (fMode == java_awt_FileDialog_LOAD) {
} else {
}
}
}
}
static JNF_MEMBER_CACHE(jm_queryFF, jc_CFileDialog, "queryFilenameFilter", "(Ljava/lang/String;)Z");
BOOL returnValue = JNFCallBooleanMethod(env, fFileDialog, jm_queryFF, jString); // AWT_THREADING Safe (AWTRunLoopMode)
return returnValue;
}
// check if it's not a normal file
if (![isFile boolValue]) return YES; // always show directories and non-file entities (browsing servers/mounts, etc)
}
// if in directory-browsing mode, don't offer files
return NO;
}
// ask the file filter up in Java
return shouldEnableFile;
}
- (BOOL) userClickedOK {
return fPanelResult == NSOKButton;
}
}
@end
/*
* Class: sun_lwawt_macosx_CFileDialog
* Method: nativeRunFileDialog
*/
{
dialogTitle = @" ";
}
if ([dialogDelegate userClickedOK]) {
}];
}
return returnValue;
}