@Override
protected void handleEnvelopeWidget(AbstractEnvelopeWidgetAdapter widget,
String uniqueName, Xmleditor editor) {
Xmlparams params = getParams(editor);
XmlenvelopeParam envelopeParam = params.addNewXmlenvelopeParam();
EnvelopeNode[] nodes = widget.getNodes();
int numFaders = 0;
for (int i = 0; i < nodes.length; i++) {
EnvelopeNode node = nodes[i];
final IParamModel modelX = widget.getParamModel(node, true);
if (modelX != null) {
final int faderX = widget.getSliderNum() + numFaders++;
int minX = node.getMinX();
int maxX = node.getMaxX();
Xmlparam paramX = envelopeParam.addNewXmlparam();
paramX.setType(Xmlparam.Type.ENVELOPE_WIDGET);
paramX.setLabel(node.getNameX());
paramX.setMax(maxX);
paramX.setMin(minX);
widget.setFader(faderX);
storeMessages(paramX, widget);
}
final IParamModel modelY = widget.getParamModel(node, false);
if (modelY != null) {
final int faderY = widget.getSliderNum() + numFaders++;
int minY = node.getMinY();
int maxY = node.getMaxY();
Xmlparam paramY = envelopeParam.addNewXmlparam();
paramY.setType(Xmlparam.Type.ENVELOPE_WIDGET);
paramY.setLabel(node.getNameY());
paramY.setMax(maxY);
paramY.setMin(minY);