Examples of ZDefaultThread


Examples of com.pcmsolutions.system.threads.ZDefaultThread

            }
        };
    }

    public Thread modifyBranch(final DesktopBranch branch, final boolean activate, final int clipIndex) {
        return new ZDefaultThread() {
            public void run() {
                ViewMediator.modifyBranch(branch, activate, clipIndex);
            }
        };
    }
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

    public void openDesktopElements(DesktopElement[] elements) {
        ViewMediator.openDesktopElements(elements);
    }

    public void takeSnapshot(final String title) {
        new ZDefaultThread() {
            public void run() {
                try {
                    DesktopBranch db = new DesktopBranch(ViewMediator.getDeviceDesktopElements(device), title);
                    if (db.count() == 0)
                        return;
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

            public void run() {
                try {
                    if (!PresetContextMacros.confirmInitializationOfPresets(currPresets))
                        return;
                    new ZDefaultThread("Operation: Presets referencing current sample selection") {
                        public void run() {
                            try {
                                final ReadablePreset[] filtPresets = PresetContextMacros.filterPresetsReferencingSamples(currPresets, currSamples);
                                if (filtPresets.length == 0) {
                                    UserMessaging.showInfo("Nothing to select");
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

        final JButton huntButt = new JButton();
        huntButt.setAction(new AbstractAction("Hunt") {
            public void actionPerformed(ActionEvent e) {
                huntButt.setEnabled(false);
                Thread t = new ZDefaultThread("MidiManager Hunt") {
                    public void run() {
                        try {
                            Zoeos.getInstance().getDeviceManager().performHunt();
                        } finally {
                            SwingUtilities.invokeLater(new Runnable() {
                                public void run() {
                                    huntButt.setEnabled(true);
                                }
                            });
                        }
                    }
                };
                t.start();
            }
        });

        huntButt.setAlignmentX(Component.LEFT_ALIGNMENT);
        huntButt.setToolTipText("Hunt For Devices");

        /*final JButton permitButt = new JButton();
        permitButt.setAction(new AbstractAction("Modify Port Ignore Tokens") {
            public void actionPerformed(ActionEvent e) {
                if ( editIgnoreTokensDlg == null)
                    editIgnoreTokensDlg = new ZEditIgnoreTokensDialog(ZoeosFrame.getInstance(), false);

                editIgnoreTokensDlg.show();
            }
        });
        permitButt.setToolTipText("Specify which ports ZoeOS is permitted to use");
         */

        final JButton permitButt = new JButton();
        permitButt.setAction(new AbstractAction("Permit") {
            public void actionPerformed(ActionEvent e) {
                int[] selRows = midiManagerTable.getSelectedRows();
                for (int i = 0,j = selRows.length; i < j; i++) {
                    Object tok = midiManagerTable.getModel().getValueAt(selRows[i], 0);
                    if (tok != null && !tok.equals(""))
                        MidiSystemFacade.getInstance().removeIgnoreToken(tok);
                }
            }
        });
        permitButt.setToolTipText("Permit selected ports");

        final JButton ignoreButt = new JButton();
        ignoreButt.setAction(new AbstractAction("Ignore") {
            public void actionPerformed(ActionEvent e) {
                int[] selRows = midiManagerTable.getSelectedRows();
                for (int i = 0,j = selRows.length; i < j; i++) {
                    Object tok = midiManagerTable.getModel().getValueAt(selRows[i], 0);
                    if (tok != null && !tok.equals(""))
                        MidiSystemFacade.getInstance().addIgnoreToken(tok);
                }
            }
        });
        ignoreButt.setToolTipText("Ignore selected ports");


        final JButton permitAllButt = new JButton();
        permitAllButt.setAction(new AbstractAction("Permit All") {
            public void actionPerformed(ActionEvent e) {
                MidiSystemFacade.getInstance().clearIgnoreTokens();
            }
        });
        permitAllButt.setToolTipText("Permit all ports");


        relCheck = new JCheckBox(new AbstractAction("Release Midi when Application Minimized (Stop Devices)") {
            public void actionPerformed(ActionEvent e) {
                ZoeosPreferences.ZPREF_releaseMidiOnMinimize.putValue(relCheck.isSelected());
            }
        });

        relCheck.setSelected(ZoeosPreferences.ZPREF_releaseMidiOnMinimize.getValue());

        JPanel bottomPanel = new JPanel() {
            public Color getBackground() {
                return UIColors.getDefaultBG();
            }

            public Color getForeground() {
                return UIColors.getDefaultFG();
            }

        };
        bottomPanel.setLayout(new BorderLayout());

        JPanel bp1 = new JPanel();
        bp1.add(relCheck);
        bp1.setLayout(new FlowLayout(FlowLayout.LEFT));

        JPanel bp2 = new JPanel();
        bp2.setLayout(new FlowLayout(FlowLayout.LEFT));
        bp2.add(hideButt);
        bp2.add(huntButt);
        bp2.add(permitButt);
        bp2.add(ignoreButt);
        bp2.add(permitAllButt);

        bottomPanel.add(bp1, BorderLayout.NORTH);
        bottomPanel.add(bp2, BorderLayout.CENTER);

        AbstractAction ract = new AbstractAction() {
            public void actionPerformed(final ActionEvent e) {
                if (e.getSource() instanceof Component) {
                    ((Component) e.getSource()).setEnabled(false);
                    new ZDefaultThread("Refresh Midi") {
                        public void run() {
                            try {
                                //MidiSystemFacade.getInstance().refresh(true);
                            } finally {
                                SwingUtilities.invokeLater(new Runnable() {
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

        buttBox = new Box(BoxLayout.Y_AXIS);
        final JButton h = new JButton();
        h.setAction(new AbstractAction("Hunt") {
            public void actionPerformed(ActionEvent e) {
                h.setEnabled(false);
                Thread t = new ZDefaultThread("DeviceManager Hunt") {
                    public void run() {
                        try {
                            zdm.performHunt();
                        } finally {
                            SwingUtilities.invokeLater(new Runnable() {
                                public void run() {
                                    h.setEnabled(true);
                                }
                            });
                        }
                    }
                };
                t.start();
            }
        });
        h.setToolTipText("Hunt For Devices");
        buttBox.add(h);

        JButton r = new JButton(new AbstractAction("Refresh") {
            public void actionPerformed(ActionEvent e) {
                new ZDefaultThread("Refesh Device Manager") {
                    public void run() {
                        pendingListChanged();
                        startedListChanged();
                        stoppedListChanged();
                        duplicateListChanged();
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

                        revokeThread.join();
                    } catch (InterruptedException e1) {
                        e1.printStackTrace();
                    }

            revokeThread = new ZDefaultThread("Revoke Thread") {
                public void run() {
                    FlashMsg.globalDisable = true;
                    Zoeos.getInstance().getDeviceManager().revokeDevicesNonThreaded();
                }
            };
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

        JPanel p = new JPanel(new GridLayout(cmds.length + 1, 1, 0, 0));
        for (int i = 0; i < cmds.length; i++)
            p.add(createHyperlinkButton(cmds[i]));
        p.add(createHyperlinkButton(new AbstractAction("Clear workspace") {
            public void actionPerformed(ActionEvent e) {
                new ZDefaultThread() {
                    public void run() {
                        device.getViewManager().clearDeviceWorkspace().start();
                    }
                }.start();
            }
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

                    }
                }, true));
                bb.add(createHyperlinkButton(new AbstractAction("Merge") {
                    public void actionPerformed(ActionEvent e) {
                        //UserMessaging.showInfo("Snap!");
                        new ZDefaultThread() {
                            public void run() {
                                device.getViewManager().openDesktopElements((snaps[f_i].getDesktopElements()));
                            }
                        }.start();
                        //snaps[i]
                    }
                }, true));
                bb.add(createHyperlinkButton(new AbstractAction("Delete ]") {
                    public void actionPerformed(ActionEvent e) {
                        //UserMessaging.showInfo("Snap!");
                        new ZDefaultThread() {
                            public void run() {
                                device.getViewManager().removeSnapshot(snaps[f_i]);
                            }
                        }.start();
                        //snaps[i]
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

            public void actionPerformed(ActionEvent e) {
                final ReadablePreset[] rps = PresetContextMacros.extractReadablePresets(presetContextEnclosurePanel.getPresetContextTable().getSelObjects());
                try {
                    if (!PresetContextMacros.confirmInitializationOfPresets(rps))
                        return;
                    new ZDefaultThread("Operation: Referenced by current preset selection") {
                        public void run() {
                            try {
                                final IntegerUseMap smpls = PresetContextMacros.getPresetSampleUsage(rps);
                                if (smpls.size() == 0 || (smpls.size() == 1 && smpls.getIntegers()[0].intValue() == 0)) {
                                    UserMessaging.showInfo("Nothing to select");
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDefaultThread

    public void performDefaultAction() {
        performOpenAction();
    }

    public void performOpenAction() {
        new ZDefaultThread() {
            public void run() {
                try {
                    assertPresetInitialized();
                    getDeviceContext().getViewManager().openPreset(Impl_ReadablePreset.this);
                } catch (NoSuchPresetException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.