javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/LaunchAppQueryView.java
changeset 47 f40128debb5d
parent 35 85266cc22c7f
child 72 1f0034e370aa
equal deleted inserted replaced
35:85266cc22c7f 47:f40128debb5d
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 package com.nokia.mj.impl.installer.ui.eswt2;
    19 package com.nokia.mj.impl.installer.ui.eswt2;
    20 
    20 
    21 import com.nokia.mj.impl.installer.ui.InstallInfo;
       
    22 import com.nokia.mj.impl.installer.ui.LaunchAppInfo;
    21 import com.nokia.mj.impl.installer.ui.LaunchAppInfo;
    23 
    22 
    24 import org.eclipse.swt.SWT;
       
    25 import org.eclipse.swt.widgets.Composite;
    23 import org.eclipse.swt.widgets.Composite;
    26 import org.eclipse.swt.widgets.Button;
       
    27 
    24 
    28 /**
    25 /**
    29  * LaunchAppQueryView asks from the user if the installed
    26  * LaunchAppQueryView asks from the user if the installed
    30  * application should be displayed.
    27  * application should be displayed.
    31  */
    28  */
    32 public class LaunchAppQueryView extends ConfirmationViewBase
    29 public class LaunchAppQueryView extends ConfirmationViewBase
    33 {
    30 {
    34     private LaunchAppInfo iLaunchAppInfo = null;
       
    35     private Button iDefaultButton = null;
       
    36 
       
    37     /** Constructor */
    31     /** Constructor */
    38     protected LaunchAppQueryView()
    32     protected LaunchAppQueryView()
    39     {
    33     {
    40         super();
    34         super();
    41     }
    35     }
    56         if (isDisposed() || aLaunchAppInfo == null)
    50         if (isDisposed() || aLaunchAppInfo == null)
    57         {
    51         {
    58             return false;
    52             return false;
    59         }
    53         }
    60 
    54 
    61         iLaunchAppInfo = aLaunchAppInfo;
       
    62         // Use confirm() from super class to display the view.
    55         // Use confirm() from super class to display the view.
    63         boolean result = confirm();
    56         boolean result = confirm();
    64         // Return the result to the client.
    57         // Return the result to the client.
    65         return result;
    58         return result;
    66     }
    59     }
    79      */
    72      */
    80     protected void getDataFromView()
    73     protected void getDataFromView()
    81     {
    74     {
    82         // User selection data is initialized in button listeners.
    75         // User selection data is initialized in button listeners.
    83     }
    76     }
    84 
       
    85     /**
       
    86      * Returns SWT style for this view.
       
    87      */
       
    88     protected int getStyle()
       
    89     {
       
    90         return SWT.V_SCROLL;
       
    91     }
       
    92 
       
    93     /**
       
    94      * Called after view and commands have been created. Subclasses
       
    95      * can overrride this method to set focus to their own default
       
    96      * commands.
       
    97      */
       
    98     protected void setDefaultCommand()
       
    99     {
       
   100         if (iDefaultButton != null)
       
   101         {
       
   102             iDefaultButton.setFocus();
       
   103             getShell().setDefaultButton(iDefaultButton);
       
   104         }
       
   105     }
       
   106 }
    77 }