001package org.vishia.gral.ifc; 002 003 004public interface GralFileDialog_ifc 005{ 006 /**Version, history and license. 007 * <ul> 008 * <li>2011-06-00 Hartmut created 009 * </ul> 010 * 011 * <b>Copyright/Copyleft</b>:<br> 012 * For this source the LGPL Lesser General Public License, 013 * published by the Free Software Foundation is valid. 014 * It means: 015 * <ol> 016 * <li> You can use this source without any restriction for any desired purpose. 017 * <li> You can redistribute copies of this source to everybody. 018 * <li> Every user of this source, also the user of redistribute copies 019 * with or without payment, must accept this license for further using. 020 * <li> But the LPGL is not appropriate for a whole software product, 021 * if this source is only a part of them. It means, the user 022 * must publish this part of source, 023 * but doesn't need to publish the whole source of the own product. 024 * <li> You can study and modify (improve) this source 025 * for own using or for redistribution, but you have to license the 026 * modified sources likewise under this LGPL Lesser General Public License. 027 * You mustn't delete this Copyright/Copyleft inscription in this source file. 028 * </ol> 029 * If you intent to use this source without publishing its usage, you can get 030 * a second license subscribing a special contract with the author. 031 * 032 * @author Hartmut Schorrig = hartmut.schorrig@vishia.de 033 */ 034 public static final int version = 20120303; 035 036 /**Creates a dialog to select directories, not files. It is used while creation of the FileDialog. */ 037 static final int directory = 1; 038 /**Assume selecting of more as one files or directories. It is used while creation of the FileDialog or while activating. */ 039 static final int multi = 2; 040 041 boolean open(String sTitle, int mode); 042 043 /**Shows the file dialog. 044 * @param sBaseDir Part of start path, which should not be leave in selection. May be null 045 * @param sLocalDir Part of start path which is shown as default. May be null. 046 * If both sBaseDir and sLocalDir are null, the dialog may start with the last saved base dir. 047 * @param sMask If not null, then mask for file selection. If null, all files will be shown. 048 * @param sTitle The title in the dialog's title. If null, then the title is unchanged. 049 * @return null if the selection was aborted. 050 */ 051 String show(String sBaseDir, String sLocalDir, String sMask, String sTitle); 052 053 String[] getMultiSelection(); 054 055 /**Returns the last selected local path and file. 056 * @return null if the last selection was aborted. 057 */ 058 String getSelection(); 059 060}