FileSaverDialog
[fedora-idea.git] / platform-api / src / com / intellij / openapi / fileChooser / FileChooserFactory.java
blob25aa3754b20bb08da5457e66b518e131288b8d26
1 /*
2 * Copyright 2000-2007 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.openapi.fileChooser;
18 import com.intellij.openapi.Disposable;
19 import com.intellij.openapi.components.ServiceManager;
20 import com.intellij.openapi.project.Project;
22 import javax.swing.*;
23 import java.awt.*;
25 public abstract class FileChooserFactory {
26 public static FileChooserFactory getInstance() {
27 return ServiceManager.getService(FileChooserFactory.class);
30 public abstract FileChooserDialog createFileChooser(FileChooserDescriptor descriptor, Project project);
31 public abstract FileChooserDialog createFileChooser(FileChooserDescriptor descriptor, Component parent);
33 /**
34 * Creates Save File dialog
36 * @author Konstantin Bulenkov
37 * @param descriptor dialog descriptor
38 * @param project current project
39 * @return Sace File dialog
40 * @since 9.0
42 public abstract FileSaverDialog createSaveFileDialog(FileSaverDescriptor descriptor, Project project);
44 public abstract FileTextField createFileTextField(FileChooserDescriptor descriptor, boolean showHidden, Disposable parent);
45 public abstract FileTextField createFileTextField(FileChooserDescriptor descriptor, Disposable parent);
47 public abstract void installFileCompletion(JTextField field, FileChooserDescriptor descriptor, boolean showHidden, final Disposable parent);