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

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


        //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

                    }
                }.start();
            }
        };
        r1t.putValue("tip", "Refresh Amplifier");
        RowHeaderedAndSectionedTablePanel ampPanel;
        ampPanel = new RowHeaderedAndSectionedTablePanel().init(new EditableVoiceParameterTable(voices, ParameterCategories.VOICE_AMPLIFIER, ampModels, "Amplifier"), "Show Amplifier", UIColors.getTableBorder(), r1t);
        this.add(ampPanel);
        return this;
    }
View Full Code Here

                }.start();
            }
        };
        rmm.putValue("tip", "Refresh Multimode");
        this.device = device;
        mmp = new RowHeaderedAndSectionedTablePanel();
        mmp.init(new MultiModeTable(device, just16), "Show MultiMode", UIColors.getTableBorder(), rmm);
        //mmp.getHideButton().setAction(null);
        if (utilityAction != null) {
            mmp.getHideButton().setAction(utilityAction);
            mmp.getHideButton().setToolTipText(utilityAction.getValue("tip").toString());
View Full Code Here

        makeLinkPanel();
        linkPanel.addComponentListener(this);
    }

    protected void makeLinkPanel() throws ZDeviceNotRunningException {
        RowHeaderedAndSectionedTablePanel lp;
        linkTable = new LinkTable(preset);
        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

                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

        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

TOP

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

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.