Package com.pcmsolutions.device.EMU.E4.gui.table

Examples of com.pcmsolutions.device.EMU.E4.gui.table.SectionData


    protected void buildColumnAndSectionData() {
        rowHeaderColumnData = new ColumnData("", 45, JLabel.LEFT, 0, Object.class);
        columnData = new ColumnData[1];
        columnData[0] = new ColumnData("", 155, JLabel.LEFT, 0, ContextReadableSample.class, new PresetContextTableCellRenderer(), null);
        sectionData = new SectionData[]{new SectionData(UIColors.getTableFirstSectionBG(), UIColors.getTableFirstSectionFG(), 155, "")};
    }
View Full Code Here


        columnData[0] = new ColumnData("SMDI", 50, JLabel.LEFT, 0, String.class, null, null);
        columnData[1] = new ColumnData("Host Adapter Id", 80, JLabel.LEFT, 0, String.class, null, null);
        columnData[2] = new ColumnData("SCSI Id", 50, JLabel.LEFT, 0, String.class, null, null);
        columnData[3] = new ColumnData("Manufacturer", 150, JLabel.LEFT, 0, String.class, null, null);
        columnData[4] = new ColumnData("Coupled Midi Device", 200, JLabel.LEFT, 0, String.class, null, null);
        sectionData = new SectionData[]{new SectionData(UIColors.getTableFirstSectionBG(), UIColors.getTableFirstSectionFG(), 530, "")};
    }
View Full Code Here

        columnData[0] = new ColumnData("Product", 100, JLabel.LEFT, 0, String.class, null, null);
        columnData[1] = new ColumnData("Type", 120, JLabel.LEFT, 0, String.class, null, null);
        columnData[2] = new ColumnData("Load", 50, JLabel.LEFT, 0, String.class, null, null);
        columnData[3] = new ColumnData("Licensee", 180, JLabel.LEFT, 0, String.class, null, null);
        columnData[4] = new ColumnData("Key String", 200, JLabel.LEFT, 0, String.class, null, null);
        sectionData = new SectionData[]{new SectionData(UIColors.getTableFirstSectionBG(), UIColors.getTableFirstSectionFG(), 650, "")};
    }
View Full Code Here

        super(dev);
        this.ids = new Integer[ids.length];
        this.vals = new Integer[ids.length];
        //this.valStrings = new String[ids.length];
        this.category = category;
        MasterContext mc = dev.getMasterContext();
        DeviceParameterContext dpc = dev.getDeviceParameterContext();
        this.ids = (Integer[]) ids.clone();
        vals = mc.getMasterParams(ids);

        /*for (int i = 0, n = ids.length; i < n; i++) {
            try {
                valStrings[i] = deviceParameterContext.getMasterContext().getParameterDescriptor(ids[i]).getStringForValue(vals[i]);
            } catch (ParameterValueOutOfRangeException e) {
View Full Code Here

            return has32Channels;
        }

        private void assertCh(Integer ch) throws IllegalMidiChannelException {
            if (ch.intValue() < 1 || (has32Channels && ch.intValue() > 32) || (!has32Channels && ch.intValue() > 16))
                throw new IllegalMidiChannelException(ch);
        }
View Full Code Here

    protected JMenuItem[] getCustomMenuItems() {
        final int[] selRows = this.getSelectedRows();
        Action sda = new AbstractAction("Disable Channel") {
            public void actionPerformed(ActionEvent e) {
                MultiModeContext mmc = null;
                try {
                    mmc = device.getMultiModeContext();
                    for (int i = 0,j = selRows.length; i < j; i++) {
                        try {
                            mmc.setPreset(IntPool.get(selRows[i] + 1), IntPool.get(-1));
                        } catch (IllegalMidiChannelException e1) {
                            e1.printStackTrace();
                        }
                    }
                } catch (ZDeviceNotRunningException e1) {
                    e1.printStackTrace();
                }
            }
        };
        JMenuItem pmi = null;
        try {
            ArrayList selPresets = new ArrayList();
            PresetContext dpc = device.getDefaultPresetContext();
            MultiModeContext mmc = device.getMultiModeContext();
            for (int i = 0; i < selRows.length; i++) {
                Integer preset = mmc.getPreset(IntPool.get(selRows[i] + 1));        // +1 because midi channels indexed from 1
                if (preset.intValue() >= 0)
                    selPresets.add(dpc.getReadablePreset(preset));
            }
            if (selPresets.size() > 0) {
View Full Code Here

    }

    public boolean checkPopup(MouseEvent e) {
        if (e.isPopupTrigger()) {
            Object[] sels = new Object[0];
            MultiModeContext mmc;
            try {
                mmc = this.device.getMultiModeContext();
            } catch (ZDeviceNotRunningException e1) {
                return false;
            }
View Full Code Here

        private final Integer[] values = new Integer[4];
        private final String[] valueStrings = new String[4];

        public Impl_MultiModeChannelSelection(MultiModeContext mmc, int[] selCols, int row) {
            channel = IntPool.get(row + 1);
            MultiModeDescriptor mmd = mmc.getMultiModeDescriptor();
            GeneralParameterDescriptor preset_pd = mmd.getPresetParameterDescriptor();
            GeneralParameterDescriptor vol_pd = mmd.getVolumeParameterDescriptor();
            GeneralParameterDescriptor pan_pd = mmd.getPanParameterDescriptor();
            GeneralParameterDescriptor submix_pd = mmd.getSubmixParameterDescriptor();

            MultiModeMap m = mmc.getMultimodeMap();

            for (int i = 0, n = selCols.length; i < n; i++) {
                if (selCols[i] == 0) {
View Full Code Here

            GeneralParameterDescriptor preset_pd = mmd.getPresetParameterDescriptor();
            GeneralParameterDescriptor vol_pd = mmd.getVolumeParameterDescriptor();
            GeneralParameterDescriptor pan_pd = mmd.getPanParameterDescriptor();
            GeneralParameterDescriptor submix_pd = mmd.getSubmixParameterDescriptor();

            MultiModeMap m = mmc.getMultimodeMap();

            for (int i = 0, n = selCols.length; i < n; i++) {
                if (selCols[i] == 0) {
                    try {
                        values[0] = m.getPreset(channel);
                        valueStrings[0] = preset_pd.getStringForValue(values[0]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }

                if (selCols[i] == 1) {
                    try {
                        values[1] = m.getVolume(channel);
                        valueStrings[1] = vol_pd.getStringForValue(values[1]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }
                if (selCols[i] == 2) {
                    try {
                        values[2] = m.getPan(channel);
                        valueStrings[2] = pan_pd.getStringForValue(values[2]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
                    }
                }
                if (selCols[i] == 3) {
                    try {
                        values[3] = m.getSubmix(channel);
                        valueStrings[3] = submix_pd.getStringForValue(values[3]);
                    } catch (IllegalMidiChannelException e) {
                        e.printStackTrace();
                    } catch (ParameterValueOutOfRangeException e) {
                        e.printStackTrace();
View Full Code Here

        dropOverExtent = -1;
    }

    public void setSelection(VoiceParameterSelection sel) {
        try {
            DeviceParameterContext dpc = voices[0].getPreset().getDeviceParameterContext();
            Integer[] ids = sel.getIds();
            Integer[] vals = sel.getVals();
            int thisCat = VoiceParameterSelection.voiceCategoryStringToEnum(category);
            int selCat = sel.getCategory();
            if (thisCat != selCat) {
                for (int i = 0,j = ids.length; i < j; i++) {
                    // need convert ids first
                    ids[i] = ParameterUtilities.convertVoiceEnvelopeId(thisCat, selCat, ids[i]);
                    vals[i] = dpc.getParameterDescriptor(ids[i]).constrainValue(vals[i]);
                }
            }

            try {
                PresetContextMacros.setContextVoicesParam(voices, ids, vals);
View Full Code Here

TOP

Related Classes of com.pcmsolutions.device.EMU.E4.gui.table.SectionData

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.