public MultiModeTableModel(DeviceContext d, boolean just16) throws ZDeviceNotRunningException { this.multimodeContext = d.getMultiModeContext(); this.device = d; pmtce = new ParameterModelTableCellEditor(Color.white, Color.black); mmptce = new MultiModePresetTableCellEditor(device); try { readablePresets = d.getDefaultPresetContext().getDatabasePresets(); } catch (NoSuchContextException e) { readablePresets = new ArrayList(); e.printStackTrace(); } if (multimodeContext.has32Channels()) { if (!just16) chnls = 32; else chnls = 16; } else chnls = 16; super.init(); buildParameterModels(); multimodeContext.addMultiModeListener(this); }
public void zDispose() { super.zDispose(); multimodeContext.removeMultiModeListener(this); multimodeContext = null; readablePresets.clear(); int size; size = volumeParameterModels.size(); for (int n = 0; n < size; n++) ((EditableParameterModel) volumeParameterModels.get(n)).zDispose(); size = panParameterModels.size(); for (int n = 0; n < size; n++) ((EditableParameterModel) panParameterModels.get(n)).zDispose(); size = submixParameterModels.size(); for (int n = 0; n < size; n++) ((EditableParameterModel) submixParameterModels.get(n)).zDispose(); size = presetParameterModels.size(); for (int n = 0; n < size; n++) ((EditableParameterModel) presetParameterModels.get(n)).zDispose(); volumeParameterModels.clear(); volumeParameterModels = null; panParameterModels.clear(); panParameterModels = null; submixParameterModels.clear(); submixParameterModels = null; presetParameterModels.clear(); presetParameterModels = null; device = null; readablePresets = null; pmtce = null; mmptce = null; }