Subversion Repositories svn.mios

Compare Revisions

Ignore whitespace Rev 799 → Rev 800

/trunk/java/org/midibox/midi/gui/SysexSendReceiveDeviceManagerGUI.java
165,7 → 165,13
.elementAt(selectedTab));
}
}
 
public JTabbedPane getTabbedPane() {
return tabbedPane;
}
 
public void update(Observable observable, Object object) {
if (observable == sysexSendReceiveDeviceManager) {
createGUIs();
/trunk/java/org/midibox/midi/gui/SysexSendReceiveGUI.java
60,7 → 60,7
public class SysexSendReceiveGUI extends JPanel implements ActionListener,
ItemListener, ChangeListener, Observer {
 
public static String currentDirectory = "";
private static String currentDirectory = "";
 
private static JFileChooser fc = null;
 
89,7 → 89,7
sysexSendReceive.addObserver(this);
 
browseButton = new JButton("SysEx File", ImageLoader
.getImageIcon("browse.png"));
.getImageIcon("open.png"));
fileName = new JTextField();
fileName.setEditable(false);
browseButton.setActionCommand("browse");
216,11 → 216,9
gbc.gridy++;
mainPanel.add(receivePanel, gbc);
 
// add(controlButtonsPanel, BorderLayout.NORTH);
// add(mainPanel, BorderLayout.CENTER);
add(controlButtonsPanel, BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
 
add(new JLabel("*** TODO ***", JLabel.CENTER), BorderLayout.CENTER);
 
UIUpdate();
}
 
292,4 → 290,14
public SysexSendReceive getSysexSendReceive() {
return sysexSendReceive;
}
 
public static String getCurrentDirectory() {
return currentDirectory;
}
 
public static void setCurrentDirectory(String currentDirectory) {
SysexSendReceiveGUI.currentDirectory = currentDirectory;
}
}
/trunk/java/org/midibox/midi/xml/SysexSendReceiveXML.java
New file
0,0 → 1,25
package org.midibox.midi.xml;
 
import org.midibox.midi.SysexSendReceive;
import org.midibox.utils.xml.XMLUtils;
import org.w3c.dom.Node;
 
public class SysexSendReceiveXML extends XMLUtils {
 
public final static String TAG_ROOT_ELEMENT = "sysexSendReceive";
 
protected SysexSendReceive sysexSendReceive;
 
public SysexSendReceiveXML(SysexSendReceive sysexSendReceive,
String rootElementTag) {
 
super(rootElementTag);
 
this.sysexSendReceive = sysexSendReceive;
}
 
public void saveXML(Node node) {
 
super.saveXML(node);
}
}
/trunk/java/org/midibox/midi/xml/SysexSendReceiveDeviceManagerXML.java
New file
0,0 → 1,94
package org.midibox.midi.xml;
 
import java.util.Iterator;
import java.util.Vector;
 
import org.midibox.midi.SysexSendReceiveDevice;
import org.midibox.midi.SysexSendReceiveDeviceManager;
import org.midibox.utils.xml.XMLUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
 
public class SysexSendReceiveDeviceManagerXML extends XMLUtils {
 
public final static String TAG_ROOT_ELEMENT = "hexFileUploadDeviceManager";
 
public final static String TAG_HEX_FILE_UPLOAD_DEVICES = "hexFileUploadDevices";
 
protected SysexSendReceiveDeviceManager sysexSendReceiveDeviceManager;
 
public SysexSendReceiveDeviceManagerXML(
SysexSendReceiveDeviceManager sysexSendReceiveDeviceManager,
String rootElementTag) {
 
super(rootElementTag);
 
this.sysexSendReceiveDeviceManager = sysexSendReceiveDeviceManager;
 
addTag(TAG_HEX_FILE_UPLOAD_DEVICES);
addTag(SysexSendReceiveDeviceXML.TAG_ROOT_ELEMENT);
}
 
protected void parseElement(Element element) {
 
super.parseElement(element);
 
String name = element.getNodeName();
 
if (name == rootElementTag) {
 
} else if (name == TAG_HEX_FILE_UPLOAD_DEVICES) {
 
Iterator it = ((Vector) sysexSendReceiveDeviceManager
.getSysexSendReceiveDevices().clone()).iterator();
 
while (it.hasNext()) {
 
SysexSendReceiveDevice sysexSendReceiveDevice = (SysexSendReceiveDevice) it
.next();
 
sysexSendReceiveDeviceManager
.removeSysexSendReceiveDevice(sysexSendReceiveDevice);
}
 
} else if (name == SysexSendReceiveDeviceXML.TAG_ROOT_ELEMENT) {
 
SysexSendReceiveDevice sysexSendReceiveDevice = new SysexSendReceiveDevice(
element.getAttribute(SysexSendReceiveDeviceXML.ATTR_NAME));
 
SysexSendReceiveDeviceXML sysexSendReceiveDeviceXML = new SysexSendReceiveDeviceXML(
sysexSendReceiveDevice,
SysexSendReceiveDeviceXML.TAG_ROOT_ELEMENT);
 
sysexSendReceiveDeviceManager
.newSysexSendReceive();
 
sysexSendReceiveDeviceXML.loadXML(element);
}
}
 
public void saveXML(Node node) {
 
super.saveXML(node);
 
Element hexFileUploadDevicesElement = document
.createElement(TAG_HEX_FILE_UPLOAD_DEVICES);
 
rootElement.appendChild(hexFileUploadDevicesElement);
 
Iterator it = sysexSendReceiveDeviceManager.getSysexSendReceiveDevices()
.iterator();
 
while (it.hasNext()) {
 
SysexSendReceiveDevice sysexSendReceiveDevice = (SysexSendReceiveDevice) it
.next();
 
SysexSendReceiveDeviceXML hexFileUploadDeviceXML = new SysexSendReceiveDeviceXML(
sysexSendReceiveDevice,
SysexSendReceiveDeviceXML.TAG_ROOT_ELEMENT);
 
hexFileUploadDeviceXML.saveXML(hexFileUploadDevicesElement);
}
}
}
/trunk/java/org/midibox/midi/xml/SysexSendReceiveDeviceXML.java
New file
0,0 → 1,49
package org.midibox.midi.xml;
 
import org.midibox.midi.SysexSendReceiveDevice;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
 
public class SysexSendReceiveDeviceXML extends VirtualMidiDeviceXML {
 
protected SysexSendReceiveDevice sysexSendReceiveDevice;
 
public static final String TAG_ROOT_ELEMENT = "sysexSendReceiveDevice";
 
public SysexSendReceiveDeviceXML(SysexSendReceiveDevice sysexSendReceiveDevice,
String rootElementTag) {
 
super(sysexSendReceiveDevice, rootElementTag);
 
this.sysexSendReceiveDevice = sysexSendReceiveDevice;
 
addTag(SysexSendReceiveXML.TAG_ROOT_ELEMENT);
}
 
protected void parseElement(Element element) {
 
super.parseElement(element);
 
String name = element.getNodeName();
 
if (name == rootElementTag) {
 
SysexSendReceiveXML hexFileUploadXML = new SysexSendReceiveXML(
sysexSendReceiveDevice.getSysexSendReceive(),
SysexSendReceiveXML.TAG_ROOT_ELEMENT);
 
hexFileUploadXML.loadXML(element);
}
}
 
public void saveXML(Node node) {
 
super.saveXML(node);
 
SysexSendReceiveXML hexFileUploadXML = new SysexSendReceiveXML(
sysexSendReceiveDevice.getSysexSendReceive(),
SysexSendReceiveXML.TAG_ROOT_ELEMENT);
 
hexFileUploadXML.saveXML(rootElement);
}
}
/trunk/java/org/midibox/apps/miosstudio/MIOSStudio.java
34,6 → 34,8
import org.midibox.midi.MidiMonitorFiltered;
import org.midibox.midi.MidiMonitorFilteredDevice;
import org.midibox.midi.MidiRouterDevice;
import org.midibox.midi.SysexSendReceiveDevice;
import org.midibox.midi.SysexSendReceiveDeviceManager;
import org.midibox.mios.DebugFunctionDevice;
import org.midibox.mios.HexFileUploadDevice;
import org.midibox.mios.HexFileUploadDeviceManager;
86,9 → 88,7
 
// TODO: implement a manager for sysex sending and receing tasks
 
/*
* private SysexSendReceiveDeviceManager sysexSendReceiveDeviceManager;
*/
private SysexSendReceiveDeviceManager sysexSendReceiveDeviceManager;
 
private HexFileUploadDeviceManager hexFileUploadDeviceManager;
 
159,12 → 159,10
midiKeyboardControllerDevice = new MidiKeyboardControllerDevice(
"MIDI Keyboard Controller", 0);
 
/*
* sysexSendReceiveDeviceManager = new SysexSendReceiveDeviceManager();
* sysexSendReceiveDeviceManager.newSysexSendReceive();
* sysexSendReceiveDeviceManager.addObserver(this);
*/
sysexSendReceiveDeviceManager = new SysexSendReceiveDeviceManager();
 
sysexSendReceiveDeviceManager.addObserver(this);
 
hexFileUploadDeviceManager = new HexFileUploadDeviceManager();
 
hexFileUploadDeviceManager.addObserver(this);
188,15 → 186,15
// disable all messages by default, only allow pass SysEx
// user can enable other MIDI events again if required
 
miosTerminalFiltered.getMidiFilter().setVoiceMessages(false);
miosTerminalFiltered.getMidiFilter().setSystemCommonMessages(false);
miosTerminalFiltered.getMidiFilter().setVoiceMessages(false);
 
miosTerminalFiltered.getMidiFilter().setSystemRealtimeMessages(false);
miosTerminalFiltered.getMidiFilter().setSysexMessages(true);
miosTerminalFiltered.getMidiFilter().setSystemCommonMessages(false);
 
miosTerminalFiltered.getMidiFilter().setMetaMessages(false);
miosTerminalFiltered.getMidiFilter().setSystemRealtimeMessages(false);
 
miosTerminalFiltered.getMidiFilter().setSysexMessages(true);
 
miosTerminalFiltered.getMidiFilter().setMetaMessages(false);
}
 
public MidiDeviceManager getMidiDeviceManager() {
228,10 → 226,9
return midiKeyboardControllerDevice;
}
 
/*
* public SysexSendReceiveDeviceManager getSysexSendReceiveDeviceManager() {
* return sysexSendReceiveDeviceManager; }
*/
public SysexSendReceiveDeviceManager getSysexSendReceiveDeviceManager() {
return sysexSendReceiveDeviceManager;
}
 
public HexFileUploadDeviceManager getHexFileUploadDeviceManager() {
return hexFileUploadDeviceManager;
437,12 → 434,12
midiDeviceRouting.addMidiWriteDevice(midiKeyboardControllerDevice);
midiDeviceRouting.addMidiReadDevice(midiKeyboardControllerDevice);
 
/*
* midiDeviceRouting.addMidiReadDevices(sysexSendReceiveDeviceManager
* .getSysexSendReceiveDevices()); midiDeviceRouting.addMidiWriteDevices
* (sysexSendReceiveDeviceManager .getSysexSendReceiveDevices());
*/
midiDeviceRouting.addMidiReadDevices(sysexSendReceiveDeviceManager
.getSysexSendReceiveDevices());
 
midiDeviceRouting.addMidiWriteDevices(sysexSendReceiveDeviceManager
.getSysexSendReceiveDevices());
 
midiDeviceRouting.addMidiReadDevices(hexFileUploadDeviceManager
.getHexFileUploadDevices());
midiDeviceRouting.addMidiWriteDevices(hexFileUploadDeviceManager
481,20 → 478,30
midiKeyboardControllerDevice);
midiDeviceRouting.connectDevices(midiKeyboardControllerDevice,
miosStudioOutPort);
/*
* Iterator it = sysexSendReceiveDeviceManager
* .getSysexSendReceiveDevices().iterator(); while (it.hasNext()) {
* SysexSendReceiveDevice ssrt = (SysexSendReceiveDevice) it.next();
* midiDeviceRouting.connectDevices(miosStudioInPort, ssrt);
* midiDeviceRouting.connectDevices(ssrt, miosStudioOutPort); }
*/
Iterator it = hexFileUploadDeviceManager.getHexFileUploadDevices()
.iterator();
 
Iterator it = sysexSendReceiveDeviceManager
.getSysexSendReceiveDevices().iterator();
 
while (it.hasNext()) {
HexFileUploadDevice hutd = (HexFileUploadDevice) it.next();
midiDeviceRouting.connectDevices(miosStudioInPort, hutd);
midiDeviceRouting.connectDevices(hutd, miosStudioOutPort);
SysexSendReceiveDevice sysexSendReceiveDevice = (SysexSendReceiveDevice) it
.next();
midiDeviceRouting.connectDevices(miosStudioInPort,
sysexSendReceiveDevice);
midiDeviceRouting.connectDevices(sysexSendReceiveDevice,
miosStudioOutPort);
}
 
it = hexFileUploadDeviceManager.getHexFileUploadDevices().iterator();
 
while (it.hasNext()) {
HexFileUploadDevice hexFileUploadDevice = (HexFileUploadDevice) it
.next();
midiDeviceRouting.connectDevices(miosStudioInPort,
hexFileUploadDevice);
midiDeviceRouting.connectDevices(hexFileUploadDevice,
miosStudioOutPort);
}
 
/*
* midiDeviceRouting.connectDevices(miosStudioInPort,
* memoryReadWriteDevice);
529,7 → 536,25
 
setRouteIndividualDevices(routeIndividualDevices);
}
if (observable == sysexSendReceiveDeviceManager) {
 
SysexSendReceiveDevice sysexSendReceiveDevice = (SysexSendReceiveDevice) object;
 
if (sysexSendReceiveDeviceManager.getSysexSendReceiveDevices().contains(
sysexSendReceiveDevice)) {
 
midiDeviceRouting.connectDevices(miosStudioInPort,
sysexSendReceiveDevice);
midiDeviceRouting.connectDevices(sysexSendReceiveDevice,
miosStudioOutPort);
} else {
midiDeviceRouting.disconnectDevice(sysexSendReceiveDevice);
}
 
setRouteIndividualDevices(routeIndividualDevices);
}
 
if (observable == midiDeviceManager) {
 
MidiDevice midiDevice = (MidiDevice) object;
/trunk/java/org/midibox/apps/miosstudio/xml/MIOSStudioXML.java
7,6 → 7,7
import org.midibox.midi.xml.MidiFilterDeviceXML;
import org.midibox.midi.xml.MidiKeyboardControllerDeviceXML;
import org.midibox.midi.xml.MidiMonitorFilteredDeviceXML;
import org.midibox.midi.xml.SysexSendReceiveDeviceManagerXML;
import org.midibox.mios.xml.DebugFunctionDeviceXML;
import org.midibox.mios.xml.HexFileUploadDeviceManagerXML;
import org.midibox.mios.xml.LCDMessageDeviceXML;
29,6 → 30,8
public static final String TAG_OUT_PORT_MIDI_MONITOR_FILTERED_DEVICE = "outPortMidiMonitorFilteredDevice";
 
public static final String TAG_MIDI_KEYBOARD_CONTROLLER_DEVICE = "midiKeyboardControllerDevice";
public static final String TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER = "sysexSendReciveDeviceManager";
 
public static final String TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER = "hexFileUploadDeviceManager";
 
58,6 → 61,7
addTag(TAG_OUT_PORT_MIDI_MONITOR_FILTERED_DEVICE);
addTag(TAG_IN_PORT_MIDI_MONITOR_FILTERED_DEVICE);
addTag(TAG_MIDI_KEYBOARD_CONTROLLER_DEVICE);
addTag(TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER);
addTag(TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER);
addTag(TAG_LCD_MESSAGE_DEVICE);
addTag(TAG_DEBUG_FUNCTION_DEVICE);
126,6 → 130,14
 
midiKeyboardControllerDeviceXML.loadXML(element);
 
} else if (name == TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER) {
 
SysexSendReceiveDeviceManagerXML sysexSendReceiveDeviceManagerXML = new SysexSendReceiveDeviceManagerXML(
miosStudio.getSysexSendReceiveDeviceManager(),
TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER);
 
sysexSendReceiveDeviceManagerXML.loadXML(element);
 
} else if (name == TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER) {
 
HexFileUploadDeviceManagerXML hexFileUploadDeviceManagerXML = new HexFileUploadDeviceManagerXML(
229,6 → 241,12
TAG_MIDI_KEYBOARD_CONTROLLER_DEVICE);
 
midiControllerDeviceXML.saveXML(rootElement);
SysexSendReceiveDeviceManagerXML sysexSendReceiveDeviceManagerXML = new SysexSendReceiveDeviceManagerXML(
miosStudio.getSysexSendReceiveDeviceManager(),
TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER);
 
sysexSendReceiveDeviceManagerXML.saveXML(rootElement);
}
 
protected void saveMIOSXML(MIOSStudio miosStudio) {
/trunk/java/org/midibox/apps/miosstudio/gui/xml/MIOSStudioGUIXML.java
13,6 → 13,7
import org.midibox.apps.miosstudio.gui.MIOSStudioGUI.ExternalCommandButton;
import org.midibox.apps.miosstudio.xml.MIOSStudioXML;
import org.midibox.midi.gui.MidiFilterGUI;
import org.midibox.midi.gui.SysexSendReceiveGUI;
import org.midibox.mios.gui.HexFileUploadGUI;
import org.midibox.utils.gui.DialogOwner;
import org.midibox.utils.xml.XMLUtils;
45,6 → 46,10
 
public final static String TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY = "hexFileUploadGUICurrentDirectory";
 
public final static String TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER_GUI = "sysexSendReceiveDeviceManagerGUI";
 
public final static String TAG_SYSEX_SEND_RECEIVE_GUI_CURRENT_DIRECTORY = "sysexSendReceiveGUICurrentDirectory";
 
public final static String TAG_WORKSPACE_MRU_LIST = "workspaceMRUList";
 
public final static String TAG_WORKSPACE_MRU = "workspaceMRU";
53,6 → 58,10
 
public final static String TAG_MIDI_FILTER_GUI_MRU = "midiFilterGUIMRU";
 
public final static String TAG_SYSEX_SEND_RECEIVE_GUI_MRU_LIST = "sysexSendReceiveGUIMRUList";
 
public final static String TAG_SYSEX_SEND_RECEIVE_GUI_MRU = "sysexSendReceiveGUIMRU";
 
public final static String TAG_HEX_FILE_UPLOAD_GUI_MRU_LIST = "hexFileUploadGUIMRUList";
 
public final static String TAG_HEX_FILE_UPLOAD_GUI_MRU = "hexFileUploadGUIMRU";
142,6 → 151,7
 
addTag(TAG_MAIN_WINDOW);
addTag(TAG_INTERNAL_FRAMES);
addTag(TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER_GUI);
addTag(TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER_GUI);
}
 
165,6 → 175,9
addTag(TAG_MIDI_FILTER_GUI_CURRENT_DIRECTORY);
addTag(TAG_MIDI_FILTER_GUI_MRU_LIST);
addTag(TAG_MIDI_FILTER_GUI_MRU);
addTag(TAG_SYSEX_SEND_RECEIVE_GUI_CURRENT_DIRECTORY);
addTag(TAG_SYSEX_SEND_RECEIVE_GUI_MRU_LIST);
addTag(TAG_SYSEX_SEND_RECEIVE_GUI_MRU);
addTag(TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY);
addTag(TAG_HEX_FILE_UPLOAD_GUI_MRU_LIST);
addTag(TAG_HEX_FILE_UPLOAD_GUI_MRU);
327,6 → 340,22
 
MidiFilterGUI.setCurrentDirectory(element.getTextContent());
 
} else if (name == TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER_GUI) {
int tabIndex = stringToInt(element.getAttribute(ATTR_SELECTED_TAB));
 
if (tabIndex < miosStudioGUI.getSysexSendReceiveDeviceManagerGUI()
.getTabbedPane().getTabCount()) {
 
miosStudioGUI.getSysexSendReceiveDeviceManagerGUI()
.getTabbedPane().setSelectedIndex(tabIndex);
 
}
 
} else if (name == TAG_SYSEX_SEND_RECEIVE_GUI_CURRENT_DIRECTORY) {
 
SysexSendReceiveGUI.setCurrentDirectory(element.getTextContent());
 
} else if (name == TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER_GUI) {
 
int tabIndex = stringToInt(element.getAttribute(ATTR_SELECTED_TAB));
373,6 → 402,8
 
super.saveXML(node);
 
Element sysexSendReceiveDeviceManagerGUIelement = null;
 
Element hexFileUploadDeviceManagerGUIelement = null;
 
if (includeModel) {
456,6 → 487,16
saveInternalFrame(internalFrame, internalFrameElement);
}
 
sysexSendReceiveDeviceManagerGUIelement = document
.createElement(TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER_GUI);
 
rootElement.appendChild(sysexSendReceiveDeviceManagerGUIelement);
 
sysexSendReceiveDeviceManagerGUIelement.setAttribute(
ATTR_SELECTED_TAB, intToString(miosStudioGUI
.getSysexSendReceiveDeviceManagerGUI()
.getTabbedPane().getSelectedIndex()));
 
hexFileUploadDeviceManagerGUIelement = document
.createElement(TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER_GUI);
 
497,6 → 538,23
 
if (includeMRU) {
 
Element sysexSendReceiveCurrentDirectoryElement = document
.createElement(TAG_SYSEX_SEND_RECEIVE_GUI_CURRENT_DIRECTORY);
 
if (sysexSendReceiveDeviceManagerGUIelement == null) {
sysexSendReceiveDeviceManagerGUIelement = document
.createElement(TAG_SYSEX_SEND_RECEIVE_DEVICE_MANAGER_GUI);
 
rootElement
.appendChild(sysexSendReceiveDeviceManagerGUIelement);
}
 
sysexSendReceiveDeviceManagerGUIelement
.appendChild(sysexSendReceiveCurrentDirectoryElement);
 
sysexSendReceiveCurrentDirectoryElement
.setTextContent(SysexSendReceiveGUI.getCurrentDirectory());
 
Element hexFileCurrentDirectoryElement = document
.createElement(TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY);
 
/trunk/java/org/midibox/apps/miosstudio/gui/MIOSStudioGUI.java
66,7 → 66,6
import javax.swing.JSeparator;
import javax.swing.JTextField;
import javax.swing.JToolBar;
import javax.swing.KeyStroke;
import javax.swing.UIManager;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
86,6 → 85,7
import org.midibox.midi.gui.MidiFilterGUI;
import org.midibox.midi.gui.MidiKeyboardControllerGUI;
import org.midibox.midi.gui.MidiMonitorFilteredGUI;
import org.midibox.midi.gui.SysexSendReceiveDeviceManagerGUI;
import org.midibox.mios.HexFileUploadDevice;
import org.midibox.mios.gui.DebugFunctionGUI;
import org.midibox.mios.gui.HexFileUploadDeviceManagerGUI;
131,13 → 131,10
 
private MIOSStudioInternalFrame midiKeyboardControllerWindow;
 
/*
* private SysexSendReceiveDeviceManagerGUI
* sysexSendReceiveDeviceManagerGUI;
*
* private MIOSStudioInternalFrame sysexSendReceiveDeviceManagerWindow;
*/
private SysexSendReceiveDeviceManagerGUI sysexSendReceiveDeviceManagerGUI;
 
private MIOSStudioInternalFrame sysexSendReceiveDeviceManagerWindow;
 
private HexFileUploadDeviceManagerGUI hexFileUploadDeviceManagerGUI;
 
private MIOSStudioInternalFrame hexFileUploadDeviceManagerWindow;
380,20 → 377,20
MidiKeyboardControllerDevice.class, icon);
 
// Sysex Send/Receive
/*
* sysexSendReceiveDeviceManagerGUI = new
* SysexSendReceiveDeviceManagerGUI(
* miosStudio.getSysexSendReceiveDeviceManager());
*
* icon = ImageLoader.getImageIcon("sysex.png");
*
* sysexSendReceiveDeviceManagerWindow = new MIOSStudioInternalFrame(
* "Sysex Send/Receive", true, true, true, true, icon,
* sysexSendReceiveDeviceManagerGUI);
*
* sysexSendReceiveDeviceManagerWindow.pack();
*/
 
sysexSendReceiveDeviceManagerGUI = new SysexSendReceiveDeviceManagerGUI(
miosStudio.getSysexSendReceiveDeviceManager());
 
icon = ImageLoader.getImageIcon("sysex.png");
 
sysexSendReceiveDeviceManagerWindow = new MIOSStudioInternalFrame(
"Sysex Send/Receive", true, true, true, true, icon,
sysexSendReceiveDeviceManagerGUI);
 
sysexSendReceiveDeviceManagerWindow.pack();
 
internalFrames.add(sysexSendReceiveDeviceManagerWindow);
 
midiDeviceRoutingGUI.addMidiDeviceIcon(SysexSendReceiveDevice.class,
icon);
 
501,7 → 498,6
protected void createFileMenu() {
 
fileMenu = new JMenu("File");
fileMenu.setMnemonic(KeyEvent.VK_F);
 
JMenuItem menuItem = new JMenuItem("Open Workspace");
menuItem.setActionCommand("open_workspace");
520,91 → 516,58
 
protected void createMIDIMenu() {
midiMenu = new JMenu("MIDI");
midiMenu.setMnemonic(KeyEvent.VK_M);
 
JMenuItem menuItem = new JMenuItem("MIDI Devices");
menuItem.setMnemonic(KeyEvent.VK_M);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("midi_devices");
menuItem.addActionListener(this);
midiMenu.add(menuItem);
 
menuItem = new JMenuItem("MIDI Filters");
menuItem.setMnemonic(KeyEvent.VK_F);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("midi_filters");
menuItem.addActionListener(this);
midiMenu.add(menuItem);
 
menuItem = new JMenuItem("MIDI Monitor: OUT");
menuItem.setMnemonic(KeyEvent.VK_O);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("midi_out_port_monitor");
menuItem.addActionListener(this);
midiMenu.add(menuItem);
 
menuItem = new JMenuItem("MIDI Monitor: IN");
menuItem.setMnemonic(KeyEvent.VK_I);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("midi_in_port_monitor");
menuItem.addActionListener(this);
midiMenu.add(menuItem);
 
menuItem = new JMenuItem("MIDI Keyboard Controller");
menuItem.setMnemonic(KeyEvent.VK_K);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_K,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("piano_controller");
menuItem.addActionListener(this);
midiMenu.add(menuItem);
 
/*
* menuItem = new JMenuItem("Sysex Send/Recieve");
* menuItem.setMnemonic(KeyEvent.VK_S);
* menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,
* ActionEvent.CTRL_MASK)); menuItem.setActionCommand("sysex");
* menuItem.addActionListener(this); menu.add(menuItem);
*/
 
menuItem = new JMenuItem("Sysex Send/Recieve");
menuItem.setActionCommand("sysex");
menuItem.addActionListener(this);
midiMenu.add(menuItem);
}
 
protected void createMIOSMenu() {
 
miosMenu = new JMenu("MIOS");
miosMenu.setMnemonic(KeyEvent.VK_O);
 
JMenuItem menuItem = new JMenuItem("MIOS Hex File Upload");
menuItem.setMnemonic(KeyEvent.VK_U);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_U,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("open_hex_file");
menuItem.addActionListener(this);
miosMenu.add(menuItem);
 
menuItem = new JMenuItem("MIOS LCD Message");
menuItem.setMnemonic(KeyEvent.VK_L);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_L,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("lcd_message");
menuItem.addActionListener(this);
miosMenu.add(menuItem);
 
menuItem = new JMenuItem("MIOS Debug Functions");
menuItem.setMnemonic(KeyEvent.VK_D);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("debug_functions");
menuItem.addActionListener(this);
miosMenu.add(menuItem);
 
menuItem = new JMenuItem("MIOS Terminal");
menuItem.setMnemonic(KeyEvent.VK_T);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("mios_terminal");
menuItem.addActionListener(this);
miosMenu.add(menuItem);
613,12 → 576,8
protected void createOptionsMenu() {
 
optionsMenu = new JMenu("Options");
optionsMenu.setMnemonic(KeyEvent.VK_P);
 
JMenuItem menuItem = new JMenuItem("MIDI Device Routing");
menuItem.setMnemonic(KeyEvent.VK_R);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("midi_routing");
menuItem.addActionListener(this);
optionsMenu.add(menuItem);
698,6 → 657,10
toolBar.setVisible(true);
}
 
public SysexSendReceiveDeviceManagerGUI getSysexSendReceiveDeviceManagerGUI() {
return sysexSendReceiveDeviceManagerGUI;
}
 
public HexFileUploadDeviceManagerGUI getHexFileUploadDeviceManagerGUI() {
return hexFileUploadDeviceManagerGUI;
}
870,13 → 833,12
button.setMargin(insets);
toolBar.add(button);
 
/*
* button = new JButton(ImageLoader.getImageIcon("sysex.png"));
* button.setToolTipText("Sysex Send/Receive");
* button.setActionCommand("sysex"); button.addActionListener(this);
* button.setMargin(insets); toolBar.add(button);
*/
 
button = new JButton(ImageLoader.getImageIcon("sysex.png"));
button.setToolTipText("Sysex Send/Receive");
button.setActionCommand("sysex");
button.addActionListener(this);
button.setMargin(insets);
toolBar.add(button);
}
 
protected void createMIOSButtons() {
1496,6 → 1458,9
} else if (ae.getActionCommand().equals("piano_controller")) {
showFrame(midiKeyboardControllerWindow);
 
} else if (ae.getActionCommand().equals("sysex")) {
showFrame(sysexSendReceiveDeviceManagerWindow);
 
} else if (ae.getActionCommand().equals("open_hex_file")) {
showFrame(hexFileUploadDeviceManagerWindow);
 
/trunk/java/org/midibox/apps/miosstudiosid/gui/MIOSStudioSIDGUI.java
2,7 → 2,6
 
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.util.Observable;
import java.util.Observer;
 
9,7 → 8,6
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JMenuItem;
import javax.swing.KeyStroke;
 
import org.midibox.apps.miosstudio.gui.MIOSStudioGUI;
import org.midibox.apps.miosstudiosid.MIOSStudioSID;
64,9 → 62,6
super.createMIOSMenu();
 
JMenuItem menuItem = new JMenuItem("SID V2 Editor");
menuItem.setMnemonic(KeyEvent.VK_E);
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E,
ActionEvent.CTRL_MASK));
menuItem.setActionCommand("sidv2_librarian");
menuItem.addActionListener(this);
miosMenu.add(menuItem);