Package com.pcmsolutions.device.EMU.E4.zcommands

Examples of com.pcmsolutions.device.EMU.E4.zcommands.CopyLinkZMTC


        Integer id;
        for (int n = 0; n < len; n++) {
            id = ids[n];
            v = (Integer) params.get(id);
            if (v == null) {
                GeneralParameterDescriptor pd = parameterContext.getParameterDescriptor(id);
                if (pd == null)
                    throw new IllegalParameterIdException();
                v = pd.getDefaultValue();
            }
            retVals[n] = v;
        }
        return retVals;
    }
View Full Code Here


    protected void translateToParameterContext(ParameterContext pc) {
        this.parameterContext = pc;
        Map oldParams = (Map) params.clone();
        params.clear();
        Integer key;
        GeneralParameterDescriptor pd;
        Map newIds = pc.getIdsAndDefaultsAsMap();     // id(Integer) -> default value(Integer)
        for (Iterator i = newIds.keySet().iterator(); i.hasNext();) {
            key = (Integer) i.next();
            if (oldParams.containsKey(key)) {
                try {
View Full Code Here

            throw new IllegalArgumentException(this.getClass().toString() + ":initValues -> array not id/value pairs!");

        //params.clear();

        Integer id;
        GeneralParameterDescriptor pd;
        for (int n = 0; n < len; n += 2) {
            id = idValues[n];
            try {
                pd = parameterContext.getParameterDescriptor(id);
            } catch (IllegalParameterIdException e) {
View Full Code Here

            id = ids[n];
            v = (Integer) params.get(id);
            if (v == null) {
                GeneralParameterDescriptor pd = parameterContext.getParameterDescriptor(id);
                if (pd == null)
                    throw new IllegalParameterIdException();
                v = pd.getDefaultValue();
            }
            retVals[n] = v;
        }
        return retVals;
View Full Code Here

        if (len != copyVals.length)
            throw new IllegalArgumentException(this.getClass().toString() + ":setValues -> num ids,num values mismatch!");

        for (int n = 0; n < len; n++) {
            if (!parameterContext.paramExists(ids[n]))
                throw new IllegalParameterIdException();
            copyVals[n] = checkValue(ids[n], copyVals[n]);
        }

        for (int n = 0; n < len; n++)
            params.put(ids[n], copyVals[n]);
View Full Code Here

        if (len != copyVals.length)
            throw new IllegalArgumentException(this.getClass().toString() + ":offsetValues -> num ids,num offsettingValues mismatch!");

        for (int n = 0; n < len; n++) {
            if (!parameterContext.paramExists(ids[n]))
                throw new IllegalParameterIdException();

            if (constrain)
                copyVals[n] = parameterContext.getParameterDescriptor(ids[n]).constrainValue(IntPool.get(copyVals[n].intValue() + getValue(ids[n]).intValue()));
            else
                copyVals[n] = checkValue(ids[n], IntPool.get(copyVals[n].intValue() + getValue(ids[n]).intValue()));
View Full Code Here

        }
    };
*/
    protected void makeGlobalPanel() throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        ParameterContext ppc = preset.getDeviceParameterContext().getPresetContext();
        List cats = ppc.getCategories();
        Collections.sort(cats);
        globalPanel = new JPanel() {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }
        };
        globalPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
        for (int i = 0,n = cats.size(); i < n; i++) {
            List ids = ppc.getIdsForCategory((String) cats.get(i));
            ArrayList models = new ArrayList();
            for (int j = 0,k = ids.size(); j < k; j++)
                try {
                    models.add(cp.getEditableParameterModel((Integer) ids.get(j)));
                } catch (IllegalParameterIdException e) {
View Full Code Here

        makeVoicePanel(expansionMemory);
        voicePanel.addComponentListener(this);
    }

    private JList makeVoiceIdSelectionList(List userIds) throws ZDeviceNotRunningException, IllegalParameterIdException {
        ParameterContext vc = preset.getDeviceParameterContext().getVoiceContext();
        Set ids = vc.getIds();
        List dispList = new ArrayList();
        for (Iterator i = ids.iterator(); i.hasNext();) {
            Object next = i.next();
            int idv = ((Integer) next).intValue();
            if ((idv < 37 || idv > 56) && idv != 85 && idv != 86)
                dispList.add(next);
        }

        for (int i = 0,j = dispList.size(); i < j; i++)
            dispList.set(i, vc.getParameterDescriptor((Integer) dispList.get(i)));

        JList vidsl = new JList(dispList.toArray());
        for (int i = 0,j = dispList.size(); i < j; i++)
            if (userIds.contains(dispList.get(i)))
                vidsl.addSelectionInterval(i, i);
View Full Code Here

        makeGlobalPanel();
        globalPanel.addComponentListener(this);
    }

    protected void makeGlobalPanel() throws ZDeviceNotRunningException {
        ParameterContext ppc = preset.getDeviceParameterContext().getPresetContext();
        List cats = ppc.getCategories();
        globalTables = new PresetParameterTable[cats.size()];
        Collections.sort(cats);
        globalPanel = new JPanel() {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }

        };
        globalPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
        for (int i = 0,n = cats.size(); i < n; i++) {
            List ids = ppc.getIdsForCategory((String) cats.get(i));
            ArrayList models = new ArrayList();
            for (int j = 0,k = ids.size(); j < k; j++)
                try {
                    models.add(preset.getParameterModel((Integer) ids.get(j)));
                } catch (IllegalParameterIdException e) {
View Full Code Here

            params.put(ids[n], copyVals[n]);
    }

    protected Integer checkValue(Integer id, Integer value) throws ParameterValueOutOfRangeException, IllegalParameterIdException {
        if (!parameterContext.getParameterDescriptor(id).isValidValue(value))
            throw new ParameterValueOutOfRangeException();
        return value;
    }
View Full Code Here

TOP

Related Classes of com.pcmsolutions.device.EMU.E4.zcommands.CopyLinkZMTC

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.