All pastes #758295 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-02 02:03 UTC
rendered paste body
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mmc;

/**
 *
 * @author meta
 */
public class btHandler implements Runnable {

    private mmcMenu parent;
    private String todo;
    
    
    public btHandler(mmcMenu gui) {
    parent = gui;
    
    }
    
    
    public void run() {
        if(todo.equals("dDevices")) dDevices();
        if(todo.equals("dServices")) dServices();
        
    }
    
    // a method for discovering devices
    private void dDevices() {}
    public void discoverDevices() {
    todo = "dDevices";
        
    Thread t = new Thread(this);
    t.start();
    
    
   }
    // a method for discovering the services of the (the previously discovered, or a specified one) macs
    private void dServices() {}
    public void discoverServices() {
    todo = "dServices";
        
    Thread t = new Thread(this);
    t.start();
    
    
   }
    

}