FileDocCategorySizeDatePackage
MMCustomItem.javaAPI DocphoneME MR2 API (J2ME)4554Wed May 02 16:47:10 BST 2007com.sun.mmedia

MMCustomItem

public abstract class MMCustomItem extends CustomItem
CustomItem, which supports full screen (as an off-screen canvas, replacing current Displayable)...

Fields Summary
private Canvas
fullScreen
private Display
display
private Displayable
oldDisplayable
private javax.microedition.media.control.VideoControl
callerVideoControl
private MIDPVideoPainter
videoPainter
Constructors Summary
protected MMCustomItem(String label)


    // Constructor
        super(label); 
Methods Summary
public CanvastoFullScreen(javax.microedition.media.control.VideoControl caller, MIDPVideoPainter painter)

        if (fullScreen == null) {
            fullScreen = new FullScreenCanvas();
        }

        if (display == null) {
            MMHelper mmh = MMHelper.getMMHelper();
            if (mmh == null)
                return null;

            display = mmh.getItemDisplay(this);
            if (display == null)
                return null;
        }

        callerVideoControl = caller;
        videoPainter = painter;
        
        if (oldDisplayable == null)
            oldDisplayable = display.getCurrent();

        // Setting fullscreen canvas
        display.setCurrent(fullScreen);

        fullScreen.setFullScreenMode(true);

        return fullScreen;
    
public voidtoNormal()

        
        if (oldDisplayable != null) {
            display.setCurrent(oldDisplayable);
            oldDisplayable = null;
        }

        callerVideoControl = null;
        videoPainter = null;