Subversion Repositories svn.mios

Compare Revisions

Ignore whitespace Rev 755 → Rev 756

/trunk/java/org/midibox/apps/miosstudio/gui/xml/MIOSStudioGUIXML.java
44,17 → 44,17
public final static String TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER_GUI = "hexFileUploadDeviceManagerGUI";
 
public final static String TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY = "hexFileUploadGUICurrentDirectory";
 
public final static String TAG_WORKSPACE_MRU_LIST = "workspaceMRUList";
 
public final static String TAG_WORKSPACE_MRU = "workspaceMRU";
 
public final static String TAG_MIDI_FILTER_GUI_MRU_LIST = "midiFilterGUIMRUList";
 
public final static String TAG_MIDI_FILTER_GUI_MRU = "midiFilterGUIMRU";
 
public final static String TAG_HEX_FILE_UPLOAD_GUI_MRU_LIST = "hexFileUploadGUIMRUList";
 
public final static String TAG_HEX_FILE_UPLOAD_GUI_MRU = "hexFileUploadGUIMRU";
 
public final static String ATTR_TITLE = "title";
86,13 → 86,14
protected boolean includeModel;
 
protected boolean includeGUI;
 
protected boolean includeMRU;
 
public MIOSStudioGUIXML(MIOSStudio miosStudio, String rootElementTag,
boolean includeModel, boolean includeGUI, boolean includeMRU) {
 
this(null, miosStudio, rootElementTag, includeModel, includeGUI, includeMRU);
this(null, miosStudio, rootElementTag, includeModel, includeGUI,
includeMRU);
}
 
public MIOSStudioGUIXML(MIOSStudioGUI miosStudioGUI, String rootElementTag,
103,7 → 104,8
}
 
public MIOSStudioGUIXML(MIOSStudioGUI miosStudioGUI, MIOSStudio miosStudio,
String rootElementTag, boolean includeModel, boolean includeGUI, boolean includeMRU) {
String rootElementTag, boolean includeModel, boolean includeGUI,
boolean includeMRU) {
 
super(rootElementTag);
 
114,7 → 116,7
this.includeModel = includeModel;
 
this.includeGUI = includeGUI;
 
this.includeMRU = includeMRU;
 
if (includeModel) {
129,19 → 131,19
addTag(TAG_INTERNAL_FRAMES);
addTag(TAG_EXTERNAL_COMMANDS);
addTag(TAG_EXTERNAL_COMMAND);
addTag(TAG_WORKSPACE_CURRENT_DIRECTORY);
addTag(TAG_MIDI_FILTER_DEVICE_MANAGER_GUI);
addTag(TAG_MIDI_FILTER_GUI_CURRENT_DIRECTORY);
addTag(TAG_HEX_FILE_UPLOAD_DEVICE_MANAGER_GUI);
addTag(TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY);
}
 
if (includeMRU) {
 
addTag(TAG_WORKSPACE_CURRENT_DIRECTORY);
addTag(TAG_WORKSPACE_MRU_LIST);
addTag(TAG_WORKSPACE_MRU);
addTag(TAG_MIDI_FILTER_DEVICE_MANAGER_GUI);
addTag(TAG_MIDI_FILTER_GUI_CURRENT_DIRECTORY);
addTag(TAG_MIDI_FILTER_GUI_MRU_LIST);
addTag(TAG_MIDI_FILTER_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);
}
318,29 → 320,29
} else if (name == TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY) {
 
HexFileUploadGUI.setCurrentDirectory(element.getTextContent());
 
} else if (name == TAG_WORKSPACE_MRU_LIST) {
 
miosStudioGUI.getMRU().removeAllElements();
 
} else if (name == TAG_WORKSPACE_MRU) {
 
miosStudioGUI.saveMRU(element.getTextContent());
 
} else if (name == TAG_MIDI_FILTER_GUI_MRU_LIST) {
 
MidiFilterGUI.getMRU().removeAllElements();
 
} else if (name == TAG_MIDI_FILTER_GUI_MRU) {
 
MidiFilterGUI.saveMRU(element.getTextContent());
 
} else if (name == TAG_HEX_FILE_UPLOAD_GUI_MRU_LIST) {
 
HexFileUploadGUI.getMRU().removeAllElements();
 
} else if (name == TAG_HEX_FILE_UPLOAD_GUI_MRU) {
 
HexFileUploadGUI.saveMRU(element.getTextContent());
}
}
451,61 → 453,61
externalCommandButton.externalCommand);
}
 
Element workSpaceCurrentDirectory = document
.createElement(TAG_WORKSPACE_CURRENT_DIRECTORY);
if (includeMRU) {
 
rootElement.appendChild(workSpaceCurrentDirectory);
Element workSpaceCurrentDirectory = document
.createElement(TAG_WORKSPACE_CURRENT_DIRECTORY);
 
workSpaceCurrentDirectory.setTextContent(MIOSStudioGUI
.getCurrentDirectory());
if (includeMRU) {
Element mruListElement = document.createElement(TAG_WORKSPACE_MRU_LIST);
rootElement.appendChild(workSpaceCurrentDirectory);
 
workSpaceCurrentDirectory.setTextContent(MIOSStudioGUI
.getCurrentDirectory());
 
Element mruListElement = document
.createElement(TAG_WORKSPACE_MRU_LIST);
 
rootElement.appendChild(mruListElement);
 
it = miosStudioGUI.getMRU().iterator();
 
while (it.hasNext()) {
 
Element mru = document.createElement(TAG_WORKSPACE_MRU);
 
mruListElement.appendChild(mru);
mru.setTextContent((String) it.next());
 
mru.setTextContent((String) it.next());
}
}
 
Element midiFilterDeviceManagerGUIelement = document
.createElement(TAG_MIDI_FILTER_DEVICE_MANAGER_GUI);
Element midiFilterDeviceManagerGUIelement = document
.createElement(TAG_MIDI_FILTER_DEVICE_MANAGER_GUI);
 
rootElement.appendChild(midiFilterDeviceManagerGUIelement);
rootElement.appendChild(midiFilterDeviceManagerGUIelement);
 
Element midiFilterCurrentDirectory = document
.createElement(TAG_MIDI_FILTER_GUI_CURRENT_DIRECTORY);
Element midiFilterCurrentDirectory = document
.createElement(TAG_MIDI_FILTER_GUI_CURRENT_DIRECTORY);
 
midiFilterDeviceManagerGUIelement
.appendChild(midiFilterCurrentDirectory);
midiFilterDeviceManagerGUIelement
.appendChild(midiFilterCurrentDirectory);
 
midiFilterCurrentDirectory.setTextContent(MidiFilterGUI
.getCurrentDirectory());
if (includeMRU) {
midiFilterCurrentDirectory.setTextContent(MidiFilterGUI
.getCurrentDirectory());
Element mruListElement = document.createElement(TAG_MIDI_FILTER_GUI_MRU_LIST);
mruListElement = document
.createElement(TAG_MIDI_FILTER_GUI_MRU_LIST);
 
midiFilterDeviceManagerGUIelement.appendChild(mruListElement);
 
it = MidiFilterGUI.getMRU().iterator();
 
while (it.hasNext()) {
Element mru = document.createElement(TAG_MIDI_FILTER_GUI_MRU);
 
Element mru = document
.createElement(TAG_MIDI_FILTER_GUI_MRU);
 
mruListElement.appendChild(mru);
mru.setTextContent((String) it.next());
 
mru.setTextContent((String) it.next());
}
}
 
519,30 → 521,34
.getHexFileUploadDeviceManagerGUI().getTabbedPane()
.getSelectedIndex()));
 
Element hexFileCurrentDirectoryElement = document
.createElement(TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY);
if (includeMRU) {
 
hexFileUploadDeviceManagerGUIelement
.appendChild(hexFileCurrentDirectoryElement);
 
hexFileCurrentDirectoryElement.setTextContent(HexFileUploadGUI
.getCurrentDirectory());
if (includeMRU) {
Element hexFileCurrentDirectoryElement = document
.createElement(TAG_HEX_FILE_UPLOAD_GUI_CURRENT_DIRECTORY);
 
hexFileUploadDeviceManagerGUIelement
.appendChild(hexFileCurrentDirectoryElement);
 
hexFileCurrentDirectoryElement.setTextContent(HexFileUploadGUI
.getCurrentDirectory());
Element mruListElement = document.createElement(TAG_HEX_FILE_UPLOAD_GUI_MRU_LIST);
hexFileUploadDeviceManagerGUIelement.appendChild(mruListElement);
Element mruListElement = document
.createElement(TAG_HEX_FILE_UPLOAD_GUI_MRU_LIST);
 
hexFileUploadDeviceManagerGUIelement
.appendChild(mruListElement);
 
it = HexFileUploadGUI.getMRU().iterator();
 
while (it.hasNext()) {
Element mru = document.createElement(TAG_HEX_FILE_UPLOAD_GUI_MRU);
 
Element mru = document
.createElement(TAG_HEX_FILE_UPLOAD_GUI_MRU);
 
mruListElement.appendChild(mru);
mru.setTextContent((String) it.next());
 
mru.setTextContent((String) it.next());
}
}
}