-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature-315' of github.com:emustudio/emuStudio into fea…
…ture-314 Conflicts: plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/MemoryGui.java plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/DumpMemoryAction.java plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/GotoAddressAction.java plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/LoadImageAction.java plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/find_sequence/PerformFindSequenceAction.java plugins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/loaders/Loader.java
- Loading branch information
Showing
11 changed files
with
288 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
166 changes: 65 additions & 101 deletions
166
...ins/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/MemoryGui.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...e-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/AsciiModeAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* This file is part of emuStudio. | ||
* | ||
* Copyright (C) 2006-2023 Peter Jakubčo | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package net.emustudio.plugins.memory.bytemem.gui.actions; | ||
|
||
import net.emustudio.plugins.memory.bytemem.gui.model.MemoryTableModel; | ||
|
||
import javax.swing.*; | ||
import java.awt.event.ActionEvent; | ||
import java.util.Objects; | ||
|
||
public class AsciiModeAction extends AbstractAction { | ||
private final static String ICON_FILE = "/net/emustudio/plugins/memory/bytemem/gui/ascii-mode.png"; | ||
private final MemoryTableModel tableModel; | ||
private final JToggleButton btnAsciiMode; | ||
|
||
public AsciiModeAction(MemoryTableModel tableModel, JToggleButton btnAsciiMode) { | ||
super("Toggle ASCII mode", new ImageIcon(AsciiModeAction.class.getResource(ICON_FILE))); | ||
this.tableModel = Objects.requireNonNull(tableModel); | ||
this.btnAsciiMode = Objects.requireNonNull(btnAsciiMode); | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
tableModel.setAsciiMode(btnAsciiMode.isSelected()); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/DumpMemoryAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/EraseMemoryAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* This file is part of emuStudio. | ||
* | ||
* Copyright (C) 2006-2023 Peter Jakubčo | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package net.emustudio.plugins.memory.bytemem.gui.actions; | ||
|
||
import net.emustudio.plugins.memory.bytemem.MemoryContextImpl; | ||
import net.emustudio.plugins.memory.bytemem.gui.model.MemoryTableModel; | ||
|
||
import javax.swing.*; | ||
import java.awt.event.ActionEvent; | ||
import java.util.Objects; | ||
|
||
public class EraseMemoryAction extends AbstractAction { | ||
private final static String ICON_FILE = "/net/emustudio/plugins/memory/bytemem/gui/edit-clear.png"; | ||
private final MemoryTableModel tableModel; | ||
private final MemoryContextImpl context; | ||
|
||
public EraseMemoryAction(MemoryTableModel tableModel, MemoryContextImpl context) { | ||
super("Erase memory", new ImageIcon(EraseMemoryAction.class.getResource(ICON_FILE))); | ||
this.tableModel = Objects.requireNonNull(tableModel); | ||
this.context = Objects.requireNonNull(context); | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
context.clear(); | ||
tableModel.fireTableDataChanged(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/GotoAddressAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...e-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/LoadImageAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...te-mem/src/main/java/net/emustudio/plugins/memory/bytemem/gui/actions/SettingsAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* This file is part of emuStudio. | ||
* | ||
* Copyright (C) 2006-2023 Peter Jakubčo | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package net.emustudio.plugins.memory.bytemem.gui.actions; | ||
|
||
import net.emustudio.emulib.runtime.interaction.Dialogs; | ||
import net.emustudio.emulib.runtime.settings.PluginSettings; | ||
import net.emustudio.plugins.memory.bytemem.MemoryContextImpl; | ||
import net.emustudio.plugins.memory.bytemem.MemoryImpl; | ||
import net.emustudio.plugins.memory.bytemem.gui.SettingsDialog; | ||
import net.emustudio.plugins.memory.bytemem.gui.model.TableMemory; | ||
|
||
import javax.swing.*; | ||
import java.awt.event.ActionEvent; | ||
import java.util.Objects; | ||
|
||
public class SettingsAction extends AbstractAction { | ||
private final static String ICON_FILE = "/net/emustudio/plugins/memory/bytemem/gui/preferences-system.png"; | ||
private final Dialogs dialogs; | ||
private final JDialog parent; | ||
private final MemoryContextImpl context; | ||
private final MemoryImpl memory; | ||
private final TableMemory table; | ||
private final PluginSettings settings; | ||
|
||
public SettingsAction(Dialogs dialogs, JDialog parent, MemoryImpl memory, MemoryContextImpl context, | ||
TableMemory table, PluginSettings settings) { | ||
super("Erase memory", new ImageIcon(SettingsAction.class.getResource(ICON_FILE))); | ||
this.memory = Objects.requireNonNull(memory); | ||
this.context = Objects.requireNonNull(context); | ||
this.table = Objects.requireNonNull(table); | ||
this.settings = Objects.requireNonNull(settings); | ||
this.dialogs = Objects.requireNonNull(dialogs); | ||
this.parent = Objects.requireNonNull(parent); | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
new SettingsDialog(parent, memory, context, table, settings, dialogs).setVisible(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...ns/memory/byte-mem/src/main/java/net/emustudio/plugins/memory/bytemem/loaders/Loader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters