Package com.pcmsolutions.system.threads

Examples of com.pcmsolutions.system.threads.ZDefaultThread


        public void setVoiceNumber(Integer voice) {
            this.voice = voice;
        }

        public void performOpenAction() {
            new ZDefaultThread() {
                public void run() {
                    try {
                        assertPresetInitialized();
                         if (getDeviceContext().getDevicePreferences().ZPREF_useTabbedVoicePanel.getValue())
                            getDeviceContext().getViewManager().openTabbedVoice(Impl_ReadablePreset.Impl_ReadableVoice.this, getDeviceContext().getDevicePreferences().ZPREF_groupEnvelopesWhenVoiceTabbed.getValue(), true);
View Full Code Here


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

            if (replies == null)
                return;
            final MidiDeviceMarshall m = MidiDeviceMarshall.getInstance();

            System.out.println(Zoeos.getZoeosTime() + ": " + "DEVICE HUNT REPLIES: " + replies.size());
            Thread t = new ZDefaultThread("Device Hunt Results") {
                public void run() {
                    int num = replies.size();
                    int duped = 0;
                    if (num == 0)
                        new FlashMsg(ZoeosFrame.getInstance(), 2500, 500, FlashMsg.colorWarning, "NO DEVICES FOUND DURING HUNT");
                    else {
                        List unlicensed = new ArrayList();
                        for (Iterator i = replies.iterator(); i.hasNext();) {
                            final SysexTransactionRecord str = (SysexTransactionRecord) i.next();
                            ZExternalDevice d = m.tryIdentify(str);
                            if (d != null) {
                                ZExternalDevice dup = getDuplicate(d.getDeviceIdentityMessage());
                                if (dup == null) {
                                    if (!isDemo() && d instanceof LicensedEntity && !checkLicensed((LicensedEntity) d)) {
                                        unlicensed.add(d);
                                        continue;
                                    } else if (isDemo() && /*SecurityPreferences.expired()*/false) {
                                        unlicensed.add(d);
                                        continue;
                                    }

                                    devices.put(d, d.getDeviceIdentityMessage());
                                    //serializeDeviceMarshalling.setSelected(sun.getBoolean(Zoeos.PREF_serializeDeviceMarshalling, true));

                                    if (!ZoeosPreferences.ZPREF_stopHuntAtPending.getValue())
                                    //if (startBarrier == false)
                                        startDevice(d);
                                    else {
                                        Impl_ZDeviceManager.this.firePendingListChanged();
                                        Impl_ZDeviceManager.this.fireStoppedListChanged();
                                        Impl_ZDeviceManager.this.fireStartedListChanged();
                                        ZoeosFrame.getInstance().showDeviceManager();
                                    }
                                } else {
                                    duped++;
                                    duplicateDevices.put(d, dup);
                                    Impl_ZDeviceManager.this.fireDuplicateListChanged();
                                    System.out.println(Zoeos.getZoeosTime() + ": " + "DUPLICATE MIDI DEVICE: " + str.getReply());
                                }
                            } else {
                                unidentifiedMessages.add(str.getReply());
                                Impl_ZDeviceManager.this.fireUnidentifiedListChanged();
                                System.out.println(Zoeos.getZoeosTime() + ": " + "UNRESOLVED MIDI DEVICE: " + str.getReply());
                            }
                        }
                        if (unlicensed.size() > 0) {
                            UserMessaging.showError(unlicensed.size() + (unlicensed.size() == 1 ? " device was" : " devices were") + " not marshalled due to insufficient licensing");
                            ZUtilities.zDisposeCollection(unlicensed);
                            unlicensed.clear();
                        }

                        if (duped == num)
                            new FlashMsg(ZoeosFrame.getInstance(), 2500, 500, FlashMsg.colorWarning, "NO DEVICES MARSHALLED FROM HUNT");
                    }
                }
            };
            t.start();
        }
View Full Code Here

                }
            }
        }

        public void startDevice(final ZExternalDevice d) {
            Thread t = new ZDefaultThread() {
                public void run() {
                    setName("StartDeviceThread");
                    taskStartDevice(d);
                }
            };
            t.start();
        }
View Full Code Here

                e.printStackTrace();
            }
        }

        public void stopDevice(final ZExternalDevice d, final String reason) {
            Thread t = new ZDefaultThread() {
                public void run() {
                    setName("StopDeviceThread");
                    taskStopDevice(d, reason);
                }
            };
            t.start();
        }
View Full Code Here

                e.printStackTrace();
            }
        }

        public void removeDevice(final ZExternalDevice d, final boolean saveState) {
            Thread t = new ZDefaultThread() {
                public void run() {
                    setName("RemoveDeviceThread");
                    taskRemoveDevice(d, saveState);
                }
            };
            t.start();
        }
View Full Code Here

                e.printStackTrace();
            }
        }

        public void revokeDevices() {
            Thread t = new ZDefaultThread() {
                public void run() {
                    setName("RevokeDevicesThread");
                    taskRevokeDevices(null);
                }
            };
            t.start();
        }
View Full Code Here

                }
            }
        }

        public void unrevokeDevices() {
            Thread t = new ZDefaultThread() {
                public void run() {
                    setName("unrevokeDevicesThread");
                    taskUnrevokeDevices();
                }
            };
            t.start();
        }
View Full Code Here

             public void setStartBarrier(boolean v) {
                 startBarrier = v;
             }
          */
        public void clearUnidentified() {
            Thread t = new ZDefaultThread("Clear unidentified device messages") {
                public void run() {
                    unidentifiedMessages.clear();
                    fireUnidentifiedListChanged();
                }
            };
            t.start();
        }
View Full Code Here

        public Map getDuplicateMap() {
            return ((Hashtable) duplicateDevices.clone());
        }

        public void clearDuplicates() {
            Thread t = new ZDefaultThread() {
                public void run() {
                    synchronized (duplicateDevices) {
                        ZUtilities.zDisposeCollection(duplicateDevices.keySet());
                        duplicateDevices.clear();
                    }
                    fireDuplicateListChanged();
                }
            };
            t.start();
        }
View Full Code Here

TOP

Related Classes of com.pcmsolutions.system.threads.ZDefaultThread

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.