コード例 #1
0
 private void updateFieldTemplateEnablement() {
   // Get the splash info if any
   ISplashInfo info = getSplashInfo();
   // Enable section under the following conditions:
   // (1) Product ID is defined
   // (2) Progress geometry is NOT defined
   // (3) Progress geometry is defined and splash handler type is defined
   if ((PDETextHelper.isDefined(getProduct().getProductId()) == false)
       || ((info.isDefinedGeometry() == true) && (info.isDefinedSplashHandlerType() == false))) {
     fFieldTemplateCombo.setEnabled(false);
   } else {
     fFieldTemplateCombo.setEnabled(true);
   }
 }
コード例 #2
0
 private void updateFieldProgressEnablement() {
   // Get the splash info if any
   ISplashInfo info = getSplashInfo();
   // Enable section under the following conditions:
   // (1) Product ID is defined
   // (2) Progress geometry is defined
   // (3) Splash handler type is NOT defined
   if ((PDETextHelper.isDefined(getProduct().getProductId()) == false)
       || ((info.isDefinedGeometry() == false) && (info.isDefinedSplashHandlerType() == true))) {
     fAddBarButton.setEnabled(false);
     fAddMessageButton.setEnabled(false);
     updateFieldProgressBarEnablement(false);
     updateFieldProgressMessageEnablement(false);
   } else {
     fAddBarButton.setEnabled(isEditable());
     fAddMessageButton.setEnabled(isEditable());
     updateFieldProgressBarEnablement(isEditable());
     updateFieldProgressMessageEnablement(isEditable());
   }
 }
コード例 #3
0
 private void updateUIFieldTemplateCombo() {
   // Update this sections enablement
   updateFieldEnablement();
   // Get the splash info if any
   ISplashInfo info = getSplashInfo();
   if (info.isDefinedSplashHandlerType() == false) {
     // No splash handler type defined, set "none" in combo box
     fFieldTemplateCombo.setText(PDEUIMessages.SplashConfigurationSection_none);
     return;
   }
   String splashHandlerType = info.getFieldSplashHandlerType();
   // Update the splash handler type in the combo box
   for (String[] typeChoice : ISplashHandlerConstants.F_SPLASH_SCREEN_TYPE_CHOICES) {
     String key = typeChoice[0];
     if (splashHandlerType.equals(key)) {
       String displayName = typeChoice[1];
       fFieldTemplateCombo.setText(displayName);
     }
   }
 }