www.pudn.com > Bluegammon蓝牙的应用编程.rar > PopupCanvas.java


// Copyright (c) 2005 Sony Ericsson Mobile Communications AB 
// 
// This software is provided "AS IS," without a warranty of any kind.  
// ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,  
// INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A  
// PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.  
// 
// THIS SOFTWARE IS COMPLEMENTARY OF JAYWAY AB (www.jayway.se) 
 
package bluegammon.gui; 
 
import javax.microedition.lcdui.Canvas; 
 
import bluegammon.gui.popup.Popup; 
 
/** 
 * Represents a canvas that can show popups. 
 * @author Peter Andersson 
 */ 
public abstract class PopupCanvas extends Canvas 
{ 
  	/** The popup in this canvas */ 
	protected Popup m_popup; 
	 
	/** 
	 * Returns the popup in this canvas or null if popup. 
	 * @return	The current popup or null. 
	 */ 
	public Popup getPopup() 
	{ 
		return m_popup; 
	} 
	 
	/** 
	 * Sets the popup in this canvas. 
	 * @param p	The popup. 
	 */ 
	public void setPopup(Popup p) 
	{ 
		m_popup = p; 
	} 
}