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

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


            title = getColNameFromRefString(pd.getReferenceString(), 2);
        else
            title = getColNameFromRefString(pd.getReferenceString(), 1);

        if (id == 38) // sample
            columnData[i] = new ColumnData(title, DEF_COL_WIDTH * 4, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);
        else if (id == 44) // alphanumeric key position
            columnData[i] = new ColumnData(title, DEF_COL_WIDTH + 5, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);
        else if (id == 45 || id == 47) // alphanumeric key position and keyWin
            columnData[i] = new ColumnData(title, DEF_COL_WIDTH + 5, JLabel.LEFT, sectionIndex, ReadableParameterModel.class, WinTableCellRenderer.CANONICAL_RENDERERS[(id - 45) % 4]);
        else if (id >= 45 && id <= 56) // keyWin, velWin, rtWin
            columnData[i] = new ColumnData(title, DEF_COL_WIDTH, JLabel.LEFT, sectionIndex, ReadableParameterModel.class, WinTableCellRenderer.CANONICAL_RENDERERS[(id - 45) % 4]);
        else if (id < 57) // one of the defaults
            columnData[i] = new ColumnData(title, DEF_COL_WIDTH, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);
        else  // user id
            columnData[i] = new ColumnData(title, DEF_COL_WIDTH + 20, JLabel.LEFT, sectionIndex, ReadableParameterModel.class);
        return id;
    }
View Full Code Here


        int hw = 45;
        int pw = 180;
        int vw = 50;
        int pnw = 45;
        int sw = 55;
        rowHeaderColumnData = new ColumnData("", hw, JLabel.LEFT, 0, Object.class);
        columnData = new ColumnData[4];
        sectionData = new SectionData[2];
        columnData[0] = new ColumnData("Preset", pw, JLabel.LEFT, 0, ReadablePreset.class, null, mmptce);
        columnData[1] = new ColumnData("Volume", vw, JLabel.LEFT, 1, ReadableParameterModel.class, null, pmtce);
        columnData[2] = new ColumnData("Pan", pnw, JLabel.LEFT, 1, ReadableParameterModel.class, null, pmtce);
        columnData[3] = new ColumnData("Submix", sw, JLabel.LEFT, 1, ReadableParameterModel.class, null, pmtce);
        // replace "" below with " " to make the section headers visible
        String sStr = "";
        //if (totalChnls > 16)
        //    sStr = " ";
View Full Code Here

        });
        return items;
    }

    protected DragAndDropTable generateRowHeaderTable() {
        DragAndDropTable t = new DragAndDropTable(popupName, null, null) {
            {
                this.hidingSelectionOnFocusLost = false;
            }

            public void zDispose() {
View Full Code Here

        */
        return new JMenuItem[0];
    }

    protected DragAndDropTable generateRowHeaderTable() {
        DragAndDropTable t = new DragAndDropTable(popupName, null, null) {
            {
                this.hidingSelectionOnFocusLost = false;
            }

            public void zDispose() {
View Full Code Here

        */
        return new JMenuItem[0];
    }

    protected DragAndDropTable generateRowHeaderTable() {
        DragAndDropTable t = new DragAndDropTable(popupName, null, null) {
            {
                this.hidingSelectionOnFocusLost = false;
            }

            public void zDispose() {
View Full Code Here

        }
    }

    protected void setupLook(JTable table, Object value, boolean isSelected, int row, int column) {
        super.setupLook(table, value, isSelected, row, column);
        RowHeaderedAndSectionedTable t = (RowHeaderedAndSectionedTable) table;
        ColumnData[] cd = t.getColumnData();
        SectionData[] sd = t.getSectionData();
        setBackground(sd[cd[column].sectionIndex].sectionBG);
        setForeground(sd[cd[column].sectionIndex].sectionFG);

        if (table instanceof WinValueProfileProvider)
            wvp = ((WinValueProfileProvider) table).getWinValues(row, column);
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

TOP

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

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.