Minor cleanup of remote interface implementation

This commit is contained in:
hneemann 2016-12-17 17:42:12 +01:00
parent e9af552d91
commit 591be2c9cb

View File

@ -982,7 +982,6 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
//*********************** //***********************
private static class AddressPicker { private static class AddressPicker {
private long addr; private long addr;
private void getProgRomAddr(Model model) { private void getProgRomAddr(Model model) {
@ -1001,14 +1000,14 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
} }
} }
private void setDebug(boolean debug) throws RemoteException { private void setDebug(boolean debug) {
settings.set(Keys.SHOW_DATA_TABLE, debug); settings.set(Keys.SHOW_DATA_TABLE, debug);
} }
@Override @Override
public void start(File romHex) throws RemoteException { public void start(File romHex) throws RemoteException {
setDebug(false);
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
setDebug(false);
windowPosManager.closeAll(); windowPosManager.closeAll();
runModelState.enter(true, new RomLoader(romHex)); runModelState.enter(true, new RomLoader(romHex));
circuitComponent.hasChanged(); circuitComponent.hasChanged();
@ -1017,8 +1016,8 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
@Override @Override
public void debug(File romHex) throws RemoteException { public void debug(File romHex) throws RemoteException {
setDebug(true);
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
setDebug(true);
runModelState.enter(false, new RomLoader(romHex)); runModelState.enter(false, new RomLoader(romHex));
circuitComponent.hasChanged(); circuitComponent.hasChanged();
}); });