當前位置: 首頁>>代碼示例>>Java>>正文


Java ActionListener類代碼示例

本文整理匯總了Java中org.cybergarage.upnp.control.ActionListener的典型用法代碼示例。如果您正苦於以下問題:Java ActionListener類的具體用法?Java ActionListener怎麽用?Java ActionListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ActionListener類屬於org.cybergarage.upnp.control包,在下文中一共展示了ActionListener類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: performActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public boolean performActionListener(ActionRequest actionReq)
{
	ActionListener listener = (ActionListener)getActionListener();
	if (listener == null)
		return false;
	ActionResponse actionRes = new ActionResponse();
	setStatus(UPnPStatus.INVALID_ACTION);
	clearOutputAgumentValues();
	if (listener.actionControlReceived(this) == true) {
		actionRes.setResponse(this);
	}
	else {
		UPnPStatus upnpStatus = getStatus();
		actionRes.setFaultResponse(upnpStatus.getCode(), upnpStatus.getDescription());
	}
	if (Debug.isOn() == true)
		actionRes.print();
	actionReq.post(actionRes);
	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:21,代碼來源:Action.java

示例2: actionControlReceived

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public boolean actionControlReceived(Action action) {
    if (action.getName() == null) {
        return false;
    }
    MediaRenderer dmr = getMediaRenderer();
    if (dmr == null) {
        return false;
    }
    ActionListener listener = dmr.getActionListener();
    if (listener == null) {
        return false;
    }
    listener.actionControlReceived(action);
    return false;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:16,代碼來源:ConnectionManager.java

示例3: setActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public void setActionListener(ActionListener listener)
{
	ServiceList serviceList = getServiceList();
	int nServices = serviceList.size();
	for (int n=0; n<nServices; n++) {
		Service service = serviceList.getService(n);
		service.setActionListener(listener);
	}
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:10,代碼來源:Device.java

示例4: setActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public void setActionListener(ActionListener listener)
{
	ActionList actionList = getActionList();
	int nActions = actionList.size();
	for (int n=0; n<nActions; n++) {
		Action action = actionList.getAction(n);
		action.setActionListener(listener);
	}
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:10,代碼來源:Service.java

示例5: setActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public void setActionListener(ActionListener listener) {
	ServiceList serviceList = getServiceList();
	int nServices = serviceList.size();
	for (int n = 0; n < nServices; n++) {
		Service service = serviceList.getService(n);
		service.setActionListener(listener);
	}
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:9,代碼來源:Device.java

示例6: setActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public void setActionListener(ActionListener listener) {
    this.actionListener = listener;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:4,代碼來源:MediaRenderer.java

示例7: getActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public ActionListener getActionListener() {
    return this.actionListener;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:4,代碼來源:MediaRenderer.java

示例8: actionControlReceived

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public boolean actionControlReceived(Action action) {
    String actionName = action.getName();
    if (actionName == null) {
        return false;
    }
    boolean isActionSuccess = false;
    if (actionName.equals(SETAVTRANSPORTURI)) {
        AVTransportInfo avTransInfo = new AVTransportInfo();
        avTransInfo.setInstanceID(action.getArgument("InstanceID").getIntegerValue());
        avTransInfo.setURI(action.getArgument(CURRENTURI).getValue());
        avTransInfo.setURIMetaData(action.getArgument(CURRENTURIMETADATA).getValue());
        setCurrentAvTransInfo(avTransInfo);
        isActionSuccess = true;
    }
    if (actionName.equals(SETNEXTAVTRANSPORTURI)) {
        avTransInfo = new AVTransportInfo();
        avTransInfo.setInstanceID(action.getArgument("InstanceID").getIntegerValue());
        avTransInfo.setURI(action.getArgument(NEXTURI).getValue());
        avTransInfo.setURIMetaData(action.getArgument(NEXTURIMETADATA).getValue());
        setNextAvTransInfo(avTransInfo);
        isActionSuccess = true;
    }
    if (actionName.equals(GETMEDIAINFO)) {
        int instanceID = action.getArgument("InstanceID").getIntegerValue();
        synchronized (this.avTransInfoList) {
            int avTransInfoCnt = this.avTransInfoList.size();
            for (int n = 0; n < avTransInfoCnt; n++) {
                avTransInfo = this.avTransInfoList.getAVTransportInfo(n);
                if (avTransInfo != null && avTransInfo.getInstanceID() == instanceID) {
                    action.getArgument(CURRENTURI).setValue(avTransInfo.getURI());
                    action.getArgument(CURRENTURIMETADATA).setValue(avTransInfo.getURIMetaData());
                }
            }
        }
        return false;
    }
    if (actionName.equals(PLAY)) {
        instanceID = action.getArgument("InstanceID").getIntegerValue();
        int speed = action.getArgument(SPEED).getIntegerValue();
        isActionSuccess = true;
    }
    if (actionName.equals(STOP)) {
        instanceID = action.getArgument("InstanceID").getIntegerValue();
        isActionSuccess = true;
    }
    if (actionName.equals(PAUSE)) {
        instanceID = action.getArgument("InstanceID").getIntegerValue();
        isActionSuccess = true;
    }
    MediaRenderer dmr = getMediaRenderer();
    if (dmr == null) {
        return isActionSuccess;
    }
    ActionListener listener = dmr.getActionListener();
    if (listener == null) {
        return isActionSuccess;
    }
    listener.actionControlReceived(action);
    return isActionSuccess;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:61,代碼來源:AVTransport.java

示例9: getActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public ActionListener getActionListener() 
{
	return getActionData().getActionListener();
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:5,代碼來源:Action.java

示例10: setActionListener

import org.cybergarage.upnp.control.ActionListener; //導入依賴的package包/類
public void setActionListener(ActionListener listener) 
{
	getActionData().setActionListener(listener);
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:5,代碼來源:Action.java


注:本文中的org.cybergarage.upnp.control.ActionListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。