javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Toolkit.java
branchRCL_3
changeset 23 e5618cc85d74
parent 19 71c436fe3ce0
child 24 6c158198356e
equal deleted inserted replaced
21:4376525cdefb 23:e5618cc85d74
    93     protected Vector tmpDisplayables;     //temporary Vector of created Displayables
    93     protected Vector tmpDisplayables;     //temporary Vector of created Displayables
    94     protected boolean activated = false;  //events are dispatched only if Toolkit is active, see Toolkit.start()
    94     protected boolean activated = false;  //events are dispatched only if Toolkit is active, see Toolkit.start()
    95 
    95 
    96     // NGA specific change
    96     // NGA specific change
    97     private int iFlags = FLAG_NONE;
    97     private int iFlags = FLAG_NONE;
    98     
    98 
    99     //
    99     //
   100     // Event source : must keep in sync with TSourceType in lcdui.h
   100     // Event source : must keep in sync with TSourceType in lcdui.h
   101     //
   101     //
   102     private static final int ITEM                           = 3;
   102     private static final int ITEM                           = 3;
   103     private static final int DISPLAYABLE                    = 4;
   103     private static final int DISPLAYABLE                    = 4;
   126     static final int EVENT_COMMAND     = 24;
   126     static final int EVENT_COMMAND     = 24;
   127     static final int EVENT_VISIBLE     = 25;
   127     static final int EVENT_VISIBLE     = 25;
   128     static final int EVENT_TRAVERSE    = 26;
   128     static final int EVENT_TRAVERSE    = 26;
   129     static final int EVENT_SET_CURRENT = 29;
   129     static final int EVENT_SET_CURRENT = 29;
   130     static final int EVENT_SERIAL      = 30;
   130     static final int EVENT_SERIAL      = 30;
   131     
   131 
   132     static final int EVET_CANVAS_GRAPHICS_ITEM_REPAINT = 31;
   132     static final int EVET_CANVAS_GRAPHICS_ITEM_REPAINT = 31;
   133     static final int EVENT_M3G_DRAW = 32 ;
   133     static final int EVENT_M3G_DRAW = 32 ;
   134     // IMPLICIT EVENT TYPES
   134     // IMPLICIT EVENT TYPES
   135     static final int EVENT_DISMISS = 0;         // ALERT
   135     static final int EVENT_DISMISS = 0;         // ALERT
   136     static final int EVENT_ITEM_CHANGED = 0;    // ITEM(S)
   136     static final int EVENT_ITEM_CHANGED = 0;    // ITEM(S)
   137     static final int EVENT_SELECT  = 0;         // LIST
   137     static final int EVENT_SELECT  = 0;         // LIST
   138     
   138 
   139 
   139 
   140     //
   140     //
   141     // Op codes for syncing to screen
   141     // Op codes for syncing to screen
   142     // These must be kept in sync with MMIDCanvas::TDrawOp
   142     // These must be kept in sync with MMIDCanvas::TDrawOp
   143     //
   143     //
   145     private static final int SYNC_RECT = 1;
   145     private static final int SYNC_RECT = 1;
   146 
   146 
   147     // NGA specific change.
   147     // NGA specific change.
   148     // Op code indicating M3G content start
   148     // Op code indicating M3G content start
   149     private static final int M3G_CONTENT_START = 2;
   149     private static final int M3G_CONTENT_START = 2;
   150     
   150 
   151     Toolkit(ToolkitInvoker aInvoker)
   151     Toolkit(ToolkitInvoker aInvoker)
   152     {
   152     {
   153         iInvoker     = aInvoker;
   153         iInvoker     = aInvoker;
   154         tmpDisplayables = new Vector();
   154         tmpDisplayables = new Vector();
   155 
   155 
   580             final int lastIndex = iObservers.size() - 1;
   580             final int lastIndex = iObservers.size() - 1;
   581             for (int ii=lastIndex; ii>=0; ii--)
   581             for (int ii=lastIndex; ii>=0; ii--)
   582             {
   582             {
   583                 if (iObservers.elementAt(ii) instanceof ToolkitObserverNGAExtension)
   583                 if (iObservers.elementAt(ii) instanceof ToolkitObserverNGAExtension)
   584                 {
   584                 {
   585                     final ToolkitObserverNGAExtension observer = 
   585                     final ToolkitObserverNGAExtension observer =
   586                                 (ToolkitObserverNGAExtension)iObservers.elementAt(ii);
   586                         (ToolkitObserverNGAExtension)iObservers.elementAt(ii);
   587                     observer.foregroundEvent(foreground);
   587                     observer.foregroundEvent(foreground);
   588                 }
   588                 }
   589             }
   589             }
   590         }
   590         }
   591     }
   591     }