|
|
@ -8,6 +8,7 @@ import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
import com.fr.design.gui.ifilechooser.UINativeFileChooser; |
|
|
|
import com.fr.design.gui.ifilechooser.UINativeFileChooser; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
|
|
|
import com.fr.design.os.impl.SupportOSImpl; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
import com.fr.form.share.SharableWidgetProvider; |
|
|
|
import com.fr.form.share.SharableWidgetProvider; |
|
|
|
import com.fr.form.share.ShareLoader; |
|
|
|
import com.fr.form.share.ShareLoader; |
|
|
@ -17,9 +18,20 @@ import com.fr.share.ShareConstants; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
|
|
|
import javax.swing.DefaultComboBoxModel; |
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
|
|
|
import javax.swing.JFileChooser; |
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.JScrollPane; |
|
|
|
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
import javax.swing.filechooser.FileNameExtensionFilter; |
|
|
|
import javax.swing.filechooser.FileNameExtensionFilter; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Desktop; |
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ItemEvent; |
|
|
|
import java.awt.event.ItemEvent; |
|
|
@ -323,18 +335,30 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
new ActionListener() { |
|
|
|
new ActionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
UINativeFileChooser fileChooser = new UINativeFileChooser(); |
|
|
|
if (SupportOSImpl.NATIVE_CHOOSER.support()) { |
|
|
|
fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); |
|
|
|
UINativeFileChooser nativeFileChooser = new UINativeFileChooser(); |
|
|
|
fileChooser.setMultiSelectionEnabled(true); |
|
|
|
nativeFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); |
|
|
|
FileNameExtensionFilter extensionFilter = new FileNameExtensionFilter(".reu", "reu"); |
|
|
|
nativeFileChooser.setMultiSelectionEnabled(true); |
|
|
|
fileChooser.setFileFilter(extensionFilter); |
|
|
|
nativeFileChooser.setExtensionFilter("*.reu"); |
|
|
|
fileChooser.setExtensionFilter("*.reu"); |
|
|
|
nativeFileChooser.setDialogTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); |
|
|
|
fileChooser.setDialogTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); |
|
|
|
int returnValue = nativeFileChooser.showOpenDialog(new UILabel()); |
|
|
|
int returnValue = fileChooser.showOpenDialog(new UILabel()); |
|
|
|
if (returnValue == JFileChooser.APPROVE_OPTION) { |
|
|
|
if (returnValue == JFileChooser.APPROVE_OPTION) { |
|
|
|
final File[] chosenFiles = nativeFileChooser.getSelectedFiles(); |
|
|
|
final File[] chosenFiles = fileChooser.getSelectedFiles(); |
|
|
|
for (File file : chosenFiles) { |
|
|
|
for (File file : chosenFiles) { |
|
|
|
installFromDiskZipFile(file); |
|
|
|
installFromDiskZipFile(file); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
JFileChooser fileChooser = new JFileChooser(); |
|
|
|
|
|
|
|
fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); |
|
|
|
|
|
|
|
fileChooser.setMultiSelectionEnabled(true); |
|
|
|
|
|
|
|
fileChooser.setFileFilter(new FileNameExtensionFilter(".reu", "reu")); |
|
|
|
|
|
|
|
int returnValue = fileChooser.showDialog(new UILabel(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); |
|
|
|
|
|
|
|
if (returnValue == JFileChooser.APPROVE_OPTION) { |
|
|
|
|
|
|
|
final File[] chosenFiles = fileChooser.getSelectedFiles(); |
|
|
|
|
|
|
|
for (File file : chosenFiles) { |
|
|
|
|
|
|
|
installFromDiskZipFile(file); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|