mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 06:20:53 +03:00
System File Chooser: macOS: disable screen menu bar when file dialog is shown
Testing: reduced duplicate code
This commit is contained in:
@@ -33,7 +33,7 @@ static NSArray* getDialogURLs( NSSavePanel* dialog );
|
|||||||
|
|
||||||
//---- class FileChooserDelegate ----------------------------------------------
|
//---- class FileChooserDelegate ----------------------------------------------
|
||||||
|
|
||||||
@interface FileChooserDelegate : NSObject <NSOpenSavePanelDelegate> {
|
@interface FileChooserDelegate : NSObject <NSOpenSavePanelDelegate, NSWindowDelegate> {
|
||||||
NSArray* _filters;
|
NSArray* _filters;
|
||||||
|
|
||||||
JavaVM* _jvm;
|
JavaVM* _jvm;
|
||||||
@@ -137,6 +137,9 @@ static NSArray* getDialogURLs( NSSavePanel* dialog );
|
|||||||
- (BOOL) panel: (id) sender validateURL:(NSURL*) url error:(NSError**) outError {
|
- (BOOL) panel: (id) sender validateURL:(NSURL*) url error:(NSError**) outError {
|
||||||
JNI_COCOA_TRY()
|
JNI_COCOA_TRY()
|
||||||
|
|
||||||
|
if( _callback == NULL )
|
||||||
|
return true;
|
||||||
|
|
||||||
NSArray* urls = getDialogURLs( sender );
|
NSArray* urls = getDialogURLs( sender );
|
||||||
|
|
||||||
// if multiple files are selected for opening, then the validateURL method
|
// if multiple files are selected for opening, then the validateURL method
|
||||||
@@ -174,6 +177,33 @@ static NSArray* getDialogURLs( NSSavePanel* dialog );
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---- NSWindowDelegate ----
|
||||||
|
|
||||||
|
- (void) windowDidBecomeMain:(NSNotification *) notification {
|
||||||
|
JNI_COCOA_TRY()
|
||||||
|
|
||||||
|
// Disable main menu bar because the file dialog is modal and it should be not possible
|
||||||
|
// to select any menu item. Otherwiese an action could show a Swing dialog, which would
|
||||||
|
// be shown under the file dialog.
|
||||||
|
//
|
||||||
|
// NOTE: It is not necessary to re-enable the main menu bar because Swing does this itself.
|
||||||
|
// When the file dialog is closed and a Swing window becomes active,
|
||||||
|
// macOS sends windowDidBecomeMain (and windowDidBecomeKey) message to AWTWindow,
|
||||||
|
// which invokes [self activateWindowMenuBar],
|
||||||
|
// which invokes [CMenuBar activate:menuBar modallyDisabled:isDisabled],
|
||||||
|
// which updates main menu bar.
|
||||||
|
NSMenu* mainMenu = [NSApp mainMenu];
|
||||||
|
int count = [mainMenu numberOfItems];
|
||||||
|
for( int i = 0; i < count; i++ ) {
|
||||||
|
NSMenuItem* menuItem = [mainMenu itemAtIndex:i];
|
||||||
|
NSMenu *subenu = [menuItem submenu];
|
||||||
|
if( [subenu isJavaMenu] )
|
||||||
|
[menuItem setEnabled:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
JNI_COCOA_CATCH()
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
//---- helper -----------------------------------------------------------------
|
//---- helper -----------------------------------------------------------------
|
||||||
@@ -260,6 +290,7 @@ JNIEXPORT jobjectArray JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_
|
|||||||
[FlatJNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
|
[FlatJNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
|
||||||
JNI_COCOA_TRY()
|
JNI_COCOA_TRY()
|
||||||
|
|
||||||
|
// create open/save panel
|
||||||
NSSavePanel* dialog = open ? [NSOpenPanel openPanel] : [NSSavePanel savePanel];
|
NSSavePanel* dialog = open ? [NSOpenPanel openPanel] : [NSSavePanel savePanel];
|
||||||
|
|
||||||
// set appearance
|
// set appearance
|
||||||
@@ -326,10 +357,11 @@ JNIEXPORT jobjectArray JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// initialize callback
|
// initialize callback
|
||||||
if( callback != NULL ) {
|
if( callback != NULL )
|
||||||
[delegate initCallback :jvm :callback];
|
[delegate initCallback :jvm :callback];
|
||||||
|
|
||||||
|
// set file dialog delegate
|
||||||
dialog.delegate = delegate;
|
dialog.delegate = delegate;
|
||||||
}
|
|
||||||
|
|
||||||
// show dialog
|
// show dialog
|
||||||
NSModalResponse response = [dialog runModal];
|
NSModalResponse response = [dialog runModal];
|
||||||
|
|||||||
@@ -17,21 +17,16 @@
|
|||||||
package com.formdev.flatlaf.testing;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import static com.formdev.flatlaf.ui.FlatNativeLinuxLibrary.*;
|
import static com.formdev.flatlaf.ui.FlatNativeLinuxLibrary.*;
|
||||||
import java.awt.Dialog;
|
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
import java.awt.SecondaryLoop;
|
import java.awt.SecondaryLoop;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.WindowAdapter;
|
|
||||||
import java.awt.event.WindowEvent;
|
|
||||||
import java.awt.event.WindowFocusListener;
|
|
||||||
import java.awt.event.WindowListener;
|
|
||||||
import java.awt.event.WindowStateListener;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import com.formdev.flatlaf.extras.components.*;
|
import com.formdev.flatlaf.extras.components.*;
|
||||||
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
|
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
|
||||||
|
import com.formdev.flatlaf.testing.FlatSystemFileChooserTest.DummyModalDialog;
|
||||||
import com.formdev.flatlaf.ui.FlatNativeLinuxLibrary;
|
import com.formdev.flatlaf.ui.FlatNativeLinuxLibrary;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
|
|
||||||
@@ -49,7 +44,7 @@ public class FlatSystemFileChooserLinuxTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
FlatTestFrame frame = FlatTestFrame.create( args, "FlatSystemFileChooserLinuxTest" );
|
FlatTestFrame frame = FlatTestFrame.create( args, "FlatSystemFileChooserLinuxTest" );
|
||||||
// addListeners( frame );
|
FlatSystemFileChooserTest.addListeners( frame );
|
||||||
frame.showFrame( FlatSystemFileChooserLinuxTest::new );
|
frame.showFrame( FlatSystemFileChooserLinuxTest::new );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
@@ -80,19 +75,9 @@ public class FlatSystemFileChooserLinuxTest
|
|||||||
Window frame = SwingUtilities.windowForComponent( this );
|
Window frame = SwingUtilities.windowForComponent( this );
|
||||||
if( ownerFrameRadioButton.isSelected() )
|
if( ownerFrameRadioButton.isSelected() )
|
||||||
openOrSave( open, direct, frame );
|
openOrSave( open, direct, frame );
|
||||||
else if( ownerDialogRadioButton.isSelected() ) {
|
else if( ownerDialogRadioButton.isSelected() )
|
||||||
JDialog dialog = new JDialog( frame, "Dummy Modal Dialog", Dialog.DEFAULT_MODALITY_TYPE );
|
new DummyModalDialog( frame, owner -> openOrSave( open, direct, owner ) ).setVisible( true );
|
||||||
dialog.setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
|
else
|
||||||
dialog.addWindowListener( new WindowAdapter() {
|
|
||||||
@Override
|
|
||||||
public void windowOpened( WindowEvent e ) {
|
|
||||||
openOrSave( open, direct, dialog );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
dialog.setSize( 1200, 1000 );
|
|
||||||
dialog.setLocationRelativeTo( this );
|
|
||||||
dialog.setVisible( true );
|
|
||||||
} else
|
|
||||||
openOrSave( open, direct, null );
|
openOrSave( open, direct, null );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,94 +159,38 @@ public class FlatSystemFileChooserLinuxTest
|
|||||||
optionsClear.set( optionsClear.get() | option );
|
optionsClear.set( optionsClear.get() | option );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addListeners( Window w ) {
|
|
||||||
w.addWindowListener( new WindowListener() {
|
|
||||||
@Override
|
|
||||||
public void windowOpened( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowIconified( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowDeiconified( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowDeactivated( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowClosing( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowClosed( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowActivated( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
w.addWindowStateListener( new WindowStateListener() {
|
|
||||||
@Override
|
|
||||||
public void windowStateChanged( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
w.addWindowFocusListener( new WindowFocusListener() {
|
|
||||||
@Override
|
|
||||||
public void windowLostFocus( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowGainedFocus( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
ownerLabel = new JLabel();
|
JLabel ownerLabel = new JLabel();
|
||||||
ownerFrameRadioButton = new JRadioButton();
|
ownerFrameRadioButton = new JRadioButton();
|
||||||
ownerDialogRadioButton = new JRadioButton();
|
ownerDialogRadioButton = new JRadioButton();
|
||||||
ownerNullRadioButton = new JRadioButton();
|
ownerNullRadioButton = new JRadioButton();
|
||||||
ownerSpacer = new JPanel(null);
|
JPanel ownerSpacer = new JPanel(null);
|
||||||
titleLabel = new JLabel();
|
JLabel titleLabel = new JLabel();
|
||||||
titleField = new JTextField();
|
titleField = new JTextField();
|
||||||
panel1 = new JPanel();
|
JPanel panel1 = new JPanel();
|
||||||
select_folderCheckBox = new FlatTriStateCheckBox();
|
select_folderCheckBox = new FlatTriStateCheckBox();
|
||||||
select_multipleCheckBox = new FlatTriStateCheckBox();
|
select_multipleCheckBox = new FlatTriStateCheckBox();
|
||||||
do_overwrite_confirmationCheckBox = new FlatTriStateCheckBox();
|
do_overwrite_confirmationCheckBox = new FlatTriStateCheckBox();
|
||||||
create_foldersCheckBox = new FlatTriStateCheckBox();
|
create_foldersCheckBox = new FlatTriStateCheckBox();
|
||||||
show_hiddenCheckBox = new FlatTriStateCheckBox();
|
show_hiddenCheckBox = new FlatTriStateCheckBox();
|
||||||
local_onlyCheckBox = new FlatTriStateCheckBox();
|
local_onlyCheckBox = new FlatTriStateCheckBox();
|
||||||
okButtonLabelLabel = new JLabel();
|
JLabel okButtonLabelLabel = new JLabel();
|
||||||
okButtonLabelField = new JTextField();
|
okButtonLabelField = new JTextField();
|
||||||
currentNameLabel = new JLabel();
|
JLabel currentNameLabel = new JLabel();
|
||||||
currentNameField = new JTextField();
|
currentNameField = new JTextField();
|
||||||
currentFolderLabel = new JLabel();
|
JLabel currentFolderLabel = new JLabel();
|
||||||
currentFolderField = new JTextField();
|
currentFolderField = new JTextField();
|
||||||
fileTypesLabel = new JLabel();
|
JLabel fileTypesLabel = new JLabel();
|
||||||
fileTypesField = new JComboBox<>();
|
fileTypesField = new JComboBox<>();
|
||||||
fileTypeIndexLabel = new JLabel();
|
JLabel fileTypeIndexLabel = new JLabel();
|
||||||
fileTypeIndexSlider = new JSlider();
|
fileTypeIndexSlider = new JSlider();
|
||||||
openButton = new JButton();
|
JButton openButton = new JButton();
|
||||||
saveButton = new JButton();
|
JButton saveButton = new JButton();
|
||||||
openDirectButton = new JButton();
|
JButton openDirectButton = new JButton();
|
||||||
saveDirectButton = new JButton();
|
JButton saveDirectButton = new JButton();
|
||||||
showMessageDialogOnOKCheckBox = new JCheckBox();
|
showMessageDialogOnOKCheckBox = new JCheckBox();
|
||||||
filesScrollPane = new JScrollPane();
|
JScrollPane filesScrollPane = new JScrollPane();
|
||||||
filesField = new JTextArea();
|
filesField = new JTextArea();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
@@ -432,36 +361,22 @@ public class FlatSystemFileChooserLinuxTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
private JLabel ownerLabel;
|
|
||||||
private JRadioButton ownerFrameRadioButton;
|
private JRadioButton ownerFrameRadioButton;
|
||||||
private JRadioButton ownerDialogRadioButton;
|
private JRadioButton ownerDialogRadioButton;
|
||||||
private JRadioButton ownerNullRadioButton;
|
private JRadioButton ownerNullRadioButton;
|
||||||
private JPanel ownerSpacer;
|
|
||||||
private JLabel titleLabel;
|
|
||||||
private JTextField titleField;
|
private JTextField titleField;
|
||||||
private JPanel panel1;
|
|
||||||
private FlatTriStateCheckBox select_folderCheckBox;
|
private FlatTriStateCheckBox select_folderCheckBox;
|
||||||
private FlatTriStateCheckBox select_multipleCheckBox;
|
private FlatTriStateCheckBox select_multipleCheckBox;
|
||||||
private FlatTriStateCheckBox do_overwrite_confirmationCheckBox;
|
private FlatTriStateCheckBox do_overwrite_confirmationCheckBox;
|
||||||
private FlatTriStateCheckBox create_foldersCheckBox;
|
private FlatTriStateCheckBox create_foldersCheckBox;
|
||||||
private FlatTriStateCheckBox show_hiddenCheckBox;
|
private FlatTriStateCheckBox show_hiddenCheckBox;
|
||||||
private FlatTriStateCheckBox local_onlyCheckBox;
|
private FlatTriStateCheckBox local_onlyCheckBox;
|
||||||
private JLabel okButtonLabelLabel;
|
|
||||||
private JTextField okButtonLabelField;
|
private JTextField okButtonLabelField;
|
||||||
private JLabel currentNameLabel;
|
|
||||||
private JTextField currentNameField;
|
private JTextField currentNameField;
|
||||||
private JLabel currentFolderLabel;
|
|
||||||
private JTextField currentFolderField;
|
private JTextField currentFolderField;
|
||||||
private JLabel fileTypesLabel;
|
|
||||||
private JComboBox<String> fileTypesField;
|
private JComboBox<String> fileTypesField;
|
||||||
private JLabel fileTypeIndexLabel;
|
|
||||||
private JSlider fileTypeIndexSlider;
|
private JSlider fileTypeIndexSlider;
|
||||||
private JButton openButton;
|
|
||||||
private JButton saveButton;
|
|
||||||
private JButton openDirectButton;
|
|
||||||
private JButton saveDirectButton;
|
|
||||||
private JCheckBox showMessageDialogOnOKCheckBox;
|
private JCheckBox showMessageDialogOnOKCheckBox;
|
||||||
private JScrollPane filesScrollPane;
|
|
||||||
private JTextArea filesField;
|
private JTextArea filesField;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ JFDML JFormDesigner: "8.2.2.0.9999" Java: "21.0.1" encoding: "UTF-8"
|
|||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
root: new FormRoot {
|
root: new FormRoot {
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
|
}
|
||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[left][grow,fill][fill]"
|
"$columnConstraints": "[left][grow,fill][fill]"
|
||||||
@@ -20,6 +23,9 @@ new FormModel {
|
|||||||
"text": "JFrame"
|
"text": "JFrame"
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
"selected": true
|
"selected": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -27,6 +33,9 @@ new FormModel {
|
|||||||
name: "ownerDialogRadioButton"
|
name: "ownerDialogRadioButton"
|
||||||
"text": "JDialog"
|
"text": "JDialog"
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -34,6 +43,9 @@ new FormModel {
|
|||||||
name: "ownerNullRadioButton"
|
name: "ownerNullRadioButton"
|
||||||
"text": "null"
|
"text": "null"
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -50,6 +62,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "titleField"
|
name: "titleField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 1"
|
"value": "cell 1 1"
|
||||||
} )
|
} )
|
||||||
@@ -64,6 +79,9 @@ new FormModel {
|
|||||||
"text": "select_folder"
|
"text": "select_folder"
|
||||||
"allowIndeterminate": false
|
"allowIndeterminate": false
|
||||||
"state": enum com.formdev.flatlaf.extras.components.FlatTriStateCheckBox$State UNSELECTED
|
"state": enum com.formdev.flatlaf.extras.components.FlatTriStateCheckBox$State UNSELECTED
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 0"
|
"value": "cell 0 0"
|
||||||
} )
|
} )
|
||||||
@@ -72,30 +90,45 @@ new FormModel {
|
|||||||
"text": "select_multiple"
|
"text": "select_multiple"
|
||||||
"state": enum com.formdev.flatlaf.extras.components.FlatTriStateCheckBox$State UNSELECTED
|
"state": enum com.formdev.flatlaf.extras.components.FlatTriStateCheckBox$State UNSELECTED
|
||||||
"allowIndeterminate": false
|
"allowIndeterminate": false
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 1"
|
"value": "cell 0 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "do_overwrite_confirmationCheckBox"
|
name: "do_overwrite_confirmationCheckBox"
|
||||||
"text": "do_overwrite_confirmation"
|
"text": "do_overwrite_confirmation"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 2"
|
"value": "cell 0 2"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "create_foldersCheckBox"
|
name: "create_foldersCheckBox"
|
||||||
"text": "create_folders"
|
"text": "create_folders"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 3"
|
"value": "cell 0 3"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "show_hiddenCheckBox"
|
name: "show_hiddenCheckBox"
|
||||||
"text": "show_hidden"
|
"text": "show_hidden"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 4"
|
"value": "cell 0 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "local_onlyCheckBox"
|
name: "local_onlyCheckBox"
|
||||||
"text": "local_only"
|
"text": "local_only"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 5"
|
"value": "cell 0 5"
|
||||||
} )
|
} )
|
||||||
@@ -110,6 +143,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "okButtonLabelField"
|
name: "okButtonLabelField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 2"
|
"value": "cell 1 2"
|
||||||
} )
|
} )
|
||||||
@@ -121,6 +157,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "currentNameField"
|
name: "currentNameField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 3"
|
"value": "cell 1 3"
|
||||||
} )
|
} )
|
||||||
@@ -132,6 +171,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "currentFolderField"
|
name: "currentFolderField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 4"
|
"value": "cell 1 4"
|
||||||
} )
|
} )
|
||||||
@@ -151,6 +193,9 @@ new FormModel {
|
|||||||
addElement( "Text Files,*.txt,null,PDF Files,*.pdf,null,All Files,*,null" )
|
addElement( "Text Files,*.txt,null,PDF Files,*.pdf,null,All Files,*,null" )
|
||||||
addElement( "Text and PDF Files,*.txt,*.pdf,null" )
|
addElement( "Text and PDF Files,*.txt,*.pdf,null" )
|
||||||
}
|
}
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 5"
|
"value": "cell 1 5"
|
||||||
} )
|
} )
|
||||||
@@ -167,6 +212,9 @@ new FormModel {
|
|||||||
"value": 0
|
"value": 0
|
||||||
"paintLabels": true
|
"paintLabels": true
|
||||||
"snapToTicks": true
|
"snapToTicks": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 6"
|
"value": "cell 1 6"
|
||||||
} )
|
} )
|
||||||
@@ -201,6 +249,9 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "showMessageDialogOnOKCheckBox"
|
name: "showMessageDialogOnOKCheckBox"
|
||||||
"text": "show message dialog on OK"
|
"text": "show message dialog on OK"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 7 3 1"
|
"value": "cell 0 7 3 1"
|
||||||
} )
|
} )
|
||||||
@@ -209,6 +260,9 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JTextArea" ) {
|
add( new FormComponent( "javax.swing.JTextArea" ) {
|
||||||
name: "filesField"
|
name: "filesField"
|
||||||
"rows": 8
|
"rows": 8
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 8 3 1,growx"
|
"value": "cell 0 8 3 1,growx"
|
||||||
|
|||||||
@@ -17,20 +17,16 @@
|
|||||||
package com.formdev.flatlaf.testing;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import static com.formdev.flatlaf.ui.FlatNativeMacLibrary.*;
|
import static com.formdev.flatlaf.ui.FlatNativeMacLibrary.*;
|
||||||
import java.awt.EventQueue;
|
|
||||||
import java.awt.SecondaryLoop;
|
import java.awt.SecondaryLoop;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.WindowEvent;
|
|
||||||
import java.awt.event.WindowFocusListener;
|
|
||||||
import java.awt.event.WindowListener;
|
|
||||||
import java.awt.event.WindowStateListener;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import com.formdev.flatlaf.FlatLaf;
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
import com.formdev.flatlaf.extras.components.*;
|
import com.formdev.flatlaf.extras.components.*;
|
||||||
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
|
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
|
||||||
|
import com.formdev.flatlaf.testing.FlatSystemFileChooserTest.DummyModalDialog;
|
||||||
import com.formdev.flatlaf.ui.FlatNativeMacLibrary;
|
import com.formdev.flatlaf.ui.FlatNativeMacLibrary;
|
||||||
import com.formdev.flatlaf.util.SystemInfo;
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
@@ -44,6 +40,10 @@ public class FlatSystemFileChooserMacTest
|
|||||||
public static void main( String[] args ) {
|
public static void main( String[] args ) {
|
||||||
// macOS (see https://www.formdev.com/flatlaf/macos/)
|
// macOS (see https://www.formdev.com/flatlaf/macos/)
|
||||||
if( SystemInfo.isMacOS ) {
|
if( SystemInfo.isMacOS ) {
|
||||||
|
// enable screen menu bar
|
||||||
|
// (moves menu bar from JFrame window to top of screen)
|
||||||
|
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
|
||||||
|
|
||||||
// appearance of window title bars
|
// appearance of window title bars
|
||||||
// possible values:
|
// possible values:
|
||||||
// - "system": use current macOS appearance (light or dark)
|
// - "system": use current macOS appearance (light or dark)
|
||||||
@@ -60,8 +60,9 @@ public class FlatSystemFileChooserMacTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
FlatTestFrame frame = FlatTestFrame.create( args, "FlatSystemFileChooserMacTest" );
|
FlatTestFrame frame = FlatTestFrame.create( args, "FlatSystemFileChooserMacTest" );
|
||||||
// addListeners( frame );
|
FlatSystemFileChooserTest.addListeners( frame );
|
||||||
frame.showFrame( FlatSystemFileChooserMacTest::new );
|
frame.showFrame( FlatSystemFileChooserMacTest::new );
|
||||||
|
frame.setJMenuBar( menuBar1 );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +89,16 @@ public class FlatSystemFileChooserMacTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void openOrSave( boolean open, boolean direct ) {
|
private void openOrSave( boolean open, boolean direct ) {
|
||||||
Window owner = SwingUtilities.windowForComponent( this );
|
Window frame = SwingUtilities.windowForComponent( this );
|
||||||
|
if( ownerFrameRadioButton.isSelected() )
|
||||||
|
openOrSave( open, direct, frame );
|
||||||
|
else if( ownerDialogRadioButton.isSelected() )
|
||||||
|
new DummyModalDialog( frame, owner -> openOrSave( open, direct, owner ) ).setVisible( true );
|
||||||
|
else
|
||||||
|
openOrSave( open, direct, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openOrSave( boolean open, boolean direct, Window owner ) {
|
||||||
String title = n( titleField.getText() );
|
String title = n( titleField.getText() );
|
||||||
String prompt = n( promptField.getText() );
|
String prompt = n( promptField.getText() );
|
||||||
String message = n( messageField.getText() );
|
String message = n( messageField.getText() );
|
||||||
@@ -168,7 +178,7 @@ public class FlatSystemFileChooserMacTest
|
|||||||
|
|
||||||
System.out.println( " secondaryLoop.exit() returned " + secondaryLoop.exit() );
|
System.out.println( " secondaryLoop.exit() returned " + secondaryLoop.exit() );
|
||||||
|
|
||||||
EventQueue.invokeLater( () -> {
|
SwingUtilities.invokeLater( () -> {
|
||||||
filesField.setText( (files != null) ? Arrays.toString( files ).replace( ',', '\n' ) : "null" );
|
filesField.setText( (files != null) ? Arrays.toString( files ).replace( ',', '\n' ) : "null" );
|
||||||
} );
|
} );
|
||||||
} ).start();
|
} ).start();
|
||||||
@@ -189,75 +199,27 @@ public class FlatSystemFileChooserMacTest
|
|||||||
optionsClear.set( optionsClear.get() | option );
|
optionsClear.set( optionsClear.get() | option );
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings( "unused" )
|
private void menuItemAction() {
|
||||||
private static void addListeners( Window w ) {
|
System.out.println( "menu item action" );
|
||||||
w.addWindowListener( new WindowListener() {
|
|
||||||
@Override
|
|
||||||
public void windowOpened( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowIconified( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowDeiconified( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowDeactivated( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowClosing( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowClosed( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowActivated( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
w.addWindowStateListener( new WindowStateListener() {
|
|
||||||
@Override
|
|
||||||
public void windowStateChanged( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
w.addWindowFocusListener( new WindowFocusListener() {
|
|
||||||
@Override
|
|
||||||
public void windowLostFocus( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowGainedFocus( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
titleLabel = new JLabel();
|
JLabel ownerLabel = new JLabel();
|
||||||
|
ownerFrameRadioButton = new JRadioButton();
|
||||||
|
ownerDialogRadioButton = new JRadioButton();
|
||||||
|
ownerNullRadioButton = new JRadioButton();
|
||||||
|
JPanel ownerSpacer = new JPanel(null);
|
||||||
|
JLabel titleLabel = new JLabel();
|
||||||
titleField = new JTextField();
|
titleField = new JTextField();
|
||||||
panel1 = new JPanel();
|
JPanel panel1 = new JPanel();
|
||||||
options1Label = new JLabel();
|
JLabel options1Label = new JLabel();
|
||||||
canChooseFilesCheckBox = new JCheckBox();
|
canChooseFilesCheckBox = new JCheckBox();
|
||||||
canChooseDirectoriesCheckBox = new JCheckBox();
|
canChooseDirectoriesCheckBox = new JCheckBox();
|
||||||
resolvesAliasesCheckBox = new FlatTriStateCheckBox();
|
resolvesAliasesCheckBox = new FlatTriStateCheckBox();
|
||||||
allowsMultipleSelectionCheckBox = new FlatTriStateCheckBox();
|
allowsMultipleSelectionCheckBox = new FlatTriStateCheckBox();
|
||||||
accessoryViewDisclosedCheckBox = new JCheckBox();
|
accessoryViewDisclosedCheckBox = new JCheckBox();
|
||||||
options2Label = new JLabel();
|
JLabel options2Label = new JLabel();
|
||||||
showsTagFieldCheckBox = new FlatTriStateCheckBox();
|
showsTagFieldCheckBox = new FlatTriStateCheckBox();
|
||||||
canCreateDirectoriesCheckBox = new FlatTriStateCheckBox();
|
canCreateDirectoriesCheckBox = new FlatTriStateCheckBox();
|
||||||
canSelectHiddenExtensionCheckBox = new FlatTriStateCheckBox();
|
canSelectHiddenExtensionCheckBox = new FlatTriStateCheckBox();
|
||||||
@@ -265,31 +227,38 @@ public class FlatSystemFileChooserMacTest
|
|||||||
extensionHiddenCheckBox = new FlatTriStateCheckBox();
|
extensionHiddenCheckBox = new FlatTriStateCheckBox();
|
||||||
allowsOtherFileTypesCheckBox = new FlatTriStateCheckBox();
|
allowsOtherFileTypesCheckBox = new FlatTriStateCheckBox();
|
||||||
treatsFilePackagesAsDirectoriesCheckBox = new FlatTriStateCheckBox();
|
treatsFilePackagesAsDirectoriesCheckBox = new FlatTriStateCheckBox();
|
||||||
options3Label = new JLabel();
|
JLabel options3Label = new JLabel();
|
||||||
showSingleFilterFieldCheckBox = new JCheckBox();
|
showSingleFilterFieldCheckBox = new JCheckBox();
|
||||||
promptLabel = new JLabel();
|
JLabel promptLabel = new JLabel();
|
||||||
promptField = new JTextField();
|
promptField = new JTextField();
|
||||||
messageLabel = new JLabel();
|
JLabel messageLabel = new JLabel();
|
||||||
messageField = new JTextField();
|
messageField = new JTextField();
|
||||||
filterFieldLabelLabel = new JLabel();
|
JLabel filterFieldLabelLabel = new JLabel();
|
||||||
filterFieldLabelField = new JTextField();
|
filterFieldLabelField = new JTextField();
|
||||||
nameFieldLabelLabel = new JLabel();
|
JLabel nameFieldLabelLabel = new JLabel();
|
||||||
nameFieldLabelField = new JTextField();
|
nameFieldLabelField = new JTextField();
|
||||||
nameFieldStringValueLabel = new JLabel();
|
JLabel nameFieldStringValueLabel = new JLabel();
|
||||||
nameFieldStringValueField = new JTextField();
|
nameFieldStringValueField = new JTextField();
|
||||||
directoryURLLabel = new JLabel();
|
JLabel directoryURLLabel = new JLabel();
|
||||||
directoryURLField = new JTextField();
|
directoryURLField = new JTextField();
|
||||||
fileTypesLabel = new JLabel();
|
JLabel fileTypesLabel = new JLabel();
|
||||||
fileTypesField = new JComboBox<>();
|
fileTypesField = new JComboBox<>();
|
||||||
fileTypeIndexLabel = new JLabel();
|
JLabel fileTypeIndexLabel = new JLabel();
|
||||||
fileTypeIndexSlider = new JSlider();
|
fileTypeIndexSlider = new JSlider();
|
||||||
openButton = new JButton();
|
JButton openButton = new JButton();
|
||||||
saveButton = new JButton();
|
JButton saveButton = new JButton();
|
||||||
openDirectButton = new JButton();
|
JButton openDirectButton = new JButton();
|
||||||
saveDirectButton = new JButton();
|
JButton saveDirectButton = new JButton();
|
||||||
showMessageDialogOnOKCheckBox = new JCheckBox();
|
showMessageDialogOnOKCheckBox = new JCheckBox();
|
||||||
filesScrollPane = new JScrollPane();
|
JScrollPane filesScrollPane = new JScrollPane();
|
||||||
filesField = new JTextArea();
|
filesField = new JTextArea();
|
||||||
|
menuBar1 = new JMenuBar();
|
||||||
|
JMenu menu1 = new JMenu();
|
||||||
|
JMenuItem menuItem1 = new JMenuItem();
|
||||||
|
JMenuItem menuItem2 = new JMenuItem();
|
||||||
|
JMenu menu2 = new JMenu();
|
||||||
|
JMenuItem menuItem3 = new JMenuItem();
|
||||||
|
JMenuItem menuItem4 = new JMenuItem();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setLayout(new MigLayout(
|
setLayout(new MigLayout(
|
||||||
@@ -310,12 +279,31 @@ public class FlatSystemFileChooserMacTest
|
|||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
|
"[]" +
|
||||||
"[grow,fill]"));
|
"[grow,fill]"));
|
||||||
|
|
||||||
|
//---- ownerLabel ----
|
||||||
|
ownerLabel.setText("owner");
|
||||||
|
add(ownerLabel, "cell 0 0");
|
||||||
|
|
||||||
|
//---- ownerFrameRadioButton ----
|
||||||
|
ownerFrameRadioButton.setText("JFrame");
|
||||||
|
ownerFrameRadioButton.setSelected(true);
|
||||||
|
add(ownerFrameRadioButton, "cell 1 0");
|
||||||
|
|
||||||
|
//---- ownerDialogRadioButton ----
|
||||||
|
ownerDialogRadioButton.setText("JDialog");
|
||||||
|
add(ownerDialogRadioButton, "cell 1 0");
|
||||||
|
|
||||||
|
//---- ownerNullRadioButton ----
|
||||||
|
ownerNullRadioButton.setText("null");
|
||||||
|
add(ownerNullRadioButton, "cell 1 0");
|
||||||
|
add(ownerSpacer, "cell 1 0,growx");
|
||||||
|
|
||||||
//---- titleLabel ----
|
//---- titleLabel ----
|
||||||
titleLabel.setText("title");
|
titleLabel.setText("title");
|
||||||
add(titleLabel, "cell 0 0");
|
add(titleLabel, "cell 0 1");
|
||||||
add(titleField, "cell 1 0");
|
add(titleField, "cell 1 1");
|
||||||
|
|
||||||
//======== panel1 ========
|
//======== panel1 ========
|
||||||
{
|
{
|
||||||
@@ -407,41 +395,41 @@ public class FlatSystemFileChooserMacTest
|
|||||||
showSingleFilterFieldCheckBox.setText("showSingleFilterField");
|
showSingleFilterFieldCheckBox.setText("showSingleFilterField");
|
||||||
panel1.add(showSingleFilterFieldCheckBox, "cell 0 15");
|
panel1.add(showSingleFilterFieldCheckBox, "cell 0 15");
|
||||||
}
|
}
|
||||||
add(panel1, "cell 2 0 1 10,aligny top,growy 0");
|
add(panel1, "cell 2 1 1 10,aligny top,growy 0");
|
||||||
|
|
||||||
//---- promptLabel ----
|
//---- promptLabel ----
|
||||||
promptLabel.setText("prompt");
|
promptLabel.setText("prompt");
|
||||||
add(promptLabel, "cell 0 1");
|
add(promptLabel, "cell 0 2");
|
||||||
add(promptField, "cell 1 1");
|
add(promptField, "cell 1 2");
|
||||||
|
|
||||||
//---- messageLabel ----
|
//---- messageLabel ----
|
||||||
messageLabel.setText("message");
|
messageLabel.setText("message");
|
||||||
add(messageLabel, "cell 0 2");
|
add(messageLabel, "cell 0 3");
|
||||||
add(messageField, "cell 1 2");
|
add(messageField, "cell 1 3");
|
||||||
|
|
||||||
//---- filterFieldLabelLabel ----
|
//---- filterFieldLabelLabel ----
|
||||||
filterFieldLabelLabel.setText("filterFieldLabel");
|
filterFieldLabelLabel.setText("filterFieldLabel");
|
||||||
add(filterFieldLabelLabel, "cell 0 3");
|
add(filterFieldLabelLabel, "cell 0 4");
|
||||||
add(filterFieldLabelField, "cell 1 3");
|
add(filterFieldLabelField, "cell 1 4");
|
||||||
|
|
||||||
//---- nameFieldLabelLabel ----
|
//---- nameFieldLabelLabel ----
|
||||||
nameFieldLabelLabel.setText("nameFieldLabel");
|
nameFieldLabelLabel.setText("nameFieldLabel");
|
||||||
add(nameFieldLabelLabel, "cell 0 4");
|
add(nameFieldLabelLabel, "cell 0 5");
|
||||||
add(nameFieldLabelField, "cell 1 4");
|
add(nameFieldLabelField, "cell 1 5");
|
||||||
|
|
||||||
//---- nameFieldStringValueLabel ----
|
//---- nameFieldStringValueLabel ----
|
||||||
nameFieldStringValueLabel.setText("nameFieldStringValue");
|
nameFieldStringValueLabel.setText("nameFieldStringValue");
|
||||||
add(nameFieldStringValueLabel, "cell 0 5");
|
add(nameFieldStringValueLabel, "cell 0 6");
|
||||||
add(nameFieldStringValueField, "cell 1 5");
|
add(nameFieldStringValueField, "cell 1 6");
|
||||||
|
|
||||||
//---- directoryURLLabel ----
|
//---- directoryURLLabel ----
|
||||||
directoryURLLabel.setText("directoryURL");
|
directoryURLLabel.setText("directoryURL");
|
||||||
add(directoryURLLabel, "cell 0 6");
|
add(directoryURLLabel, "cell 0 7");
|
||||||
add(directoryURLField, "cell 1 6");
|
add(directoryURLField, "cell 1 7");
|
||||||
|
|
||||||
//---- fileTypesLabel ----
|
//---- fileTypesLabel ----
|
||||||
fileTypesLabel.setText("fileTypes");
|
fileTypesLabel.setText("fileTypes");
|
||||||
add(fileTypesLabel, "cell 0 7");
|
add(fileTypesLabel, "cell 0 8");
|
||||||
|
|
||||||
//---- fileTypesField ----
|
//---- fileTypesField ----
|
||||||
fileTypesField.setEditable(true);
|
fileTypesField.setEditable(true);
|
||||||
@@ -452,11 +440,11 @@ public class FlatSystemFileChooserMacTest
|
|||||||
"Text and PDF Files,txt,pdf,null",
|
"Text and PDF Files,txt,pdf,null",
|
||||||
"Compressed,zip,gz,null,Disk Images,dmg,null"
|
"Compressed,zip,gz,null,Disk Images,dmg,null"
|
||||||
}));
|
}));
|
||||||
add(fileTypesField, "cell 1 7");
|
add(fileTypesField, "cell 1 8");
|
||||||
|
|
||||||
//---- fileTypeIndexLabel ----
|
//---- fileTypeIndexLabel ----
|
||||||
fileTypeIndexLabel.setText("fileTypeIndex");
|
fileTypeIndexLabel.setText("fileTypeIndex");
|
||||||
add(fileTypeIndexLabel, "cell 0 8");
|
add(fileTypeIndexLabel, "cell 0 9");
|
||||||
|
|
||||||
//---- fileTypeIndexSlider ----
|
//---- fileTypeIndexSlider ----
|
||||||
fileTypeIndexSlider.setMaximum(10);
|
fileTypeIndexSlider.setMaximum(10);
|
||||||
@@ -464,31 +452,31 @@ public class FlatSystemFileChooserMacTest
|
|||||||
fileTypeIndexSlider.setValue(0);
|
fileTypeIndexSlider.setValue(0);
|
||||||
fileTypeIndexSlider.setPaintLabels(true);
|
fileTypeIndexSlider.setPaintLabels(true);
|
||||||
fileTypeIndexSlider.setSnapToTicks(true);
|
fileTypeIndexSlider.setSnapToTicks(true);
|
||||||
add(fileTypeIndexSlider, "cell 1 8");
|
add(fileTypeIndexSlider, "cell 1 9");
|
||||||
|
|
||||||
//---- openButton ----
|
//---- openButton ----
|
||||||
openButton.setText("Open...");
|
openButton.setText("Open...");
|
||||||
openButton.addActionListener(e -> open());
|
openButton.addActionListener(e -> open());
|
||||||
add(openButton, "cell 0 10 3 1");
|
add(openButton, "cell 0 11 3 1");
|
||||||
|
|
||||||
//---- saveButton ----
|
//---- saveButton ----
|
||||||
saveButton.setText("Save...");
|
saveButton.setText("Save...");
|
||||||
saveButton.addActionListener(e -> save());
|
saveButton.addActionListener(e -> save());
|
||||||
add(saveButton, "cell 0 10 3 1");
|
add(saveButton, "cell 0 11 3 1");
|
||||||
|
|
||||||
//---- openDirectButton ----
|
//---- openDirectButton ----
|
||||||
openDirectButton.setText("Open (no-thread)...");
|
openDirectButton.setText("Open (no-thread)...");
|
||||||
openDirectButton.addActionListener(e -> openDirect());
|
openDirectButton.addActionListener(e -> openDirect());
|
||||||
add(openDirectButton, "cell 0 10 3 1");
|
add(openDirectButton, "cell 0 11 3 1");
|
||||||
|
|
||||||
//---- saveDirectButton ----
|
//---- saveDirectButton ----
|
||||||
saveDirectButton.setText("Save (no-thread)...");
|
saveDirectButton.setText("Save (no-thread)...");
|
||||||
saveDirectButton.addActionListener(e -> saveDirect());
|
saveDirectButton.addActionListener(e -> saveDirect());
|
||||||
add(saveDirectButton, "cell 0 10 3 1");
|
add(saveDirectButton, "cell 0 11 3 1");
|
||||||
|
|
||||||
//---- showMessageDialogOnOKCheckBox ----
|
//---- showMessageDialogOnOKCheckBox ----
|
||||||
showMessageDialogOnOKCheckBox.setText("show message dialog on OK");
|
showMessageDialogOnOKCheckBox.setText("show message dialog on OK");
|
||||||
add(showMessageDialogOnOKCheckBox, "cell 0 10 3 1");
|
add(showMessageDialogOnOKCheckBox, "cell 0 11 3 1");
|
||||||
|
|
||||||
//======== filesScrollPane ========
|
//======== filesScrollPane ========
|
||||||
{
|
{
|
||||||
@@ -497,21 +485,62 @@ public class FlatSystemFileChooserMacTest
|
|||||||
filesField.setRows(8);
|
filesField.setRows(8);
|
||||||
filesScrollPane.setViewportView(filesField);
|
filesScrollPane.setViewportView(filesField);
|
||||||
}
|
}
|
||||||
add(filesScrollPane, "cell 0 11 3 1,growx");
|
add(filesScrollPane, "cell 0 12 3 1,growx");
|
||||||
|
|
||||||
|
//======== menuBar1 ========
|
||||||
|
{
|
||||||
|
|
||||||
|
//======== menu1 ========
|
||||||
|
{
|
||||||
|
menu1.setText("text");
|
||||||
|
|
||||||
|
//---- menuItem1 ----
|
||||||
|
menuItem1.setText("text");
|
||||||
|
menuItem1.addActionListener(e -> menuItemAction());
|
||||||
|
menu1.add(menuItem1);
|
||||||
|
|
||||||
|
//---- menuItem2 ----
|
||||||
|
menuItem2.setText("text");
|
||||||
|
menuItem2.addActionListener(e -> menuItemAction());
|
||||||
|
menu1.add(menuItem2);
|
||||||
|
}
|
||||||
|
menuBar1.add(menu1);
|
||||||
|
|
||||||
|
//======== menu2 ========
|
||||||
|
{
|
||||||
|
menu2.setText("text");
|
||||||
|
|
||||||
|
//---- menuItem3 ----
|
||||||
|
menuItem3.setText("text");
|
||||||
|
menuItem3.addActionListener(e -> menuItemAction());
|
||||||
|
menu2.add(menuItem3);
|
||||||
|
|
||||||
|
//---- menuItem4 ----
|
||||||
|
menuItem4.setText("text");
|
||||||
|
menuItem4.addActionListener(e -> menuItemAction());
|
||||||
|
menu2.add(menuItem4);
|
||||||
|
}
|
||||||
|
menuBar1.add(menu2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---- ownerButtonGroup ----
|
||||||
|
ButtonGroup ownerButtonGroup = new ButtonGroup();
|
||||||
|
ownerButtonGroup.add(ownerFrameRadioButton);
|
||||||
|
ownerButtonGroup.add(ownerDialogRadioButton);
|
||||||
|
ownerButtonGroup.add(ownerNullRadioButton);
|
||||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||||
}
|
}
|
||||||
|
|
||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
private JLabel titleLabel;
|
private JRadioButton ownerFrameRadioButton;
|
||||||
|
private JRadioButton ownerDialogRadioButton;
|
||||||
|
private JRadioButton ownerNullRadioButton;
|
||||||
private JTextField titleField;
|
private JTextField titleField;
|
||||||
private JPanel panel1;
|
|
||||||
private JLabel options1Label;
|
|
||||||
private JCheckBox canChooseFilesCheckBox;
|
private JCheckBox canChooseFilesCheckBox;
|
||||||
private JCheckBox canChooseDirectoriesCheckBox;
|
private JCheckBox canChooseDirectoriesCheckBox;
|
||||||
private FlatTriStateCheckBox resolvesAliasesCheckBox;
|
private FlatTriStateCheckBox resolvesAliasesCheckBox;
|
||||||
private FlatTriStateCheckBox allowsMultipleSelectionCheckBox;
|
private FlatTriStateCheckBox allowsMultipleSelectionCheckBox;
|
||||||
private JCheckBox accessoryViewDisclosedCheckBox;
|
private JCheckBox accessoryViewDisclosedCheckBox;
|
||||||
private JLabel options2Label;
|
|
||||||
private FlatTriStateCheckBox showsTagFieldCheckBox;
|
private FlatTriStateCheckBox showsTagFieldCheckBox;
|
||||||
private FlatTriStateCheckBox canCreateDirectoriesCheckBox;
|
private FlatTriStateCheckBox canCreateDirectoriesCheckBox;
|
||||||
private FlatTriStateCheckBox canSelectHiddenExtensionCheckBox;
|
private FlatTriStateCheckBox canSelectHiddenExtensionCheckBox;
|
||||||
@@ -519,30 +548,17 @@ public class FlatSystemFileChooserMacTest
|
|||||||
private FlatTriStateCheckBox extensionHiddenCheckBox;
|
private FlatTriStateCheckBox extensionHiddenCheckBox;
|
||||||
private FlatTriStateCheckBox allowsOtherFileTypesCheckBox;
|
private FlatTriStateCheckBox allowsOtherFileTypesCheckBox;
|
||||||
private FlatTriStateCheckBox treatsFilePackagesAsDirectoriesCheckBox;
|
private FlatTriStateCheckBox treatsFilePackagesAsDirectoriesCheckBox;
|
||||||
private JLabel options3Label;
|
|
||||||
private JCheckBox showSingleFilterFieldCheckBox;
|
private JCheckBox showSingleFilterFieldCheckBox;
|
||||||
private JLabel promptLabel;
|
|
||||||
private JTextField promptField;
|
private JTextField promptField;
|
||||||
private JLabel messageLabel;
|
|
||||||
private JTextField messageField;
|
private JTextField messageField;
|
||||||
private JLabel filterFieldLabelLabel;
|
|
||||||
private JTextField filterFieldLabelField;
|
private JTextField filterFieldLabelField;
|
||||||
private JLabel nameFieldLabelLabel;
|
|
||||||
private JTextField nameFieldLabelField;
|
private JTextField nameFieldLabelField;
|
||||||
private JLabel nameFieldStringValueLabel;
|
|
||||||
private JTextField nameFieldStringValueField;
|
private JTextField nameFieldStringValueField;
|
||||||
private JLabel directoryURLLabel;
|
|
||||||
private JTextField directoryURLField;
|
private JTextField directoryURLField;
|
||||||
private JLabel fileTypesLabel;
|
|
||||||
private JComboBox<String> fileTypesField;
|
private JComboBox<String> fileTypesField;
|
||||||
private JLabel fileTypeIndexLabel;
|
|
||||||
private JSlider fileTypeIndexSlider;
|
private JSlider fileTypeIndexSlider;
|
||||||
private JButton openButton;
|
|
||||||
private JButton saveButton;
|
|
||||||
private JButton openDirectButton;
|
|
||||||
private JButton saveDirectButton;
|
|
||||||
private JCheckBox showMessageDialogOnOKCheckBox;
|
private JCheckBox showMessageDialogOnOKCheckBox;
|
||||||
private JScrollPane filesScrollPane;
|
|
||||||
private JTextArea filesField;
|
private JTextArea filesField;
|
||||||
|
private static JMenuBar menuBar1;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,22 +3,70 @@ JFDML JFormDesigner: "8.2.2.0.9999" Java: "21.0.1" encoding: "UTF-8"
|
|||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
root: new FormRoot {
|
root: new FormRoot {
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
|
}
|
||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[left][grow,fill][fill]"
|
"$columnConstraints": "[left][grow,fill][fill]"
|
||||||
"$rowConstraints": "[][][][][][][][][][][][grow,fill]"
|
"$rowConstraints": "[][][][][][][][][][][][][grow,fill]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "this"
|
name: "this"
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "ownerLabel"
|
||||||
|
"text": "owner"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||||
|
name: "ownerFrameRadioButton"
|
||||||
|
"text": "JFrame"
|
||||||
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
"selected": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||||
|
name: "ownerDialogRadioButton"
|
||||||
|
"text": "JDialog"
|
||||||
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||||
|
name: "ownerNullRadioButton"
|
||||||
|
"text": "null"
|
||||||
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "com.jformdesigner.designer.wrapper.HSpacer" ) {
|
||||||
|
name: "ownerSpacer"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 0,growx"
|
||||||
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "titleLabel"
|
name: "titleLabel"
|
||||||
"text": "title"
|
"text": "title"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 0"
|
"value": "cell 0 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "titleField"
|
name: "titleField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 1"
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "insets 2,hidemode 3"
|
"$layoutConstraints": "insets 2,hidemode 3"
|
||||||
@@ -36,12 +84,18 @@ new FormModel {
|
|||||||
name: "canChooseFilesCheckBox"
|
name: "canChooseFilesCheckBox"
|
||||||
"text": "canChooseFiles"
|
"text": "canChooseFiles"
|
||||||
"selected": true
|
"selected": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 1"
|
"value": "cell 0 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "canChooseDirectoriesCheckBox"
|
name: "canChooseDirectoriesCheckBox"
|
||||||
"text": "canChooseDirectories"
|
"text": "canChooseDirectories"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 2"
|
"value": "cell 0 2"
|
||||||
} )
|
} )
|
||||||
@@ -49,18 +103,27 @@ new FormModel {
|
|||||||
name: "resolvesAliasesCheckBox"
|
name: "resolvesAliasesCheckBox"
|
||||||
"text": "resolvesAliases"
|
"text": "resolvesAliases"
|
||||||
"state": enum com.formdev.flatlaf.extras.components.FlatTriStateCheckBox$State SELECTED
|
"state": enum com.formdev.flatlaf.extras.components.FlatTriStateCheckBox$State SELECTED
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 3"
|
"value": "cell 0 3"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "allowsMultipleSelectionCheckBox"
|
name: "allowsMultipleSelectionCheckBox"
|
||||||
"text": "allowsMultipleSelection"
|
"text": "allowsMultipleSelection"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 4"
|
"value": "cell 0 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "accessoryViewDisclosedCheckBox"
|
name: "accessoryViewDisclosedCheckBox"
|
||||||
"text": "accessoryViewDisclosed"
|
"text": "accessoryViewDisclosed"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 5"
|
"value": "cell 0 5"
|
||||||
} )
|
} )
|
||||||
@@ -73,42 +136,63 @@ new FormModel {
|
|||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "showsTagFieldCheckBox"
|
name: "showsTagFieldCheckBox"
|
||||||
"text": "showsTagField"
|
"text": "showsTagField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 7"
|
"value": "cell 0 7"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "canCreateDirectoriesCheckBox"
|
name: "canCreateDirectoriesCheckBox"
|
||||||
"text": "canCreateDirectories"
|
"text": "canCreateDirectories"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 8"
|
"value": "cell 0 8"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "canSelectHiddenExtensionCheckBox"
|
name: "canSelectHiddenExtensionCheckBox"
|
||||||
"text": "canSelectHiddenExtension"
|
"text": "canSelectHiddenExtension"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 9"
|
"value": "cell 0 9"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "showsHiddenFilesCheckBox"
|
name: "showsHiddenFilesCheckBox"
|
||||||
"text": "showsHiddenFiles"
|
"text": "showsHiddenFiles"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 10"
|
"value": "cell 0 10"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "extensionHiddenCheckBox"
|
name: "extensionHiddenCheckBox"
|
||||||
"text": "extensionHidden"
|
"text": "extensionHidden"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 11"
|
"value": "cell 0 11"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "allowsOtherFileTypesCheckBox"
|
name: "allowsOtherFileTypesCheckBox"
|
||||||
"text": "allowsOtherFileTypes"
|
"text": "allowsOtherFileTypes"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 12"
|
"value": "cell 0 12"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "treatsFilePackagesAsDirectoriesCheckBox"
|
name: "treatsFilePackagesAsDirectoriesCheckBox"
|
||||||
"text": "treatsFilePackagesAsDirectories"
|
"text": "treatsFilePackagesAsDirectories"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 13"
|
"value": "cell 0 13"
|
||||||
} )
|
} )
|
||||||
@@ -121,83 +205,104 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "showSingleFilterFieldCheckBox"
|
name: "showSingleFilterFieldCheckBox"
|
||||||
"text": "showSingleFilterField"
|
"text": "showSingleFilterField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 15"
|
"value": "cell 0 15"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0 1 10,aligny top,growy 0"
|
"value": "cell 2 1 1 10,aligny top,growy 0"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "promptLabel"
|
name: "promptLabel"
|
||||||
"text": "prompt"
|
"text": "prompt"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 1"
|
"value": "cell 0 2"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "promptField"
|
name: "promptField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 1"
|
"value": "cell 1 2"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "messageLabel"
|
name: "messageLabel"
|
||||||
"text": "message"
|
"text": "message"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 2"
|
"value": "cell 0 3"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "messageField"
|
name: "messageField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 2"
|
"value": "cell 1 3"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "filterFieldLabelLabel"
|
name: "filterFieldLabelLabel"
|
||||||
"text": "filterFieldLabel"
|
"text": "filterFieldLabel"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 3"
|
"value": "cell 0 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "filterFieldLabelField"
|
name: "filterFieldLabelField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 3"
|
"value": "cell 1 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "nameFieldLabelLabel"
|
name: "nameFieldLabelLabel"
|
||||||
"text": "nameFieldLabel"
|
"text": "nameFieldLabel"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 4"
|
"value": "cell 0 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "nameFieldLabelField"
|
name: "nameFieldLabelField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 4"
|
"value": "cell 1 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "nameFieldStringValueLabel"
|
name: "nameFieldStringValueLabel"
|
||||||
"text": "nameFieldStringValue"
|
"text": "nameFieldStringValue"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 5"
|
"value": "cell 0 6"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "nameFieldStringValueField"
|
name: "nameFieldStringValueField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 5"
|
"value": "cell 1 6"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "directoryURLLabel"
|
name: "directoryURLLabel"
|
||||||
"text": "directoryURL"
|
"text": "directoryURL"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 6"
|
"value": "cell 0 7"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "directoryURLField"
|
name: "directoryURLField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 6"
|
"value": "cell 1 7"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "fileTypesLabel"
|
name: "fileTypesLabel"
|
||||||
"text": "fileTypes"
|
"text": "fileTypes"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 7"
|
"value": "cell 0 8"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||||
name: "fileTypesField"
|
name: "fileTypesField"
|
||||||
@@ -210,14 +315,17 @@ new FormModel {
|
|||||||
addElement( "Text and PDF Files,txt,pdf,null" )
|
addElement( "Text and PDF Files,txt,pdf,null" )
|
||||||
addElement( "Compressed,zip,gz,null,Disk Images,dmg,null" )
|
addElement( "Compressed,zip,gz,null,Disk Images,dmg,null" )
|
||||||
}
|
}
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 7"
|
"value": "cell 1 8"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "fileTypeIndexLabel"
|
name: "fileTypeIndexLabel"
|
||||||
"text": "fileTypeIndex"
|
"text": "fileTypeIndex"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 8"
|
"value": "cell 0 9"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JSlider" ) {
|
add( new FormComponent( "javax.swing.JSlider" ) {
|
||||||
name: "fileTypeIndexSlider"
|
name: "fileTypeIndexSlider"
|
||||||
@@ -226,55 +334,107 @@ new FormModel {
|
|||||||
"value": 0
|
"value": 0
|
||||||
"paintLabels": true
|
"paintLabels": true
|
||||||
"snapToTicks": true
|
"snapToTicks": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 8"
|
"value": "cell 1 9"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "openButton"
|
name: "openButton"
|
||||||
"text": "Open..."
|
"text": "Open..."
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "open", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "open", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 10 3 1"
|
"value": "cell 0 11 3 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "saveButton"
|
name: "saveButton"
|
||||||
"text": "Save..."
|
"text": "Save..."
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "save", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "save", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 10 3 1"
|
"value": "cell 0 11 3 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "openDirectButton"
|
name: "openDirectButton"
|
||||||
"text": "Open (no-thread)..."
|
"text": "Open (no-thread)..."
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "openDirect", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "openDirect", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 10 3 1"
|
"value": "cell 0 11 3 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "saveDirectButton"
|
name: "saveDirectButton"
|
||||||
"text": "Save (no-thread)..."
|
"text": "Save (no-thread)..."
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "saveDirect", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "saveDirect", false ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 10 3 1"
|
"value": "cell 0 11 3 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "showMessageDialogOnOKCheckBox"
|
name: "showMessageDialogOnOKCheckBox"
|
||||||
"text": "show message dialog on OK"
|
"text": "show message dialog on OK"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 10 3 1"
|
"value": "cell 0 11 3 1"
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||||
name: "filesScrollPane"
|
name: "filesScrollPane"
|
||||||
add( new FormComponent( "javax.swing.JTextArea" ) {
|
add( new FormComponent( "javax.swing.JTextArea" ) {
|
||||||
name: "filesField"
|
name: "filesField"
|
||||||
"rows": 8
|
"rows": 8
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 11 3 1,growx"
|
"value": "cell 0 12 3 1,growx"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 0 )
|
"location": new java.awt.Point( 0, 0 )
|
||||||
"size": new java.awt.Dimension( 750, 475 )
|
"size": new java.awt.Dimension( 750, 565 )
|
||||||
|
} )
|
||||||
|
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||||
|
name: "ownerButtonGroup"
|
||||||
|
}, new FormLayoutConstraints( null ) {
|
||||||
|
"location": new java.awt.Point( 0, 575 )
|
||||||
|
} )
|
||||||
|
add( new FormContainer( "javax.swing.JMenuBar", new FormLayoutManager( class javax.swing.JMenuBar ) ) {
|
||||||
|
name: "menuBar1"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableModifiers": 10
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
||||||
|
name: "menu1"
|
||||||
|
"text": "text"
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem1"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem2"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
} )
|
||||||
|
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
||||||
|
name: "menu2"
|
||||||
|
"text": "text"
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem3"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem4"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
} )
|
||||||
|
}, new FormLayoutConstraints( null ) {
|
||||||
|
"location": new java.awt.Point( 0, 630 )
|
||||||
|
"size": new java.awt.Dimension( 76, 24 )
|
||||||
} )
|
} )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,12 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf.testing;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
|
import java.awt.Component;
|
||||||
|
import java.awt.Container;
|
||||||
import java.awt.Dialog;
|
import java.awt.Dialog;
|
||||||
import java.awt.FileDialog;
|
import java.awt.FileDialog;
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
|
import java.awt.Point;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
@@ -49,6 +52,10 @@ public class FlatSystemFileChooserTest
|
|||||||
public static void main( String[] args ) {
|
public static void main( String[] args ) {
|
||||||
// macOS (see https://www.formdev.com/flatlaf/macos/)
|
// macOS (see https://www.formdev.com/flatlaf/macos/)
|
||||||
if( SystemInfo.isMacOS ) {
|
if( SystemInfo.isMacOS ) {
|
||||||
|
// enable screen menu bar
|
||||||
|
// (moves menu bar from JFrame window to top of screen)
|
||||||
|
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
|
||||||
|
|
||||||
// appearance of window title bars
|
// appearance of window title bars
|
||||||
// possible values:
|
// possible values:
|
||||||
// - "system": use current macOS appearance (light or dark)
|
// - "system": use current macOS appearance (light or dark)
|
||||||
@@ -63,6 +70,7 @@ public class FlatSystemFileChooserTest
|
|||||||
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); // necessary because of JavaFX
|
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); // necessary because of JavaFX
|
||||||
addListeners( frame );
|
addListeners( frame );
|
||||||
frame.showFrame( FlatSystemFileChooserTest::new );
|
frame.showFrame( FlatSystemFileChooserTest::new );
|
||||||
|
frame.setJMenuBar( menuBar1 );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,19 +330,9 @@ public class FlatSystemFileChooserTest
|
|||||||
Window frame = SwingUtilities.windowForComponent( this );
|
Window frame = SwingUtilities.windowForComponent( this );
|
||||||
if( ownerFrameRadioButton.isSelected() )
|
if( ownerFrameRadioButton.isSelected() )
|
||||||
showConsumer.accept( frame );
|
showConsumer.accept( frame );
|
||||||
else if( ownerDialogRadioButton.isSelected() ) {
|
else if( ownerDialogRadioButton.isSelected() )
|
||||||
JDialog dialog = new JDialog( frame, "Dummy Modal Dialog", Dialog.DEFAULT_MODALITY_TYPE );
|
new DummyModalDialog( frame, showConsumer ).setVisible( true );
|
||||||
dialog.setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
|
else
|
||||||
dialog.addWindowListener( new WindowAdapter() {
|
|
||||||
@Override
|
|
||||||
public void windowOpened( WindowEvent e ) {
|
|
||||||
showConsumer.accept( dialog );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
dialog.setSize( 1200, 1000 );
|
|
||||||
dialog.setLocationRelativeTo( this );
|
|
||||||
dialog.setVisible( true );
|
|
||||||
} else
|
|
||||||
showConsumer.accept( null );
|
showConsumer.accept( null );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,79 +421,105 @@ public class FlatSystemFileChooserTest
|
|||||||
DemoPrefs.getState().put( key, value );
|
DemoPrefs.getState().put( key, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addListeners( Window w ) {
|
private void menuItemAction() {
|
||||||
|
System.out.println( "menu item action" );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void addListeners( Window w ) {
|
||||||
w.addWindowListener( new WindowListener() {
|
w.addWindowListener( new WindowListener() {
|
||||||
@Override
|
@Override
|
||||||
public void windowOpened( WindowEvent e ) {
|
public void windowOpened( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowIconified( WindowEvent e ) {
|
public void windowIconified( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowDeiconified( WindowEvent e ) {
|
public void windowDeiconified( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowDeactivated( WindowEvent e ) {
|
public void windowDeactivated( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing( WindowEvent e ) {
|
public void windowClosing( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowClosed( WindowEvent e ) {
|
public void windowClosed( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowActivated( WindowEvent e ) {
|
public void windowActivated( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
w.addWindowStateListener( new WindowStateListener() {
|
w.addWindowStateListener( new WindowStateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void windowStateChanged( WindowEvent e ) {
|
public void windowStateChanged( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
w.addWindowFocusListener( new WindowFocusListener() {
|
w.addWindowFocusListener( new WindowFocusListener() {
|
||||||
@Override
|
@Override
|
||||||
public void windowLostFocus( WindowEvent e ) {
|
public void windowLostFocus( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowGainedFocus( WindowEvent e ) {
|
public void windowGainedFocus( WindowEvent e ) {
|
||||||
System.out.println( e );
|
printWindowEvent( e );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void printWindowEvent( WindowEvent e ) {
|
||||||
|
String typeStr;
|
||||||
|
switch( e.getID() ) {
|
||||||
|
case WindowEvent.WINDOW_OPENED: typeStr = "WINDOW_OPENED "; break;
|
||||||
|
case WindowEvent.WINDOW_CLOSING: typeStr = "WINDOW_CLOSING "; break;
|
||||||
|
case WindowEvent.WINDOW_CLOSED: typeStr = "WINDOW_CLOSED "; break;
|
||||||
|
case WindowEvent.WINDOW_ICONIFIED: typeStr = "WINDOW_ICONIFIED "; break;
|
||||||
|
case WindowEvent.WINDOW_DEICONIFIED: typeStr = "WINDOW_DEICONIFIED "; break;
|
||||||
|
case WindowEvent.WINDOW_ACTIVATED: typeStr = "WINDOW_ACTIVATED "; break;
|
||||||
|
case WindowEvent.WINDOW_DEACTIVATED: typeStr = "WINDOW_DEACTIVATED "; break;
|
||||||
|
case WindowEvent.WINDOW_GAINED_FOCUS: typeStr = "WINDOW_GAINED_FOCUS "; break;
|
||||||
|
case WindowEvent.WINDOW_LOST_FOCUS: typeStr = "WINDOW_LOST_FOCUS "; break;
|
||||||
|
case WindowEvent.WINDOW_STATE_CHANGED: typeStr = "WINDOW_STATE_CHANGED"; break;
|
||||||
|
default: typeStr = "unknown type "; break;
|
||||||
|
}
|
||||||
|
Object source = e.getSource();
|
||||||
|
Window opposite = e.getOppositeWindow();
|
||||||
|
String sourceStr = (source instanceof Component) ? ((Component)source).getName() : String.valueOf( source );
|
||||||
|
String oppositeStr = (opposite != null) ? opposite.getName() : null;
|
||||||
|
System.out.println( typeStr + " source " + sourceStr + " opposite " + oppositeStr );
|
||||||
|
}
|
||||||
|
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
ownerLabel = new JLabel();
|
JLabel ownerLabel = new JLabel();
|
||||||
ownerFrameRadioButton = new JRadioButton();
|
ownerFrameRadioButton = new JRadioButton();
|
||||||
ownerDialogRadioButton = new JRadioButton();
|
ownerDialogRadioButton = new JRadioButton();
|
||||||
ownerNullRadioButton = new JRadioButton();
|
ownerNullRadioButton = new JRadioButton();
|
||||||
ownerSpacer = new JPanel(null);
|
JPanel ownerSpacer = new JPanel(null);
|
||||||
dialogTitleLabel = new JLabel();
|
JLabel dialogTitleLabel = new JLabel();
|
||||||
dialogTitleField = new JTextField();
|
dialogTitleField = new JTextField();
|
||||||
panel1 = new JPanel();
|
JPanel panel1 = new JPanel();
|
||||||
directorySelectionCheckBox = new JCheckBox();
|
directorySelectionCheckBox = new JCheckBox();
|
||||||
multiSelectionEnabledCheckBox = new JCheckBox();
|
multiSelectionEnabledCheckBox = new JCheckBox();
|
||||||
useFileHidingCheckBox = new JCheckBox();
|
useFileHidingCheckBox = new JCheckBox();
|
||||||
useSystemFileChooserCheckBox = new JCheckBox();
|
useSystemFileChooserCheckBox = new JCheckBox();
|
||||||
approveButtonTextLabel = new JLabel();
|
JLabel approveButtonTextLabel = new JLabel();
|
||||||
approveButtonTextField = new JTextField();
|
approveButtonTextField = new JTextField();
|
||||||
approveButtonMnemonicLabel = new JLabel();
|
JLabel approveButtonMnemonicLabel = new JLabel();
|
||||||
approveButtonMnemonicField = new JTextField();
|
approveButtonMnemonicField = new JTextField();
|
||||||
currentDirCheckBox = new JCheckBox();
|
currentDirCheckBox = new JCheckBox();
|
||||||
currentDirField = new JTextField();
|
currentDirField = new JTextField();
|
||||||
@@ -506,21 +530,28 @@ public class FlatSystemFileChooserTest
|
|||||||
selectedFilesCheckBox = new JCheckBox();
|
selectedFilesCheckBox = new JCheckBox();
|
||||||
selectedFilesField = new JTextField();
|
selectedFilesField = new JTextField();
|
||||||
selectedFilesChooseButton = new JButton();
|
selectedFilesChooseButton = new JButton();
|
||||||
fileTypesLabel = new JLabel();
|
JLabel fileTypesLabel = new JLabel();
|
||||||
fileTypesField = new JComboBox<>();
|
fileTypesField = new JComboBox<>();
|
||||||
fileTypeIndexLabel = new JLabel();
|
JLabel fileTypeIndexLabel = new JLabel();
|
||||||
fileTypeIndexSlider = new JSlider();
|
fileTypeIndexSlider = new JSlider();
|
||||||
useAcceptAllFileFilterCheckBox = new JCheckBox();
|
useAcceptAllFileFilterCheckBox = new JCheckBox();
|
||||||
openButton = new JButton();
|
JButton openButton = new JButton();
|
||||||
saveButton = new JButton();
|
JButton saveButton = new JButton();
|
||||||
swingOpenButton = new JButton();
|
JButton swingOpenButton = new JButton();
|
||||||
swingSaveButton = new JButton();
|
JButton swingSaveButton = new JButton();
|
||||||
awtOpenButton = new JButton();
|
JButton awtOpenButton = new JButton();
|
||||||
awtSaveButton = new JButton();
|
JButton awtSaveButton = new JButton();
|
||||||
javafxOpenButton = new JButton();
|
javafxOpenButton = new JButton();
|
||||||
javafxSaveButton = new JButton();
|
javafxSaveButton = new JButton();
|
||||||
outputScrollPane = new JScrollPane();
|
JScrollPane outputScrollPane = new JScrollPane();
|
||||||
outputField = new JTextArea();
|
outputField = new JTextArea();
|
||||||
|
menuBar1 = new JMenuBar();
|
||||||
|
JMenu menu1 = new JMenu();
|
||||||
|
JMenuItem menuItem1 = new JMenuItem();
|
||||||
|
JMenuItem menuItem2 = new JMenuItem();
|
||||||
|
JMenu menu2 = new JMenu();
|
||||||
|
JMenuItem menuItem3 = new JMenuItem();
|
||||||
|
JMenuItem menuItem4 = new JMenuItem();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setLayout(new MigLayout(
|
setLayout(new MigLayout(
|
||||||
@@ -722,6 +753,42 @@ public class FlatSystemFileChooserTest
|
|||||||
}
|
}
|
||||||
add(outputScrollPane, "cell 0 9 3 1,growx");
|
add(outputScrollPane, "cell 0 9 3 1,growx");
|
||||||
|
|
||||||
|
//======== menuBar1 ========
|
||||||
|
{
|
||||||
|
|
||||||
|
//======== menu1 ========
|
||||||
|
{
|
||||||
|
menu1.setText("text");
|
||||||
|
|
||||||
|
//---- menuItem1 ----
|
||||||
|
menuItem1.setText("text");
|
||||||
|
menuItem1.addActionListener(e -> menuItemAction());
|
||||||
|
menu1.add(menuItem1);
|
||||||
|
|
||||||
|
//---- menuItem2 ----
|
||||||
|
menuItem2.setText("text");
|
||||||
|
menuItem2.addActionListener(e -> menuItemAction());
|
||||||
|
menu1.add(menuItem2);
|
||||||
|
}
|
||||||
|
menuBar1.add(menu1);
|
||||||
|
|
||||||
|
//======== menu2 ========
|
||||||
|
{
|
||||||
|
menu2.setText("text");
|
||||||
|
|
||||||
|
//---- menuItem3 ----
|
||||||
|
menuItem3.setText("text");
|
||||||
|
menuItem3.addActionListener(e -> menuItemAction());
|
||||||
|
menu2.add(menuItem3);
|
||||||
|
|
||||||
|
//---- menuItem4 ----
|
||||||
|
menuItem4.setText("text");
|
||||||
|
menuItem4.addActionListener(e -> menuItemAction());
|
||||||
|
menu2.add(menuItem4);
|
||||||
|
}
|
||||||
|
menuBar1.add(menu2);
|
||||||
|
}
|
||||||
|
|
||||||
//---- ownerButtonGroup ----
|
//---- ownerButtonGroup ----
|
||||||
ButtonGroup ownerButtonGroup = new ButtonGroup();
|
ButtonGroup ownerButtonGroup = new ButtonGroup();
|
||||||
ownerButtonGroup.add(ownerFrameRadioButton);
|
ownerButtonGroup.add(ownerFrameRadioButton);
|
||||||
@@ -731,21 +798,15 @@ public class FlatSystemFileChooserTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
private JLabel ownerLabel;
|
|
||||||
private JRadioButton ownerFrameRadioButton;
|
private JRadioButton ownerFrameRadioButton;
|
||||||
private JRadioButton ownerDialogRadioButton;
|
private JRadioButton ownerDialogRadioButton;
|
||||||
private JRadioButton ownerNullRadioButton;
|
private JRadioButton ownerNullRadioButton;
|
||||||
private JPanel ownerSpacer;
|
|
||||||
private JLabel dialogTitleLabel;
|
|
||||||
private JTextField dialogTitleField;
|
private JTextField dialogTitleField;
|
||||||
private JPanel panel1;
|
|
||||||
private JCheckBox directorySelectionCheckBox;
|
private JCheckBox directorySelectionCheckBox;
|
||||||
private JCheckBox multiSelectionEnabledCheckBox;
|
private JCheckBox multiSelectionEnabledCheckBox;
|
||||||
private JCheckBox useFileHidingCheckBox;
|
private JCheckBox useFileHidingCheckBox;
|
||||||
private JCheckBox useSystemFileChooserCheckBox;
|
private JCheckBox useSystemFileChooserCheckBox;
|
||||||
private JLabel approveButtonTextLabel;
|
|
||||||
private JTextField approveButtonTextField;
|
private JTextField approveButtonTextField;
|
||||||
private JLabel approveButtonMnemonicLabel;
|
|
||||||
private JTextField approveButtonMnemonicField;
|
private JTextField approveButtonMnemonicField;
|
||||||
private JCheckBox currentDirCheckBox;
|
private JCheckBox currentDirCheckBox;
|
||||||
private JTextField currentDirField;
|
private JTextField currentDirField;
|
||||||
@@ -756,20 +817,151 @@ public class FlatSystemFileChooserTest
|
|||||||
private JCheckBox selectedFilesCheckBox;
|
private JCheckBox selectedFilesCheckBox;
|
||||||
private JTextField selectedFilesField;
|
private JTextField selectedFilesField;
|
||||||
private JButton selectedFilesChooseButton;
|
private JButton selectedFilesChooseButton;
|
||||||
private JLabel fileTypesLabel;
|
|
||||||
private JComboBox<String> fileTypesField;
|
private JComboBox<String> fileTypesField;
|
||||||
private JLabel fileTypeIndexLabel;
|
|
||||||
private JSlider fileTypeIndexSlider;
|
private JSlider fileTypeIndexSlider;
|
||||||
private JCheckBox useAcceptAllFileFilterCheckBox;
|
private JCheckBox useAcceptAllFileFilterCheckBox;
|
||||||
private JButton openButton;
|
|
||||||
private JButton saveButton;
|
|
||||||
private JButton swingOpenButton;
|
|
||||||
private JButton swingSaveButton;
|
|
||||||
private JButton awtOpenButton;
|
|
||||||
private JButton awtSaveButton;
|
|
||||||
private JButton javafxOpenButton;
|
private JButton javafxOpenButton;
|
||||||
private JButton javafxSaveButton;
|
private JButton javafxSaveButton;
|
||||||
private JScrollPane outputScrollPane;
|
|
||||||
private JTextArea outputField;
|
private JTextArea outputField;
|
||||||
|
private static JMenuBar menuBar1;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
|
|
||||||
|
//---- class DummyModalDialog ---------------------------------------------
|
||||||
|
|
||||||
|
static class DummyModalDialog
|
||||||
|
extends JDialog
|
||||||
|
{
|
||||||
|
private final Consumer<Window> showConsumer;
|
||||||
|
|
||||||
|
DummyModalDialog( Window owner, Consumer<Window> showConsumer ) {
|
||||||
|
super( owner );
|
||||||
|
this.showConsumer = showConsumer;
|
||||||
|
initComponents();
|
||||||
|
addListeners( this );
|
||||||
|
((JComponent)getContentPane()).registerKeyboardAction(
|
||||||
|
e -> dispose(),
|
||||||
|
KeyStroke.getKeyStroke( "ESCAPE" ),
|
||||||
|
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
|
||||||
|
|
||||||
|
if( owner != null ) {
|
||||||
|
Point pt = owner.getLocationOnScreen();
|
||||||
|
setLocation( pt.x + (getWidth() / 2), pt.y + 40 );
|
||||||
|
} else
|
||||||
|
setLocationRelativeTo( null );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void modalityTypeChanged() {
|
||||||
|
if( applicationRadioButton.isSelected() )
|
||||||
|
setModalityType( ModalityType.APPLICATION_MODAL );
|
||||||
|
else if( documentRadioButton.isSelected() )
|
||||||
|
setModalityType( ModalityType.DOCUMENT_MODAL );
|
||||||
|
else if( toolkitRadioButton.isSelected() )
|
||||||
|
setModalityType( ModalityType.TOOLKIT_MODAL );
|
||||||
|
else
|
||||||
|
setModalityType( ModalityType.MODELESS );
|
||||||
|
|
||||||
|
setVisible( false );
|
||||||
|
setVisible( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showModalDialog() {
|
||||||
|
new DummyModalDialog( this, showConsumer ).setVisible( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showFileDialog() {
|
||||||
|
showConsumer.accept( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void windowOpened() {
|
||||||
|
showConsumer.accept( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initComponents() {
|
||||||
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||||
|
JLabel label1 = new JLabel();
|
||||||
|
applicationRadioButton = new JRadioButton();
|
||||||
|
documentRadioButton = new JRadioButton();
|
||||||
|
toolkitRadioButton = new JRadioButton();
|
||||||
|
modelessRadioButton = new JRadioButton();
|
||||||
|
JButton showModalDialogButton = new JButton();
|
||||||
|
JButton showFileDialogButton = new JButton();
|
||||||
|
|
||||||
|
//======== this ========
|
||||||
|
setTitle("Dummy Modal Dialog");
|
||||||
|
setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
|
||||||
|
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
|
addWindowListener(new WindowAdapter() {
|
||||||
|
@Override
|
||||||
|
public void windowOpened(WindowEvent e) {
|
||||||
|
DummyModalDialog.this.windowOpened();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Container contentPane = getContentPane();
|
||||||
|
contentPane.setLayout(new MigLayout(
|
||||||
|
"hidemode 3",
|
||||||
|
// columns
|
||||||
|
"[fill]" +
|
||||||
|
"[fill]",
|
||||||
|
// rows
|
||||||
|
"[]0" +
|
||||||
|
"[]0" +
|
||||||
|
"[]0" +
|
||||||
|
"[]" +
|
||||||
|
"[]para" +
|
||||||
|
"[]" +
|
||||||
|
"[198]"));
|
||||||
|
|
||||||
|
//---- label1 ----
|
||||||
|
label1.setText("Modality type:");
|
||||||
|
contentPane.add(label1, "cell 0 0");
|
||||||
|
|
||||||
|
//---- applicationRadioButton ----
|
||||||
|
applicationRadioButton.setText("Application");
|
||||||
|
applicationRadioButton.setSelected(true);
|
||||||
|
applicationRadioButton.addActionListener(e -> modalityTypeChanged());
|
||||||
|
contentPane.add(applicationRadioButton, "cell 1 0");
|
||||||
|
|
||||||
|
//---- documentRadioButton ----
|
||||||
|
documentRadioButton.setText("Document");
|
||||||
|
documentRadioButton.addActionListener(e -> modalityTypeChanged());
|
||||||
|
contentPane.add(documentRadioButton, "cell 1 1");
|
||||||
|
|
||||||
|
//---- toolkitRadioButton ----
|
||||||
|
toolkitRadioButton.setText("Toolkit");
|
||||||
|
toolkitRadioButton.addActionListener(e -> modalityTypeChanged());
|
||||||
|
contentPane.add(toolkitRadioButton, "cell 1 2");
|
||||||
|
|
||||||
|
//---- modelessRadioButton ----
|
||||||
|
modelessRadioButton.setText("modeless");
|
||||||
|
modelessRadioButton.addActionListener(e -> modalityTypeChanged());
|
||||||
|
contentPane.add(modelessRadioButton, "cell 1 3");
|
||||||
|
|
||||||
|
//---- showModalDialogButton ----
|
||||||
|
showModalDialogButton.setText("Show Modal Dialog...");
|
||||||
|
showModalDialogButton.addActionListener(e -> showModalDialog());
|
||||||
|
contentPane.add(showModalDialogButton, "cell 0 4 2 1");
|
||||||
|
|
||||||
|
//---- showFileDialogButton ----
|
||||||
|
showFileDialogButton.setText("Show File Dialog...");
|
||||||
|
showFileDialogButton.addActionListener(e -> showFileDialog());
|
||||||
|
contentPane.add(showFileDialogButton, "cell 0 5 2 1");
|
||||||
|
pack();
|
||||||
|
setLocationRelativeTo(getOwner());
|
||||||
|
|
||||||
|
//---- modalityTypeButtonGroup ----
|
||||||
|
ButtonGroup modalityTypeButtonGroup = new ButtonGroup();
|
||||||
|
modalityTypeButtonGroup.add(applicationRadioButton);
|
||||||
|
modalityTypeButtonGroup.add(documentRadioButton);
|
||||||
|
modalityTypeButtonGroup.add(toolkitRadioButton);
|
||||||
|
modalityTypeButtonGroup.add(modelessRadioButton);
|
||||||
|
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||||
|
}
|
||||||
|
|
||||||
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||||
|
private JRadioButton applicationRadioButton;
|
||||||
|
private JRadioButton documentRadioButton;
|
||||||
|
private JRadioButton toolkitRadioButton;
|
||||||
|
private JRadioButton modelessRadioButton;
|
||||||
|
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ JFDML JFormDesigner: "8.3" encoding: "UTF-8"
|
|||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
root: new FormRoot {
|
root: new FormRoot {
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
|
}
|
||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[left][grow,fill][fill]"
|
"$columnConstraints": "[left][grow,fill][fill]"
|
||||||
@@ -20,6 +23,9 @@ new FormModel {
|
|||||||
"text": "JFrame"
|
"text": "JFrame"
|
||||||
"selected": true
|
"selected": true
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -27,6 +33,9 @@ new FormModel {
|
|||||||
name: "ownerDialogRadioButton"
|
name: "ownerDialogRadioButton"
|
||||||
"text": "JDialog"
|
"text": "JDialog"
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -34,6 +43,9 @@ new FormModel {
|
|||||||
name: "ownerNullRadioButton"
|
name: "ownerNullRadioButton"
|
||||||
"text": "null"
|
"text": "null"
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -50,6 +62,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "dialogTitleField"
|
name: "dialogTitleField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 1"
|
"value": "cell 1 1"
|
||||||
} )
|
} )
|
||||||
@@ -62,12 +77,18 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "directorySelectionCheckBox"
|
name: "directorySelectionCheckBox"
|
||||||
"text": "directorySelection"
|
"text": "directorySelection"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 0"
|
"value": "cell 0 0"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "multiSelectionEnabledCheckBox"
|
name: "multiSelectionEnabledCheckBox"
|
||||||
"text": "multiSelectionEnabled"
|
"text": "multiSelectionEnabled"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 1"
|
"value": "cell 0 1"
|
||||||
} )
|
} )
|
||||||
@@ -75,6 +96,9 @@ new FormModel {
|
|||||||
name: "useFileHidingCheckBox"
|
name: "useFileHidingCheckBox"
|
||||||
"text": "useFileHiding"
|
"text": "useFileHiding"
|
||||||
"selected": true
|
"selected": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 2"
|
"value": "cell 0 2"
|
||||||
} )
|
} )
|
||||||
@@ -82,6 +106,9 @@ new FormModel {
|
|||||||
name: "useSystemFileChooserCheckBox"
|
name: "useSystemFileChooserCheckBox"
|
||||||
"text": "use SystemFileChooser"
|
"text": "use SystemFileChooser"
|
||||||
"selected": true
|
"selected": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 3"
|
"value": "cell 0 3"
|
||||||
} )
|
} )
|
||||||
@@ -96,6 +123,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "approveButtonTextField"
|
name: "approveButtonTextField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 2,growx"
|
"value": "cell 1 2,growx"
|
||||||
} )
|
} )
|
||||||
@@ -108,6 +138,9 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "approveButtonMnemonicField"
|
name: "approveButtonMnemonicField"
|
||||||
"columns": 3
|
"columns": 3
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 2"
|
"value": "cell 1 2"
|
||||||
} )
|
} )
|
||||||
@@ -211,6 +244,9 @@ new FormModel {
|
|||||||
addElement( "Text Files,txt,PDF Files,pdf,All Files,*" )
|
addElement( "Text Files,txt,PDF Files,pdf,All Files,*" )
|
||||||
addElement( "Text and PDF Files,txt;pdf" )
|
addElement( "Text and PDF Files,txt;pdf" )
|
||||||
}
|
}
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 6"
|
"value": "cell 1 6"
|
||||||
} )
|
} )
|
||||||
@@ -227,6 +263,9 @@ new FormModel {
|
|||||||
"value": 0
|
"value": 0
|
||||||
"paintLabels": true
|
"paintLabels": true
|
||||||
"snapToTicks": true
|
"snapToTicks": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 7,growx"
|
"value": "cell 1 7,growx"
|
||||||
} )
|
} )
|
||||||
@@ -234,6 +273,9 @@ new FormModel {
|
|||||||
name: "useAcceptAllFileFilterCheckBox"
|
name: "useAcceptAllFileFilterCheckBox"
|
||||||
"text": "useAcceptAllFileFilter"
|
"text": "useAcceptAllFileFilter"
|
||||||
"selected": true
|
"selected": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 7"
|
"value": "cell 1 7"
|
||||||
} )
|
} )
|
||||||
@@ -304,6 +346,9 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JTextArea" ) {
|
add( new FormComponent( "javax.swing.JTextArea" ) {
|
||||||
name: "outputField"
|
name: "outputField"
|
||||||
"rows": 20
|
"rows": 20
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 9 3 1,growx"
|
"value": "cell 0 9 3 1,growx"
|
||||||
@@ -312,10 +357,134 @@ new FormModel {
|
|||||||
"location": new java.awt.Point( 0, 0 )
|
"location": new java.awt.Point( 0, 0 )
|
||||||
"size": new java.awt.Dimension( 825, 465 )
|
"size": new java.awt.Dimension( 825, 465 )
|
||||||
} )
|
} )
|
||||||
|
add( new FormContainer( "javax.swing.JMenuBar", new FormLayoutManager( class javax.swing.JMenuBar ) ) {
|
||||||
|
name: "menuBar1"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableModifiers": 10
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
||||||
|
name: "menu1"
|
||||||
|
"text": "text"
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem1"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem2"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
} )
|
||||||
|
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
||||||
|
name: "menu2"
|
||||||
|
"text": "text"
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem3"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "menuItem4"
|
||||||
|
"text": "text"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemAction", false ) )
|
||||||
|
} )
|
||||||
|
} )
|
||||||
|
}, new FormLayoutConstraints( null ) {
|
||||||
|
"location": new java.awt.Point( 10, 570 )
|
||||||
|
} )
|
||||||
|
add( new FormWindow( "javax.swing.JDialog", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
|
"$layoutConstraints": "hidemode 3"
|
||||||
|
"$columnConstraints": "[fill][fill]"
|
||||||
|
"$rowConstraints": "[]0[]0[]0[][]para[][198]"
|
||||||
|
} ) {
|
||||||
|
name: "dialog1"
|
||||||
|
"title": "Dummy Modal Dialog"
|
||||||
|
"modalityType": enum java.awt.Dialog$ModalityType APPLICATION_MODAL
|
||||||
|
"defaultCloseOperation": 2
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.className": "DummyModalDialog"
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.WindowListener", "windowOpened", "windowOpened", false ) )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "label1"
|
||||||
|
"text": "Modality type:"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||||
|
name: "applicationRadioButton"
|
||||||
|
"text": "Application"
|
||||||
|
"selected": true
|
||||||
|
"$buttonGroup": new FormReference( "modalityTypeButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "modalityTypeChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||||
|
name: "documentRadioButton"
|
||||||
|
"text": "Document"
|
||||||
|
"$buttonGroup": new FormReference( "modalityTypeButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "modalityTypeChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||||
|
name: "toolkitRadioButton"
|
||||||
|
"text": "Toolkit"
|
||||||
|
"$buttonGroup": new FormReference( "modalityTypeButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "modalityTypeChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 2"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JRadioButton" ) {
|
||||||
|
name: "modelessRadioButton"
|
||||||
|
"text": "modeless"
|
||||||
|
"$buttonGroup": new FormReference( "modalityTypeButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "modalityTypeChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 3"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
|
name: "showModalDialogButton"
|
||||||
|
"text": "Show Modal Dialog..."
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showModalDialog", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 4 2 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
|
name: "showFileDialogButton"
|
||||||
|
"text": "Show File Dialog..."
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showFileDialog", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 5 2 1"
|
||||||
|
} )
|
||||||
|
}, new FormLayoutConstraints( null ) {
|
||||||
|
"location": new java.awt.Point( 20, 635 )
|
||||||
|
"size": new java.awt.Dimension( 290, 465 )
|
||||||
|
} )
|
||||||
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||||
name: "ownerButtonGroup"
|
name: "ownerButtonGroup"
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 475 )
|
"location": new java.awt.Point( 0, 475 )
|
||||||
} )
|
} )
|
||||||
|
add( new FormNonVisual( "javax.swing.ButtonGroup" ) {
|
||||||
|
name: "modalityTypeButtonGroup"
|
||||||
|
}, new FormLayoutConstraints( null ) {
|
||||||
|
"location": new java.awt.Point( 115, 575 )
|
||||||
|
} )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,17 +17,11 @@
|
|||||||
package com.formdev.flatlaf.testing;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import static com.formdev.flatlaf.ui.FlatNativeWindowsLibrary.*;
|
import static com.formdev.flatlaf.ui.FlatNativeWindowsLibrary.*;
|
||||||
import java.awt.Dialog;
|
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.SecondaryLoop;
|
import java.awt.SecondaryLoop;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.WindowAdapter;
|
|
||||||
import java.awt.event.WindowEvent;
|
|
||||||
import java.awt.event.WindowFocusListener;
|
|
||||||
import java.awt.event.WindowListener;
|
|
||||||
import java.awt.event.WindowStateListener;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.prefs.Preferences;
|
import java.util.prefs.Preferences;
|
||||||
@@ -36,6 +30,7 @@ import javax.swing.border.TitledBorder;
|
|||||||
import com.formdev.flatlaf.demo.DemoPrefs;
|
import com.formdev.flatlaf.demo.DemoPrefs;
|
||||||
import com.formdev.flatlaf.extras.components.*;
|
import com.formdev.flatlaf.extras.components.*;
|
||||||
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
|
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
|
||||||
|
import com.formdev.flatlaf.testing.FlatSystemFileChooserTest.DummyModalDialog;
|
||||||
import com.formdev.flatlaf.ui.FlatNativeWindowsLibrary;
|
import com.formdev.flatlaf.ui.FlatNativeWindowsLibrary;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
|
|
||||||
@@ -53,7 +48,7 @@ public class FlatSystemFileChooserWindowsTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
FlatTestFrame frame = FlatTestFrame.create( args, "FlatSystemFileChooserWindowsTest" );
|
FlatTestFrame frame = FlatTestFrame.create( args, "FlatSystemFileChooserWindowsTest" );
|
||||||
// addListeners( frame );
|
FlatSystemFileChooserTest.addListeners( frame );
|
||||||
frame.showFrame( FlatSystemFileChooserWindowsTest::new );
|
frame.showFrame( FlatSystemFileChooserWindowsTest::new );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
@@ -88,19 +83,9 @@ public class FlatSystemFileChooserWindowsTest
|
|||||||
Window frame = SwingUtilities.windowForComponent( this );
|
Window frame = SwingUtilities.windowForComponent( this );
|
||||||
if( ownerFrameRadioButton.isSelected() )
|
if( ownerFrameRadioButton.isSelected() )
|
||||||
openOrSave( open, direct, frame );
|
openOrSave( open, direct, frame );
|
||||||
else if( ownerDialogRadioButton.isSelected() ) {
|
else if( ownerDialogRadioButton.isSelected() )
|
||||||
JDialog dialog = new JDialog( frame, "Dummy Modal Dialog", Dialog.DEFAULT_MODALITY_TYPE );
|
new DummyModalDialog( frame, owner -> openOrSave( open, direct, owner ) ).setVisible( true );
|
||||||
dialog.setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
|
else
|
||||||
dialog.addWindowListener( new WindowAdapter() {
|
|
||||||
@Override
|
|
||||||
public void windowOpened( WindowEvent e ) {
|
|
||||||
openOrSave( open, direct, dialog );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
dialog.setSize( 1200, 1000 );
|
|
||||||
dialog.setLocationRelativeTo( this );
|
|
||||||
dialog.setVisible( true );
|
|
||||||
} else
|
|
||||||
openOrSave( open, direct, null );
|
openOrSave( open, direct, null );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,73 +202,16 @@ public class FlatSystemFileChooserWindowsTest
|
|||||||
/* MB_ICONINFORMATION */ 0x00000040 | /* MB_YESNO */ 0x00000004 ) );
|
/* MB_ICONINFORMATION */ 0x00000040 | /* MB_YESNO */ 0x00000004 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings( "unused" )
|
|
||||||
private static void addListeners( Window w ) {
|
|
||||||
w.addWindowListener( new WindowListener() {
|
|
||||||
@Override
|
|
||||||
public void windowOpened( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowIconified( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowDeiconified( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowDeactivated( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowClosing( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowClosed( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowActivated( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
w.addWindowStateListener( new WindowStateListener() {
|
|
||||||
@Override
|
|
||||||
public void windowStateChanged( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
w.addWindowFocusListener( new WindowFocusListener() {
|
|
||||||
@Override
|
|
||||||
public void windowLostFocus( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void windowGainedFocus( WindowEvent e ) {
|
|
||||||
System.out.println( e );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
ownerLabel = new JLabel();
|
JLabel ownerLabel = new JLabel();
|
||||||
ownerFrameRadioButton = new JRadioButton();
|
ownerFrameRadioButton = new JRadioButton();
|
||||||
ownerDialogRadioButton = new JRadioButton();
|
ownerDialogRadioButton = new JRadioButton();
|
||||||
ownerNullRadioButton = new JRadioButton();
|
ownerNullRadioButton = new JRadioButton();
|
||||||
ownerSpacer = new JPanel(null);
|
JPanel ownerSpacer = new JPanel(null);
|
||||||
titleLabel = new JLabel();
|
JLabel titleLabel = new JLabel();
|
||||||
titleField = new JTextField();
|
titleField = new JTextField();
|
||||||
panel1 = new JPanel();
|
JPanel panel1 = new JPanel();
|
||||||
overwritePromptCheckBox = new FlatTriStateCheckBox();
|
overwritePromptCheckBox = new FlatTriStateCheckBox();
|
||||||
pathMustExistCheckBox = new FlatTriStateCheckBox();
|
pathMustExistCheckBox = new FlatTriStateCheckBox();
|
||||||
noDereferenceLinksCheckBox = new FlatTriStateCheckBox();
|
noDereferenceLinksCheckBox = new FlatTriStateCheckBox();
|
||||||
@@ -307,39 +235,39 @@ public class FlatSystemFileChooserWindowsTest
|
|||||||
supportStreamableItemsCheckBox = new FlatTriStateCheckBox();
|
supportStreamableItemsCheckBox = new FlatTriStateCheckBox();
|
||||||
allowMultiSelectCheckBox = new FlatTriStateCheckBox();
|
allowMultiSelectCheckBox = new FlatTriStateCheckBox();
|
||||||
hidePinnedPlacesCheckBox = new FlatTriStateCheckBox();
|
hidePinnedPlacesCheckBox = new FlatTriStateCheckBox();
|
||||||
messageDialogPanel = new JPanel();
|
JPanel messageDialogPanel = new JPanel();
|
||||||
messageLabel = new JLabel();
|
JLabel messageLabel = new JLabel();
|
||||||
messageScrollPane = new JScrollPane();
|
JScrollPane messageScrollPane = new JScrollPane();
|
||||||
messageField = new JTextArea();
|
messageField = new JTextArea();
|
||||||
buttonsLabel = new JLabel();
|
JLabel buttonsLabel = new JLabel();
|
||||||
buttonsField = new JTextField();
|
buttonsField = new JTextField();
|
||||||
okButtonLabelLabel = new JLabel();
|
JLabel okButtonLabelLabel = new JLabel();
|
||||||
okButtonLabelField = new JTextField();
|
okButtonLabelField = new JTextField();
|
||||||
fileNameLabelLabel = new JLabel();
|
JLabel fileNameLabelLabel = new JLabel();
|
||||||
fileNameLabelField = new JTextField();
|
fileNameLabelField = new JTextField();
|
||||||
fileNameLabel = new JLabel();
|
JLabel fileNameLabel = new JLabel();
|
||||||
fileNameField = new JTextField();
|
fileNameField = new JTextField();
|
||||||
folderLabel = new JLabel();
|
JLabel folderLabel = new JLabel();
|
||||||
folderField = new JTextField();
|
folderField = new JTextField();
|
||||||
saveAsItemLabel = new JLabel();
|
JLabel saveAsItemLabel = new JLabel();
|
||||||
saveAsItemField = new JTextField();
|
saveAsItemField = new JTextField();
|
||||||
defaultFolderLabel = new JLabel();
|
JLabel defaultFolderLabel = new JLabel();
|
||||||
defaultFolderField = new JTextField();
|
defaultFolderField = new JTextField();
|
||||||
defaultExtensionLabel = new JLabel();
|
JLabel defaultExtensionLabel = new JLabel();
|
||||||
defaultExtensionField = new JTextField();
|
defaultExtensionField = new JTextField();
|
||||||
fileTypesLabel = new JLabel();
|
JLabel fileTypesLabel = new JLabel();
|
||||||
fileTypesField = new JComboBox<>();
|
fileTypesField = new JComboBox<>();
|
||||||
fileTypeIndexLabel = new JLabel();
|
JLabel fileTypeIndexLabel = new JLabel();
|
||||||
fileTypeIndexSlider = new JSlider();
|
fileTypeIndexSlider = new JSlider();
|
||||||
openButton = new JButton();
|
JButton openButton = new JButton();
|
||||||
saveButton = new JButton();
|
JButton saveButton = new JButton();
|
||||||
openDirectButton = new JButton();
|
JButton openDirectButton = new JButton();
|
||||||
saveDirectButton = new JButton();
|
JButton saveDirectButton = new JButton();
|
||||||
showMessageDialogOnOKCheckBox = new JCheckBox();
|
showMessageDialogOnOKCheckBox = new JCheckBox();
|
||||||
hSpacer1 = new JPanel(null);
|
JPanel hSpacer1 = new JPanel(null);
|
||||||
messageDialogButton = new JButton();
|
JButton messageDialogButton = new JButton();
|
||||||
messageBoxButton = new JButton();
|
JButton messageBoxButton = new JButton();
|
||||||
filesScrollPane = new JScrollPane();
|
JScrollPane filesScrollPane = new JScrollPane();
|
||||||
filesField = new JTextArea();
|
filesField = new JTextArea();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
@@ -650,14 +578,10 @@ public class FlatSystemFileChooserWindowsTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
private JLabel ownerLabel;
|
|
||||||
private JRadioButton ownerFrameRadioButton;
|
private JRadioButton ownerFrameRadioButton;
|
||||||
private JRadioButton ownerDialogRadioButton;
|
private JRadioButton ownerDialogRadioButton;
|
||||||
private JRadioButton ownerNullRadioButton;
|
private JRadioButton ownerNullRadioButton;
|
||||||
private JPanel ownerSpacer;
|
|
||||||
private JLabel titleLabel;
|
|
||||||
private JTextField titleField;
|
private JTextField titleField;
|
||||||
private JPanel panel1;
|
|
||||||
private FlatTriStateCheckBox overwritePromptCheckBox;
|
private FlatTriStateCheckBox overwritePromptCheckBox;
|
||||||
private FlatTriStateCheckBox pathMustExistCheckBox;
|
private FlatTriStateCheckBox pathMustExistCheckBox;
|
||||||
private FlatTriStateCheckBox noDereferenceLinksCheckBox;
|
private FlatTriStateCheckBox noDereferenceLinksCheckBox;
|
||||||
@@ -681,39 +605,18 @@ public class FlatSystemFileChooserWindowsTest
|
|||||||
private FlatTriStateCheckBox supportStreamableItemsCheckBox;
|
private FlatTriStateCheckBox supportStreamableItemsCheckBox;
|
||||||
private FlatTriStateCheckBox allowMultiSelectCheckBox;
|
private FlatTriStateCheckBox allowMultiSelectCheckBox;
|
||||||
private FlatTriStateCheckBox hidePinnedPlacesCheckBox;
|
private FlatTriStateCheckBox hidePinnedPlacesCheckBox;
|
||||||
private JPanel messageDialogPanel;
|
|
||||||
private JLabel messageLabel;
|
|
||||||
private JScrollPane messageScrollPane;
|
|
||||||
private JTextArea messageField;
|
private JTextArea messageField;
|
||||||
private JLabel buttonsLabel;
|
|
||||||
private JTextField buttonsField;
|
private JTextField buttonsField;
|
||||||
private JLabel okButtonLabelLabel;
|
|
||||||
private JTextField okButtonLabelField;
|
private JTextField okButtonLabelField;
|
||||||
private JLabel fileNameLabelLabel;
|
|
||||||
private JTextField fileNameLabelField;
|
private JTextField fileNameLabelField;
|
||||||
private JLabel fileNameLabel;
|
|
||||||
private JTextField fileNameField;
|
private JTextField fileNameField;
|
||||||
private JLabel folderLabel;
|
|
||||||
private JTextField folderField;
|
private JTextField folderField;
|
||||||
private JLabel saveAsItemLabel;
|
|
||||||
private JTextField saveAsItemField;
|
private JTextField saveAsItemField;
|
||||||
private JLabel defaultFolderLabel;
|
|
||||||
private JTextField defaultFolderField;
|
private JTextField defaultFolderField;
|
||||||
private JLabel defaultExtensionLabel;
|
|
||||||
private JTextField defaultExtensionField;
|
private JTextField defaultExtensionField;
|
||||||
private JLabel fileTypesLabel;
|
|
||||||
private JComboBox<String> fileTypesField;
|
private JComboBox<String> fileTypesField;
|
||||||
private JLabel fileTypeIndexLabel;
|
|
||||||
private JSlider fileTypeIndexSlider;
|
private JSlider fileTypeIndexSlider;
|
||||||
private JButton openButton;
|
|
||||||
private JButton saveButton;
|
|
||||||
private JButton openDirectButton;
|
|
||||||
private JButton saveDirectButton;
|
|
||||||
private JCheckBox showMessageDialogOnOKCheckBox;
|
private JCheckBox showMessageDialogOnOKCheckBox;
|
||||||
private JPanel hSpacer1;
|
|
||||||
private JButton messageDialogButton;
|
|
||||||
private JButton messageBoxButton;
|
|
||||||
private JScrollPane filesScrollPane;
|
|
||||||
private JTextArea filesField;
|
private JTextArea filesField;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ JFDML JFormDesigner: "8.3" encoding: "UTF-8"
|
|||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
root: new FormRoot {
|
root: new FormRoot {
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
|
}
|
||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[left][grow,fill][fill]"
|
"$columnConstraints": "[left][grow,fill][fill]"
|
||||||
@@ -20,6 +23,9 @@ new FormModel {
|
|||||||
"text": "JFrame"
|
"text": "JFrame"
|
||||||
"selected": true
|
"selected": true
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -27,6 +33,9 @@ new FormModel {
|
|||||||
name: "ownerDialogRadioButton"
|
name: "ownerDialogRadioButton"
|
||||||
"text": "JDialog"
|
"text": "JDialog"
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -34,6 +43,9 @@ new FormModel {
|
|||||||
name: "ownerNullRadioButton"
|
name: "ownerNullRadioButton"
|
||||||
"text": "null"
|
"text": "null"
|
||||||
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
"$buttonGroup": new FormReference( "ownerButtonGroup" )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
@@ -50,6 +62,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "titleField"
|
name: "titleField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 1"
|
"value": "cell 1 1"
|
||||||
} )
|
} )
|
||||||
@@ -62,54 +77,81 @@ new FormModel {
|
|||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "overwritePromptCheckBox"
|
name: "overwritePromptCheckBox"
|
||||||
"text": "overwritePrompt"
|
"text": "overwritePrompt"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 0"
|
"value": "cell 0 0"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "pathMustExistCheckBox"
|
name: "pathMustExistCheckBox"
|
||||||
"text": "pathMustExist"
|
"text": "pathMustExist"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "noDereferenceLinksCheckBox"
|
name: "noDereferenceLinksCheckBox"
|
||||||
"text": "noDereferenceLinks"
|
"text": "noDereferenceLinks"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0"
|
"value": "cell 2 0"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "strictFileTypesCheckBox"
|
name: "strictFileTypesCheckBox"
|
||||||
"text": "strictFileTypes"
|
"text": "strictFileTypes"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 1"
|
"value": "cell 0 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "fileMustExistCheckBox"
|
name: "fileMustExistCheckBox"
|
||||||
"text": "fileMustExist"
|
"text": "fileMustExist"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 1"
|
"value": "cell 1 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "okButtonNeedsInteractionCheckBox"
|
name: "okButtonNeedsInteractionCheckBox"
|
||||||
"text": "okButtonNeedsInteraction"
|
"text": "okButtonNeedsInteraction"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 1"
|
"value": "cell 2 1"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "noChangeDirCheckBox"
|
name: "noChangeDirCheckBox"
|
||||||
"text": "noChangeDir"
|
"text": "noChangeDir"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 2"
|
"value": "cell 0 2"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "createPromptCheckBox"
|
name: "createPromptCheckBox"
|
||||||
"text": "createPrompt"
|
"text": "createPrompt"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 2"
|
"value": "cell 1 2"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "dontAddToRecentCheckBox"
|
name: "dontAddToRecentCheckBox"
|
||||||
"text": "dontAddToRecent"
|
"text": "dontAddToRecent"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 2"
|
"value": "cell 2 2"
|
||||||
} )
|
} )
|
||||||
@@ -117,12 +159,18 @@ new FormModel {
|
|||||||
name: "pickFoldersCheckBox"
|
name: "pickFoldersCheckBox"
|
||||||
"text": "pickFolders"
|
"text": "pickFolders"
|
||||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 1, 0, false )
|
"font": new com.jformdesigner.model.SwingDerivedFont( null, 1, 0, false )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 3"
|
"value": "cell 0 3"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "shareAwareCheckBox"
|
name: "shareAwareCheckBox"
|
||||||
"text": "shareAware"
|
"text": "shareAware"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 3"
|
"value": "cell 1 3"
|
||||||
} )
|
} )
|
||||||
@@ -130,60 +178,90 @@ new FormModel {
|
|||||||
name: "forceShowHiddenCheckBox"
|
name: "forceShowHiddenCheckBox"
|
||||||
"text": "forceShowHidden"
|
"text": "forceShowHidden"
|
||||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 1, 0, false )
|
"font": new com.jformdesigner.model.SwingDerivedFont( null, 1, 0, false )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 3"
|
"value": "cell 2 3"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "forceFileSystemCheckBox"
|
name: "forceFileSystemCheckBox"
|
||||||
"text": "forceFileSystem"
|
"text": "forceFileSystem"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 4"
|
"value": "cell 0 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "noReadOnlyReturnCheckBox"
|
name: "noReadOnlyReturnCheckBox"
|
||||||
"text": "noReadOnlyReturn"
|
"text": "noReadOnlyReturn"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 4"
|
"value": "cell 1 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "defaultNoMiniModeCheckBox"
|
name: "defaultNoMiniModeCheckBox"
|
||||||
"text": "defaultNoMiniMode"
|
"text": "defaultNoMiniMode"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 4"
|
"value": "cell 2 4"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "allNonStorageItemsCheckBox"
|
name: "allNonStorageItemsCheckBox"
|
||||||
"text": "allNonStorageItems"
|
"text": "allNonStorageItems"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 5"
|
"value": "cell 0 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "noTestFileCreateCheckBox"
|
name: "noTestFileCreateCheckBox"
|
||||||
"text": "noTestFileCreate"
|
"text": "noTestFileCreate"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 5"
|
"value": "cell 1 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "forcePreviewPaneonCheckBox"
|
name: "forcePreviewPaneonCheckBox"
|
||||||
"text": "forcePreviewPaneon"
|
"text": "forcePreviewPaneon"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 5"
|
"value": "cell 2 5"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "noValidateCheckBox"
|
name: "noValidateCheckBox"
|
||||||
"text": "noValidate"
|
"text": "noValidate"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 6"
|
"value": "cell 0 6"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "hideMruPlacesCheckBox"
|
name: "hideMruPlacesCheckBox"
|
||||||
"text": "hideMruPlaces"
|
"text": "hideMruPlaces"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 6"
|
"value": "cell 1 6"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "supportStreamableItemsCheckBox"
|
name: "supportStreamableItemsCheckBox"
|
||||||
"text": "supportStreamableItems"
|
"text": "supportStreamableItems"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 6"
|
"value": "cell 2 6"
|
||||||
} )
|
} )
|
||||||
@@ -191,12 +269,18 @@ new FormModel {
|
|||||||
name: "allowMultiSelectCheckBox"
|
name: "allowMultiSelectCheckBox"
|
||||||
"text": "allowMultiSelect"
|
"text": "allowMultiSelect"
|
||||||
"font": new com.jformdesigner.model.SwingDerivedFont( null, 1, 0, false )
|
"font": new com.jformdesigner.model.SwingDerivedFont( null, 1, 0, false )
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 7"
|
"value": "cell 0 7"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
|
||||||
name: "hidePinnedPlacesCheckBox"
|
name: "hidePinnedPlacesCheckBox"
|
||||||
"text": "hidePinnedPlaces"
|
"text": "hidePinnedPlaces"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 7"
|
"value": "cell 1 7"
|
||||||
} )
|
} )
|
||||||
@@ -219,6 +303,9 @@ new FormModel {
|
|||||||
name: "messageField"
|
name: "messageField"
|
||||||
"columns": 40
|
"columns": 40
|
||||||
"rows": 4
|
"rows": 4
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0"
|
"value": "cell 1 0"
|
||||||
@@ -231,6 +318,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "buttonsField"
|
name: "buttonsField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 1"
|
"value": "cell 1 1"
|
||||||
} )
|
} )
|
||||||
@@ -248,6 +338,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "okButtonLabelField"
|
name: "okButtonLabelField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 2"
|
"value": "cell 1 2"
|
||||||
} )
|
} )
|
||||||
@@ -259,6 +352,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "fileNameLabelField"
|
name: "fileNameLabelField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 3"
|
"value": "cell 1 3"
|
||||||
} )
|
} )
|
||||||
@@ -270,6 +366,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "fileNameField"
|
name: "fileNameField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 4"
|
"value": "cell 1 4"
|
||||||
} )
|
} )
|
||||||
@@ -281,6 +380,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "folderField"
|
name: "folderField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 5"
|
"value": "cell 1 5"
|
||||||
} )
|
} )
|
||||||
@@ -292,6 +394,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "saveAsItemField"
|
name: "saveAsItemField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 6"
|
"value": "cell 1 6"
|
||||||
} )
|
} )
|
||||||
@@ -303,6 +408,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "defaultFolderField"
|
name: "defaultFolderField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 7"
|
"value": "cell 1 7"
|
||||||
} )
|
} )
|
||||||
@@ -314,6 +422,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "defaultExtensionField"
|
name: "defaultExtensionField"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 8"
|
"value": "cell 1 8"
|
||||||
} )
|
} )
|
||||||
@@ -333,6 +444,9 @@ new FormModel {
|
|||||||
addElement( "Text Files,*.txt,PDF Files,*.pdf,All Files,*.*" )
|
addElement( "Text Files,*.txt,PDF Files,*.pdf,All Files,*.*" )
|
||||||
addElement( "Text and PDF Files,*.txt;*.pdf" )
|
addElement( "Text and PDF Files,*.txt;*.pdf" )
|
||||||
}
|
}
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 9"
|
"value": "cell 1 9"
|
||||||
} )
|
} )
|
||||||
@@ -349,6 +463,9 @@ new FormModel {
|
|||||||
"value": 0
|
"value": 0
|
||||||
"paintLabels": true
|
"paintLabels": true
|
||||||
"snapToTicks": true
|
"snapToTicks": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 10"
|
"value": "cell 1 10"
|
||||||
} )
|
} )
|
||||||
@@ -383,6 +500,9 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
name: "showMessageDialogOnOKCheckBox"
|
name: "showMessageDialogOnOKCheckBox"
|
||||||
"text": "show message dialog on OK"
|
"text": "show message dialog on OK"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 11 3 1"
|
"value": "cell 0 11 3 1"
|
||||||
} )
|
} )
|
||||||
@@ -410,6 +530,9 @@ new FormModel {
|
|||||||
add( new FormComponent( "javax.swing.JTextArea" ) {
|
add( new FormComponent( "javax.swing.JTextArea" ) {
|
||||||
name: "filesField"
|
name: "filesField"
|
||||||
"rows": 8
|
"rows": 8
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 12 3 1,growx"
|
"value": "cell 0 12 3 1,growx"
|
||||||
|
|||||||
Reference in New Issue
Block a user