javacommons/utils/javasrc/com/nokia/mj/impl/coreui/CoreUi.java
changeset 80 d6dafc5d983f
parent 67 63b81d807542
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
   139         {
   139         {
   140             sInstance.hideApplicationImpl(hide);
   140             sInstance.hideApplicationImpl(hide);
   141         }
   141         }
   142     }
   142     }
   143 
   143 
       
   144     /**
       
   145      * Executes given Runnable synchronously in UI thread.
       
   146      * <br>
       
   147      * This method should only be used in cases where it
       
   148      * is absolutely needed. Before using this method,
       
   149      * consider carefully if the use case really requires
       
   150      * code to be executed in UI thread.
       
   151      * <br>
       
   152      * This method is only supported in Qt based runtimes.
       
   153      * <br>
       
   154      * @param runnable Runnable to be executed
       
   155      * @throws RuntimeException if execution in UI thread
       
   156      * is not supported
       
   157      */
       
   158     public static void runInSyncUiThread(Runnable runnable)
       
   159     {
       
   160         if (sInstance != null)
       
   161         {
       
   162             sInstance.runInSyncUiThreadImpl(runnable);
       
   163         }
       
   164     }
       
   165 
       
   166     /**
       
   167      * Executes given Runnable asynchronously in UI thread.
       
   168      * <br>
       
   169      * This method should only be used in cases where it
       
   170      * is absolutely needed. Before using this method,
       
   171      * consider carefully if the use case really requires
       
   172      * code to be executed in UI thread.
       
   173      * <br>
       
   174      * This method is only supported in Qt based runtimes.
       
   175      * <br>
       
   176      * @param runnable Runnable to be executed
       
   177      * @throws RuntimeException if execution in UI thread
       
   178      * is not supported
       
   179      */
       
   180     public static void runInAsyncUiThread(Runnable runnable)
       
   181     {
       
   182         if (sInstance != null)
       
   183         {
       
   184             sInstance.runInAsyncUiThreadImpl(runnable);
       
   185         }
       
   186     }
       
   187 
   144     protected abstract boolean connectToUiImpl();
   188     protected abstract boolean connectToUiImpl();
   145     protected abstract void createUiImpl(Uid uid, boolean backGroundStart);
   189     protected abstract void createUiImpl(Uid uid, boolean backGroundStart);
   146     protected abstract void shutdownRequestImpl();
   190     protected abstract void shutdownRequestImpl();
   147     protected abstract void foregroundRequestImpl();
   191     protected abstract void foregroundRequestImpl();
   148     protected abstract boolean isUiInForegroundImpl();
   192     protected abstract boolean isUiInForegroundImpl();
   149     protected abstract void hideApplicationImpl(boolean hide);
   193     protected abstract void hideApplicationImpl(boolean hide);
       
   194     protected abstract void runInSyncUiThreadImpl(Runnable runnable);
       
   195     protected abstract void runInAsyncUiThreadImpl(Runnable runnable);
   150 }
   196 }