Examples of ZDBModifyThread


Examples of com.pcmsolutions.system.threads.ZDBModifyThread

        putValue(Action.SHORT_DESCRIPTION, commands[0].getDescriptiveString());
        putValue(Action.LONG_DESCRIPTION, commands[0].getDescriptiveString());
    }

    public void actionPerformed(final ActionEvent e) {
        new ZDBModifyThread("ZCommandAction") {
            public void run() {
                ZCommand command;
                int retVal = ZCommandInitializer.COMPLETED;
                int numCmds = commands.length;
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

        if (rotation == 0 || objs.length == 0)
            return;
        if (ParameterModelUtilities.syncModelEditingToUI)
            ParameterModelUtilities.wheelParameterModels(rotation, objs);
        else
            new ZDBModifyThread("Wheel moved") {
                public void run() {
                    synchronized (mouseWheelMonitor) {
                        ParameterModelUtilities.wheelParameterModels(rotation, objs);
                    }
                }
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

    RowHeaderedAndSectionedTablePanel scp;

    public SampleContextEditorPanel(final SampleContext sc) throws ZDeviceNotRunningException {
        AbstractAction rpc = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                new ZDBModifyThread("Refresh Sample Context") {
                    public void run() {
                    }
                }.start();
            }
        };
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

                            return false;
                    int r = ((SampleContextTable) comp).getSelectedRow();
                    if (r >= 0) {
                        final Object o = ((SampleContextTable) comp).getValueAt(r, 0);
                        if (o instanceof ContextEditableSample)
                            new ZDBModifyThread("Drop sample File list") {
                                public void run() {
                                    try {
                                        LoadContextSamplesZMTC.loadFilesToContext((ContextEditableSample) o, (File[]) legalFiles.toArray(new File[legalFiles.size()]));
                                    } catch (CommandFailedException e) {
                                        JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), e.getMessage(), "Command Failed", JOptionPane.ERROR_MESSAGE);
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

    private static int progressLabelWidth = 72;

    private void dropIsolatedSamples(final ContextSampleSelection ips, final Object[] destRowObjects) {
        final Object progressOwner = new Object();
        final Thread mt = new ZDBModifyThread("D&D: Transfer IsolatedSamples") {
            public void run() {
                final Zoeos z = Zoeos.getInstance();
                z.beginProgressElement(progressOwner, ZUtilities.makeExactLengthString("Copying Samples", progressLabelWidth), destRowObjects.length * 2);
                int errors = 0;
                try {
                    final int j = destRowObjects.length;
                    for (int i = j - 1; i >= 0; i--) {
                        final int f_i = i;
                        final Object sobj = destRowObjects[i];
                        if (sobj instanceof ContextEditableSample) {
                            IsolatedSample is = null;
                            try {
                                if (i == 0)
                                    is = ips.getIsolatedSample(i);
                                else
                                    is = ips.getIsolatedSample(i);
                                is.doAssert();
                            } catch (IsolatedSampleUnavailableException e) {
                                e.printStackTrace();
                            } finally {
                                z.updateProgressElement(progressOwner);
                                if (is == null) {
                                    z.updateProgressElement(progressOwner);
                                    if (i >= j - 1)
                                        z.endProgressElement(progressOwner);
                                    errors++;
                                    continue;
                                }
                            }
                            final IsolatedSample f_is = is;
                            // new ZDBModifyThread("D&D: New Samples from IsolatedSamples") {
                            //   public void run() {
                            // TODO!! should use a signal here to achieve correct ordering of threads
                            try {
                                z.setProgressElementIndeterminate(progressOwner, true);
                                z.updateProgressElementTitle(progressOwner, "Copying " + f_is.getName() + " to " + ((ContextEditableSample) sobj).getSampleDisplayName());
                                ((ContextEditableSample) sobj).newSample(f_is, f_is.getName());
                                f_is.zDispose();
                            } catch (NoSuchSampleException e) {
                                JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), e.getMessage(), "Problem", JOptionPane.ERROR_MESSAGE);
                                errors++;
                                continue;
                            } catch (IsolatedSampleUnavailableException e) {
                                JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), e.getMessage(), "Problem", JOptionPane.ERROR_MESSAGE);
                                errors++;
                                continue;
                            } finally {
                                z.setProgressElementIndeterminate(progressOwner, false);
                                z.updateProgressElement(progressOwner);
                                if (f_i >= j - 1)
                                    z.endProgressElement(progressOwner);
                            }
                            //  }
                            // }.stateStart();

                        } else {
                            z.updateProgressElement(progressOwner);
                            z.updateProgressElement(progressOwner);
                            if (i >= j - 1)
                                z.endProgressElement(progressOwner);
                            errors++;
                        }
                    }
                } finally {
                    if (errors == destRowObjects.length)
                        JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), (destRowObjects.length > 1 ? "None of the source samples could be copied" : "The source sample could not be copied"), "Problem", JOptionPane.ERROR_MESSAGE);
                    else if (errors > 0)
                        JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), errors + " of " + destRowObjects.length + " source samples could not be copied", "Problem", JOptionPane.ERROR_MESSAGE);
                }
            }
        };
        mt.start();
    }
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

        final JMenu freeMem = new JMenu("");
        freeMem.setEnabled(false);
        freeMemTimer = new Timer(freeMemInterval, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                new ZDBModifyThread("Sample Memory Monitor") {
                    public void run() {
                        try {
                            final Remotable.SampleMemory sm = sampleContext.getDeviceContext().getSampleMemory();
                            SwingUtilities.invokeLater(new Runnable() {
                                public void run() {
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

            buttPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));

            createButt = new JButton(new AbstractAction("Create & Save") {
                public void actionPerformed(ActionEvent e) {
                    dispose();
                    new ZDBModifyThread("Preset packaging") {
                        public void run() {
                            synchronized (NewPresetPackageZMTC.this) {
                                try {
                                    // TODO!! get his from user
                                    AudioFileFormat.Type format = AudioUtilities.defaultAudioFormat;
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

            }
        else if ((pobj instanceof UninitSampleObject)) {
            try {
                rt = (Thread) s2rt.get(sample);
                if (rt == null) {
                    rt = new ZDBModifyThread() {
                        public void run() {
                            try {
                                refreshSample(sc, sample);
                            } catch (NoSuchContextException e) {
                            } catch (NoSuchSampleException e) {
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

            }
        else if ((pobj instanceof UninitSampleObject)) {
            try {
                rt = (Thread) s2rt.get(sample);
                if (rt == null) {
                    rt = new ZDBModifyThread("Refresh Sample") {
                        public void run() {
                            try {
                                refreshSample(sc, sample);
                            } catch (NoSuchContextException e) {
                            } catch (NoSuchSampleException e) {
View Full Code Here

Examples of com.pcmsolutions.system.threads.ZDBModifyThread

            buttPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));

            createButt = new JButton(new AbstractAction("Create & Save") {
                public void actionPerformed(ActionEvent e) {
                    dispose();
                    new ZDBModifyThread("Sample packaging") {
                        public void run() {
                            synchronized (NewSamplePackageZMTC.this) {
                                try {
                                    // TODO!! get his from user
                                    AudioFileFormat.Type format = AudioUtilities.defaultAudioFormat;
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.