javauis/lcdui_qt/src/javax/microedition/lcdui/CustomItemBuffer.java
changeset 35 85266cc22c7f
parent 26 dc7c549001d5
child 40 c6043ea9b06a
child 44 0105bdca6f9c
child 47 f40128debb5d
child 49 35baca0e7a2e
equal deleted inserted replaced
26:dc7c549001d5 35:85266cc22c7f
     1 /*
       
     2 * Copyright (c) 2009,2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 package javax.microedition.lcdui;
       
    18 
       
    19 import org.eclipse.swt.graphics.Rectangle;
       
    20 import org.eclipse.swt.internal.qt.graphics.GraphicsContext;
       
    21 import org.eclipse.swt.widgets.Control;
       
    22 
       
    23 final class CustomItemBuffer extends Buffer
       
    24 {
       
    25 
       
    26     private CustomItem host;
       
    27 
       
    28     CustomItemBuffer(CustomItem customItem, Control ctrl)
       
    29     {
       
    30         super();
       
    31         setControlBounds(ctrl);
       
    32         host = customItem;
       
    33     }
       
    34 
       
    35     int getHostType()
       
    36     {
       
    37         return HOST_TYPE_CUSTOMITEM;
       
    38     }
       
    39 
       
    40     void setupWindowSurface()
       
    41     {
       
    42         throw new IllegalStateException("not impl yet");
       
    43         // TODO Auto-generated method stub
       
    44 
       
    45     }
       
    46 
       
    47     Object getHost()
       
    48     {
       
    49         return host;
       
    50     }
       
    51 
       
    52     void bindToHost(GraphicsContext gc)
       
    53     {
       
    54         gc.bindTarget(super.windowSurface);
       
    55     }
       
    56 
       
    57 }