mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
System File Chooser: change @since 3.6 to @since 3.7
This commit is contained in:
@@ -235,7 +235,7 @@ public interface FlatSystemProperties
|
|||||||
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
|
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
|
||||||
* <strong>Default</strong> {@code true}
|
* <strong>Default</strong> {@code true}
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
String USE_SYSTEM_FILE_CHOOSER = "flatlaf.useSystemFileChooser";
|
String USE_SYSTEM_FILE_CHOOSER = "flatlaf.useSystemFileChooser";
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public class FlatNativeLinuxLibrary
|
|||||||
* This works because Java uses {@code dlopen(RTLD_LAZY)} to load JNI libraries,
|
* This works because Java uses {@code dlopen(RTLD_LAZY)} to load JNI libraries,
|
||||||
* which only resolves symbols as the code that references them is executed.
|
* which only resolves symbols as the code that references them is executed.
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public static boolean isGtk3Available() {
|
public static boolean isGtk3Available() {
|
||||||
if( isGtk3Available == null )
|
if( isGtk3Available == null )
|
||||||
@@ -155,7 +155,7 @@ public class FlatNativeLinuxLibrary
|
|||||||
/**
|
/**
|
||||||
* https://docs.gtk.org/gtk3/iface.FileChooser.html#properties
|
* https://docs.gtk.org/gtk3/iface.FileChooser.html#properties
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public static final int
|
public static final int
|
||||||
FC_select_folder = 1 << 0,
|
FC_select_folder = 1 << 0,
|
||||||
@@ -197,14 +197,14 @@ public class FlatNativeLinuxLibrary
|
|||||||
* @return file path(s) that the user selected; an empty array if canceled;
|
* @return file path(s) that the user selected; an empty array if canceled;
|
||||||
* or {@code null} on failures (no dialog shown)
|
* or {@code null} on failures (no dialog shown)
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public native static String[] showFileChooser( Window owner, boolean open,
|
public native static String[] showFileChooser( Window owner, boolean open,
|
||||||
String title, String okButtonLabel, String currentName, String currentFolder,
|
String title, String okButtonLabel, String currentName, String currentFolder,
|
||||||
int optionsSet, int optionsClear, FileChooserCallback callback,
|
int optionsSet, int optionsClear, FileChooserCallback callback,
|
||||||
int fileTypeIndex, String... fileTypes );
|
int fileTypeIndex, String... fileTypes );
|
||||||
|
|
||||||
/** @since 3.6 */
|
/** @since 3.7 */
|
||||||
public interface FileChooserCallback {
|
public interface FileChooserCallback {
|
||||||
boolean approve( String[] files, long hwndFileDialog );
|
boolean approve( String[] files, long hwndFileDialog );
|
||||||
}
|
}
|
||||||
@@ -229,7 +229,7 @@ public class FlatNativeLinuxLibrary
|
|||||||
* Use '__' for '_' character (e.g. "Choose__and__Quit").
|
* Use '__' for '_' character (e.g. "Choose__and__Quit").
|
||||||
* @return index of pressed button; or -1 for ESC key
|
* @return index of pressed button; or -1 for ESC key
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public native static int showMessageDialog( long hwndParent, int messageType,
|
public native static int showMessageDialog( long hwndParent, int messageType,
|
||||||
String primaryText, String secondaryText, int defaultButton, String... buttons );
|
String primaryText, String secondaryText, int defaultButton, String... buttons );
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public class FlatNativeMacLibrary
|
|||||||
/** @since 3.4 */ public native static boolean toggleWindowFullScreen( Window window );
|
/** @since 3.4 */ public native static boolean toggleWindowFullScreen( Window window );
|
||||||
|
|
||||||
|
|
||||||
/** @since 3.6 */
|
/** @since 3.7 */
|
||||||
public static final int
|
public static final int
|
||||||
// NSOpenPanel (extends NSSavePanel)
|
// NSOpenPanel (extends NSSavePanel)
|
||||||
FC_canChooseFiles = 1 << 0, // default
|
FC_canChooseFiles = 1 << 0, // default
|
||||||
@@ -120,7 +120,7 @@ public class FlatNativeMacLibrary
|
|||||||
* @return file path(s) that the user selected; an empty array if canceled;
|
* @return file path(s) that the user selected; an empty array if canceled;
|
||||||
* or {@code null} on failures (no dialog shown)
|
* or {@code null} on failures (no dialog shown)
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public native static String[] showFileChooser( Window owner, int dark, boolean open,
|
public native static String[] showFileChooser( Window owner, int dark, boolean open,
|
||||||
String title, String prompt, String message, String filterFieldLabel,
|
String title, String prompt, String message, String filterFieldLabel,
|
||||||
@@ -128,7 +128,7 @@ public class FlatNativeMacLibrary
|
|||||||
int optionsSet, int optionsClear, FileChooserCallback callback,
|
int optionsSet, int optionsClear, FileChooserCallback callback,
|
||||||
int fileTypeIndex, String... fileTypes );
|
int fileTypeIndex, String... fileTypes );
|
||||||
|
|
||||||
/** @since 3.6 */
|
/** @since 3.7 */
|
||||||
public interface FileChooserCallback {
|
public interface FileChooserCallback {
|
||||||
boolean approve( String[] files, long hwndFileDialog );
|
boolean approve( String[] files, long hwndFileDialog );
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@ public class FlatNativeMacLibrary
|
|||||||
* @param buttons texts of the buttons; if no buttons given the a default "OK" button is shown
|
* @param buttons texts of the buttons; if no buttons given the a default "OK" button is shown
|
||||||
* @return index of pressed button
|
* @return index of pressed button
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public native static int showMessageDialog( long hwndParent, int alertStyle,
|
public native static int showMessageDialog( long hwndParent, int alertStyle,
|
||||||
String messageText, String informativeText, int defaultButton, String... buttons );
|
String messageText, String informativeText, int defaultButton, String... buttons );
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class FlatNativeWindowsLibrary
|
|||||||
* FILEOPENDIALOGOPTIONS
|
* FILEOPENDIALOGOPTIONS
|
||||||
* see https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/ne-shobjidl_core-_fileopendialogoptions
|
* see https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/ne-shobjidl_core-_fileopendialogoptions
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public static final int
|
public static final int
|
||||||
FOS_OVERWRITEPROMPT = 0x2, // default for Save
|
FOS_OVERWRITEPROMPT = 0x2, // default for Save
|
||||||
@@ -229,7 +229,7 @@ public class FlatNativeWindowsLibrary
|
|||||||
* @return file path(s) that the user selected; an empty array if canceled;
|
* @return file path(s) that the user selected; an empty array if canceled;
|
||||||
* or {@code null} on failures (no dialog shown)
|
* or {@code null} on failures (no dialog shown)
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public native static String[] showFileChooser( Window owner, boolean open,
|
public native static String[] showFileChooser( Window owner, boolean open,
|
||||||
String title, String okButtonLabel, String fileNameLabel, String fileName,
|
String title, String okButtonLabel, String fileNameLabel, String fileName,
|
||||||
@@ -237,7 +237,7 @@ public class FlatNativeWindowsLibrary
|
|||||||
int optionsSet, int optionsClear, FileChooserCallback callback,
|
int optionsSet, int optionsClear, FileChooserCallback callback,
|
||||||
int fileTypeIndex, String... fileTypes );
|
int fileTypeIndex, String... fileTypes );
|
||||||
|
|
||||||
/** @since 3.6 */
|
/** @since 3.7 */
|
||||||
public interface FileChooserCallback {
|
public interface FileChooserCallback {
|
||||||
boolean approve( String[] files, long hwndFileDialog );
|
boolean approve( String[] files, long hwndFileDialog );
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ public class FlatNativeWindowsLibrary
|
|||||||
* Use '&&' for '&' character (e.g. "Choose && Quit").
|
* Use '&&' for '&' character (e.g. "Choose && Quit").
|
||||||
* @return index of pressed button; or -1 for ESC key
|
* @return index of pressed button; or -1 for ESC key
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public native static int showMessageDialog( long hwndParent, int messageType,
|
public native static int showMessageDialog( long hwndParent, int messageType,
|
||||||
String title, String text, int defaultButton, String... buttons );
|
String title, String text, int defaultButton, String... buttons );
|
||||||
@@ -277,7 +277,7 @@ public class FlatNativeWindowsLibrary
|
|||||||
* @param type see <a href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox#parameters">MessageBox parameter uType</a>
|
* @param type see <a href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox#parameters">MessageBox parameter uType</a>
|
||||||
* @return see <a href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox#return-value">MessageBox Return value</a>
|
* @return see <a href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox#return-value">MessageBox Return value</a>
|
||||||
*
|
*
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public native static int showMessageBox( long hwndParent, String text, String caption, int type );
|
public native static int showMessageBox( long hwndParent, String text, String caption, int type );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ import com.formdev.flatlaf.ui.FlatNativeWindowsLibrary;
|
|||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
public class SystemFileChooser
|
public class SystemFileChooser
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// declare external methods
|
// declare external methods
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// declare internal methods
|
// declare internal methods
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// declare external methods
|
// declare external methods
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
* @since 3.6
|
* @since 3.7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ID_BUTTON1 101
|
#define ID_BUTTON1 101
|
||||||
|
|||||||
Reference in New Issue
Block a user