mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-30 16:30:04 -04:00
fixed some checkstyle issues
This commit is contained in:
parent
0e5c03326a
commit
2b166795ee
@ -65,7 +65,7 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
|||||||
private static final ArrayList<Key> ATTR_LIST = new ArrayList<>();
|
private static final ArrayList<Key> ATTR_LIST = new ArrayList<>();
|
||||||
private static boolean experimental;
|
private static boolean experimental;
|
||||||
|
|
||||||
private static File LAST_EXPORT_DIRECTORY;
|
private static File lastExportDirectory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if experimental features are enabled
|
* @return true if experimental features are enabled
|
||||||
@ -920,13 +920,13 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
|||||||
if (filename != null)
|
if (filename != null)
|
||||||
fc.setSelectedFile(checkSuffix(filename, suffix));
|
fc.setSelectedFile(checkSuffix(filename, suffix));
|
||||||
|
|
||||||
if (LAST_EXPORT_DIRECTORY != null)
|
if (lastExportDirectory != null)
|
||||||
fc.setCurrentDirectory(LAST_EXPORT_DIRECTORY);
|
fc.setCurrentDirectory(lastExportDirectory);
|
||||||
|
|
||||||
fc.addChoosableFileFilter(new FileNameExtensionFilter(name, suffix));
|
fc.addChoosableFileFilter(new FileNameExtensionFilter(name, suffix));
|
||||||
if (fc.showSaveDialog(Main.this) == JFileChooser.APPROVE_OPTION) {
|
if (fc.showSaveDialog(Main.this) == JFileChooser.APPROVE_OPTION) {
|
||||||
|
|
||||||
LAST_EXPORT_DIRECTORY=fc.getSelectedFile().getParentFile();
|
lastExportDirectory =fc.getSelectedFile().getParentFile();
|
||||||
|
|
||||||
try (OutputStream out = new FileOutputStream(checkSuffix(fc.getSelectedFile(), suffix))) {
|
try (OutputStream out = new FileOutputStream(checkSuffix(fc.getSelectedFile(), suffix))) {
|
||||||
new Export(circuitComponent.getCircuit(), exportFactory).export(out);
|
new Export(circuitComponent.getCircuit(), exportFactory).export(out);
|
||||||
|
@ -2,13 +2,11 @@ package de.neemann.digital.gui.components;
|
|||||||
|
|
||||||
import de.neemann.digital.core.element.ElementAttributes;
|
import de.neemann.digital.core.element.ElementAttributes;
|
||||||
import de.neemann.digital.core.element.ElementTypeDescription;
|
import de.neemann.digital.core.element.ElementTypeDescription;
|
||||||
import de.neemann.digital.core.element.Key;
|
|
||||||
import de.neemann.digital.lang.Lang;
|
import de.neemann.digital.lang.Lang;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple Dialog to show an elements help text.
|
* Simple Dialog to show an elements help text.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user