Revision 39484 branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/ui/mdiFrame/ThreadSafeDialogs.java

View differences:

ThreadSafeDialogs.java
1 1
package org.gvsig.andami.ui.mdiFrame;
2 2

  
3 3
import java.awt.Component;
4
import java.io.File;
5
import javax.swing.filechooser.FileFilter;
4 6

  
5
import javax.swing.JComponent;
6

  
7 7
public interface ThreadSafeDialogs {
8 8
	
9 9
	/**
......
130 130
	 */
131 131
	public Component createComponentWithParams(final Class<? extends Component> theClass,  final Object[] parameters);
132 132
	
133
	/**
134
	 * Creates and show a JFileChooser dialog.
135
	 * 
136
	 * This method return an array whit the selected files. If multiselection is
137
	 * not allowed, an array with one element is returned. 
138
	 * 
139
	 * If the user select the cancel button, null is returned.
140
	 * 
141
	 * if this method is invoked out of the event dispatch thread of swing, 
142
	 * the dialog is presented in the thread of swing and the calling thread
143
	 * wait to close to continue.
144
	 * 
145
	 * @param title, title of dialog
146
	 * @param type of the dialog, JFileChooser.SAVE_DIALOG or JFileChooser.OPEN_DIALOG
147
	 * @param selectionMode of the dialog, values are: JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY, JFileChooser.FILES_AND_DIRECTORIES
148
	 * @param multiselection, true if multiselection is allowed
149
	 * @param inihelpertialPath, to show in the dialog
150
	 * @param filter used to filter the files show in the dialog.
151
	 * @param fileHidingEnabled, if true hidden files are show
152
	 * @return an array whit the files selecteds or null.
153
	 */
154
	public File[] showChooserDialog(
155
			final String title,
156
			final int type,
157
			final int selectionMode,
158
			final boolean multiselection, 
159
			final File inihelpertialPath,
160
			final FileFilter filter,
161
			final boolean fileHidingEnabled
162
			) ;
133 163

  
164
	/**
165
	 * Creates and show a JFileChooser dialog for folder selection.
166
	 *
167
	 * This is an utility method that wrap a showChooserDialog call.
168
	 *  
169
 	 * @param title, title of dialog
170
	 * @param initialPath, to show in the dialog
171
	 * @return an array whit the files selecteds or null.
172
	 * 
173
	 * @see #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
174
	 */
175
	public File[] showOpenDirectoryDialog(String title, File initialPath) ;
176
	
177
	/**
178
	 * Creates and show a JFileChooser dialog for selection a file for open.
179
	 *
180
	 * This is an utility method that wrap a {@link #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)}  call.
181
	 *  
182
 	 * @param title, title of dialog
183
	 * @param initialPath, to show in the dialog
184
	 * @return an array whit the files selecteds or null.
185
	 * 
186
	 * @see #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
187
	 */
188
	public File[] showOpenFileDialog(String title, File initialPath) ;
189
	
190
	/**
191
	 * Creates and show a JFileChooser dialog for selection a file for save.
192
	 *
193
	 * This is an utility method that wrap a {@link #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)}  call.
194
	 *  
195
 	 * @param title, title of dialog
196
	 * @param initialPath, to show in the dialog
197
	 * @return an array whit the files selecteds or null.
198
	 * 
199
	 * @see #showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
200
	 */
201
	public File[] showSaveFileDialog(String title, File initialPath) ;
202
	
134 203
}

Also available in: Unified diff