Package com.pcmsolutions.device.EMU.E4.packaging

Examples of com.pcmsolutions.device.EMU.E4.packaging.SamplePackage$Header


        WinValueProfile.ZPREF_velWinDisplayMode.removeChangeListener(this);
        readablePresets.clear();
    }

    protected void buildColumnAndSectionData() {
        rowHeaderColumnData = new ColumnData("", DEF_COL_WIDTH, JLabel.LEFT, 0, Object.class);
        columnData = new ColumnData[parameterObjects.size()];
        String title;
        GeneralParameterDescriptor pd;
        int id;
        ArrayList arrSectionData = new ArrayList();
        int sectionIndex = 0;
        int colWidthCount = 0;

        id2col.clear();

        for (int i = 0, n = parameterObjects.size(); i < n; i++) {
            pd = (GeneralParameterDescriptor) parameterObjects.get(i);
            title = getColNameFromRefString(pd.getReferenceString(), 1);
            id = pd.getId().intValue();

            id2col.put(IntPool.get(id), IntPool.get(i + 1));

            if (id == 23)
                columnData[i] = new ColumnData(title, DEF_COL_WIDTH * 4, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);
            else if (id == 28 || id == 30) // alphanumeric key position and keyWin
                columnData[i] = new ColumnData(title, DEF_COL_WIDTH + 5, JLabel.LEFT, sectionIndex, ReadableParameterModel.class, WinTableCellRenderer.CANONICAL_RENDERERS[(id - 28) % 4]);
            else if (id >= 28 && id <= 35) // keyWin, velWin
                columnData[i] = new ColumnData(title, DEF_COL_WIDTH, JLabel.LEFT, sectionIndex, ReadableParameterModel.class, WinTableCellRenderer.CANONICAL_RENDERERS[(id - 28) % 4]);
            else if (id == 251)
                columnData[i] = new ColumnData(title, (DEF_COL_WIDTH * 3) / 2, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);
            else
                columnData[i] = new ColumnData(title, DEF_COL_WIDTH, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);

            colWidthCount += columnData[i].width;

            if (id == 27) {
                arrSectionData.add(new SectionData(
View Full Code Here


    protected void updateParameterModelAtIndex(int pmIndex) {
        this.fireTableCellUpdated(pmIndex / 4, pmIndex % 4 + 1);
    }

    protected void buildColumnAndSectionData() {
        rowHeaderColumnData = new ColumnData("", 50, JLabel.LEFT, 0, Object.class);
        columnData = new ColumnData[4];
        columnData[0] = new ColumnData("Rate", 60, JLabel.LEFT, 0, ReadableParameterModel.class, null, null);
        columnData[1] = new ColumnData("Level", 60, JLabel.LEFT, 0, ReadableParameterModel.class, null, null);
        columnData[2] = new ColumnData("Rate", 60, JLabel.LEFT, 1, ReadableParameterModel.class, null, null);
        columnData[3] = new ColumnData("Level", 60, JLabel.LEFT, 1, ReadableParameterModel.class, null, null);
        sectionData = new SectionData[2];
        sectionData[0] = new SectionData(UIColors.getTableFirstSectionBG(), UIColors.getTableFirstSectionFG(), 120, "SEG 1");
        sectionData[1] = new SectionData(UIColors.getTableSecondSectionBG(), UIColors.getTableSecondSectionFG(), 120, "SEG 2");
    }
View Full Code Here

        init();
        pc.addPresetContextListener(this);
    }

    protected void buildColumnAndSectionData() {
        rowHeaderColumnData = new ColumnData("", 45, JLabel.LEFT, 0, Object.class);
        columnData = new ColumnData[1];
        // columnData[0] = new ColumnData("", 155, JLabel.LEFT, 0, ReadablePreset.class, new PresetContextTableCellRenderer(new Color(255, 255, 255, 200), new Color(242, 81, 103, 250), 0.6), null);
        columnData[0] = new ColumnData("", 155, JLabel.LEFT, 0, ReadablePreset.class, new PresetContextTableCellRenderer(), null);
        sectionData = new SectionData[]{new SectionData(UIColors.getTableFirstSectionBG(), UIColors.getTableFirstSectionFG(), 155, "")};
    }
View Full Code Here

                    }
                }.start();
            }
        };
        rs.putValue("tip", "Refresh Tuning Setup");
        RowHeaderedAndSectionedTablePanel tuningPanel;
        RowHeaderedAndSectionedTablePanel modifierPanel;
        RowHeaderedAndSectionedTablePanel setupPanel;
        tuningPanel = new RowHeaderedAndSectionedTablePanel().init(new VoiceParameterTable(voice, ParameterCategories.VOICE_TUNING, tuningModels, "Tuning"), "Show Tuning", UIColors.getTableBorder(), rt);
        modifierPanel = new RowHeaderedAndSectionedTablePanel().init(new VoiceParameterTable(voice, ParameterCategories.VOICE_TUNING_MODIFIERS, modifierModels, "Tuning Modifiers"), "Show Tuning Modifiers", UIColors.getTableBorder(), rm);
        setupPanel = new RowHeaderedAndSectionedTablePanel().init(new VoiceParameterTable(voice, ParameterCategories.VOICE_TUNING_SETUP, setupModels, "Tuning Setup"), "Show Tuning Setup", UIColors.getTableBorder(), rs);
        tuningPanel.setAlignmentX(Component.TOP_ALIGNMENT);
        modifierPanel.setAlignmentX(Component.TOP_ALIGNMENT);
        setupPanel.setAlignmentX(Component.TOP_ALIGNMENT);
        this.add(tuningPanel);
        this.add(modifierPanel);
        this.add(setupPanel);
        return this;
    }
View Full Code Here

        //this.setLayout(new GridLayout(1, 2));
        this.setLayout(new FlowLayout(FlowLayout.LEADING));
        envModel = new VoiceEnvelopeModel(voice, models[0].getParameterDescriptor().getId());
        envelope = new RatesEnvelope(envModel);
        makeModelAndTable(category, models, title);
        RowHeaderedAndSectionedTablePanel etp;
        final Integer[] ids = new Integer[models.length];

        for (int i = 0,j = models.length; i < j; i++)
            ids[i] = models[i].getParameterDescriptor().getId();

        Action ra = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                new ZDBModifyThread("Refresh Envelope") {
                    public void run() {
                        try {
                            voice.getPreset().refreshVoiceParameters(voice.getVoiceNumber(), ids);
                        } catch (NoSuchContextException e1) {
                            e1.printStackTrace();
                        } catch (PresetEmptyException e1) {
                            e1.printStackTrace();
                        } catch (NoSuchPresetException e1) {
                            e1.printStackTrace();
                        } catch (NoSuchVoiceException e1) {
                            e1.printStackTrace();
                        } catch (ParameterValueOutOfRangeException e1) {
                            e1.printStackTrace();
                        } catch (IllegalParameterIdException e1) {
                            e1.printStackTrace();
                        }
                    }
                }.start();
            }
        };
        ra.putValue("tip", "Refresh " + title);
        etp = new RowHeaderedAndSectionedTablePanel().init(envTable, "SHOW " + title, UIColors.getTableBorder(), ra);

        etp.getHideButton().setAction(toggleAction);
        etp.getHideButton().setToolTipText("Toggle Envelope Mode");

        FuzzyLineBorder flb = new FuzzyLineBorder(UIColors.getTableBorder(),UIColors.getTableBorderWidth(), true);
        flb.setFadingIn(!flb.isFadingIn());
        envelope.setBorder(new TitledBorder(flb, title, TitledBorder.LEFT, TitledBorder.ABOVE_TOP));

        //env.setBorder(new TitledBorder(UIColors.makeFuzzyBorder(UIColors.getTableBorder(), RowHeaderedAndSectionedTablePanel.getBorderWidth()), title, TitledBorder.LEFT, TitledBorder.ABOVE_TOP));

        envelope.setPreferredSize(new Dimension((int) (etp.getPreferredSize().getWidth() * 0.7), (int) (etp.getPreferredSize().getHeight() * 1.2)));

        add(etp);
        add(envelope);

        return this;
View Full Code Here

            }
        };
        rpc.putValue("tip", "Refresh Preset Context");

        pct = new PresetContextTable(pc);
        pcp = new RowHeaderedAndSectionedTablePanel();
        pcp.init(pct, "Show Preset Context", UIColors.getTableBorder(), rpc);
        this.pc = pc;
        add(pcp);
    }
View Full Code Here

                } catch (IllegalParameterIdException e) {
                    e.printStackTrace();
                }
            EditableParameterModel[] pms = new EditableParameterModel[models.size()];
            models.toArray(pms);
            globalPanel.add(new HideablePanel(new RowHeaderedAndSectionedTablePanel().init(new EditablePresetParameterTable(cp, cats.get(i).toString(), pms, cats.get(i).toString().toUpperCase()), "SHOW " + cats.get(i).toString().toUpperCase(), UIColors.getTableBorder(), rp, false), false) {
                public Color getBackground() {
                    return UIColors.getDefaultBG();
                }

            });
View Full Code Here

        }
    }

    protected void makeLinkPanel() throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        RowHeaderedAndSectionedTablePanel lp;
        linkTable = new EditableLinkTable(cp);
        linkTable.setCustomAction(new AbstractAction("Hide/Show Filter Section") {
            public void actionPerformed(ActionEvent e) {
                //try {
                preset.getDeviceContext().getDevicePreferences().ZPREF_showLinkFilterSection.putValue(! preset.getDeviceContext().getDevicePreferences().ZPREF_showLinkFilterSection.getValue());
                /*updateLinkPanel();
                addComponents();
                revalidate();
                repaint();
                */
                // } catch (ZDeviceNotRunningException e1) {
                //   e1.printStackTrace();
                // }
            }
        });

        lp = new RowHeaderedAndSectionedTablePanel().init(linkTable, "SHOW LINKS", UIColors.getTableBorder(), rp);
        lp.getRowHeaderedTable().getRowHeader().addFocusListener(FocusAlerter.getInstance());
        linkPanel = new HideablePanel(lp, false) {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }
        };
View Full Code Here

        };
    }

    protected void makeVoicePanel(java.util.List expansionMemory) throws ZDeviceNotRunningException {
        ContextEditablePreset cp = (ContextEditablePreset) preset;
        RowHeaderedAndSectionedTablePanel vp;
        voiceOverviewTable = new EditableVoiceOverviewTable(cp);
        if (expansionMemory != null)
            ((VoiceOverviewTableModel) voiceOverviewTable.getModel()).setExpansionMemory(expansionMemory);

        setVoiceOverviewTableCustomAction(voiceOverviewTable, rp);
        vp = new RowHeaderedAndSectionedTablePanel().init(voiceOverviewTable, "SHOW VOICES", UIColors.getTableBorder(), rp);
        vp.getRowHeaderedTable().getRowHeader().addFocusListener(FocusAlerter.getInstance());
        voicePanel = new HideablePanel(vp, false) {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }
        };
View Full Code Here

                columnData[i] = new ColumnData(title, DEF_COL_WIDTH, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);

            colWidthCount += columnData[i].width;

            if (id == 27) {
                arrSectionData.add(new SectionData(
                        UIColors.getTableFirstSectionBG(),
                        UIColors.getTableFirstSectionFG(),
                        colWidthCount,
                        "MAIN"));
                sectionIndex++;
                colWidthCount = 0;
            } else if (id == 31) {
                arrSectionData.add(new SectionData(
                        UIColors.getTableSecondSectionBG(),
                        UIColors.getTableSecondSectionFG(),
                        colWidthCount,
                        "KEY WIN", new MouseAdapter() {
                            public void mouseReleased(MouseEvent e) {
                                if (e.isPopupTrigger())
                                    new WinPopupMenu(WinValueProfile.ZPREF_keyWinDisplayMode).getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                            }

                            public void mousePressed(MouseEvent e) {
                                if (e.isPopupTrigger())
                                    new WinPopupMenu(WinValueProfile.ZPREF_keyWinDisplayMode).getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                            }

                            public void mouseClicked(MouseEvent e) {
                                if (e.isPopupTrigger())
                                    new WinPopupMenu(WinValueProfile.ZPREF_keyWinDisplayMode).getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                                else if (e.getClickCount() >= 2) {
                                    try {
                                        WinValueProfile.ZPREF_keyWinDisplayMode.putValue((WinValueProfile.ZPREF_keyWinDisplayMode.getValue() + 1) % 3);
                                    } catch (Exception e1) {
                                        e1.printStackTrace();
                                    }
                                }
                            }
                        }));
                sectionIndex++;
                colWidthCount = 0;

            } else if (id == 35) {
                arrSectionData.add(new SectionData(
                        UIColors.getTableThirdSectionBG(),
                        UIColors.getTableThirdSectionFG(),
                        colWidthCount,
                        "VELOCITY WIN", new MouseAdapter() {
                            public void mouseReleased(MouseEvent e) {
                                if (e.isPopupTrigger()) {
                                    new WinPopupMenu(WinValueProfile.ZPREF_velWinDisplayMode).getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                                }
                            }

                            public void mousePressed(MouseEvent e) {
                                if (e.isPopupTrigger()) {
                                    new WinPopupMenu(WinValueProfile.ZPREF_velWinDisplayMode).getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                                }
                            }

                            public void mouseClicked(MouseEvent e) {
                                if (e.isPopupTrigger())
                                    new WinPopupMenu(WinValueProfile.ZPREF_velWinDisplayMode).getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                                else if (e.getClickCount() >= 2) {
                                    try {
                                        WinValueProfile.ZPREF_velWinDisplayMode.putValue((WinValueProfile.ZPREF_velWinDisplayMode.getValue() + 1) % 3);
                                    } catch (Exception e1) {
                                        e1.printStackTrace();
                                    }
                                }
                            }
                        }));
                sectionIndex++;
                colWidthCount = 0;
            } else if (preset.getDeviceContext().getDevicePreferences().ZPREF_showLinkFilterSection.getValue() && id == 266) {
                arrSectionData.add(new SectionData(
                        UIColors.getTableFourthSectionBG(),
                        UIColors.getTableFourthSectionFG(),
                        colWidthCount,
                        "MIDI FILTERS"));
                sectionIndex++;
View Full Code Here

TOP

Related Classes of com.pcmsolutions.device.EMU.E4.packaging.SamplePackage$Header

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.