tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / preferences / SDViewerPage.java
index 8c2a8672a9e07e4c4012620b3844779fa7a51763..6e5e8f835f4ca385670e6882312e0ed947ddafbc 100755 (executable)
@@ -1,16 +1,15 @@
 /**********************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * Copyright (c) 2011, 2012 Ericsson.
- * 
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
- * IBM - Initial API and implementation
- * Bernd Hufmann - Updated for TMF
+ *
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *     Bernd Hufmann - Updated for TMF
  **********************************************************************/
+
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences;
 
 import java.util.Iterator;
@@ -37,7 +36,7 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
 
 /**
  * The Sequence Diagram preferences page implementation.
- * 
+ *
  * @version 1.0
  * @author sveyrier
  */
@@ -50,7 +49,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
      * Temporary preferences tag
      */
     protected static final String TEMP_TAG = SDViewPref.TEMP_TAG;
-    
+
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
@@ -103,24 +102,10 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
      */
     protected IntegerFieldEditor fLifelineWidth = null;
 
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-    /**
-     * Default constructor
-     */
-    public SDViewerPage() {
-        super();
-    }
-
     // ------------------------------------------------------------------------
     // Methods
     // ------------------------------------------------------------------------
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
-     */
     @Override
     protected Control createContents(Composite parent) {
         parent.setLayout(new GridLayout());
@@ -131,21 +116,21 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         page.setLayoutData(pageLayoutdata);
         page.setLayout(pageLayout);
 
-        fTooltip = new BooleanFieldEditor(SDViewPref.PREF_TOOLTIP, SDMessages._97, page);
+        fTooltip = new BooleanFieldEditor(ISDPreferences.PREF_TOOLTIP, SDMessages._97, page);
         fTooltip.setPreferenceStore(fPreferences.getPreferenceStore());
         fTooltip.load();
 
         // link font with zoom pref
-        fLink = new BooleanFieldEditor(SDViewPref.PREF_LINK_FONT, SDMessages._82, page);
+        fLink = new BooleanFieldEditor(ISDPreferences.PREF_LINK_FONT, SDMessages._82, page);
         fLink.setPreferenceStore(fPreferences.getPreferenceStore());
         fLink.load();
 
-        fNoExternalTime = new BooleanFieldEditor(SDViewPref.PREF_EXCLUDE_EXTERNAL_TIME, SDMessages._83, page);
+        fNoExternalTime = new BooleanFieldEditor(ISDPreferences.PREF_EXCLUDE_EXTERNAL_TIME, SDMessages._83, page);
         fNoExternalTime.setPreferenceStore(fPreferences.getPreferenceStore());
         fNoExternalTime.load();
 
         // use gradient color pref
-        fUseGrad = new BooleanFieldEditor(SDViewPref.PREF_USE_GRADIENT, SDMessages._84, page);
+        fUseGrad = new BooleanFieldEditor(ISDPreferences.PREF_USE_GRADIENT, SDMessages._84, page);
         fUseGrad.setPreferenceStore(fPreferences.getPreferenceStore());
         fUseGrad.load();
 
@@ -160,7 +145,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         prefPage.setLayout(prefPageLayout);
 
         // swimLane width pref
-        fLifelineWidth = new IntegerFieldEditor(SDViewPref.PREF_LIFELINE_WIDTH, SDMessages._80, prefPage);
+        fLifelineWidth = new IntegerFieldEditor(ISDPreferences.PREF_LIFELINE_WIDTH, SDMessages._80, prefPage);
         fLifelineWidth.setPreferenceStore(fPreferences.getPreferenceStore());
         fLifelineWidth.setValidRange(119, 500);
         fLifelineWidth.load();
@@ -212,19 +197,11 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         return page;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-     */
     @Override
     public void init(IWorkbench workbench) {
         fPreferences = SDViewPref.getInstance();
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.preference.PreferencePage#performApply()
-     */
     @Override
     protected void performApply() {
         // Store the prefrences in the PreferenceStore
@@ -247,20 +224,12 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         swapPref(true);
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.preference.PreferencePage#performOk()
-     */
     @Override
     public boolean performOk() {
         performApply();
         return true;
     }
-    
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
-     */
+
     @Override
     protected void performDefaults() {
         fLink.loadDefault();
@@ -331,10 +300,6 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         fTextColor.load();
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-     */
     @Override
     public void widgetSelected(SelectionEvent e) {
         // Store the past set font preference or else the
@@ -345,7 +310,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         fTextColor.store();
 
         String[] fontList = SDViewPref.getFontList();
-        
+
         // set the FontFieldEditor for the new selected graphNode font
         fFont.setPreferenceName(fontList[fClassItemList.getSelectionIndex()] + TEMP_TAG);
         fFont.load();
@@ -360,27 +325,32 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         fTextColor.load();
 
         // No Background for message graphNodes
-        if ((fontList[fClassItemList.getSelectionIndex()].equals(SDViewPref.PREF_SYNC_MESS)) || (fontList[fClassItemList.getSelectionIndex()].equals(SDViewPref.PREF_SYNC_MESS_RET))
-                || (fontList[fClassItemList.getSelectionIndex()].equals(SDViewPref.PREF_ASYNC_MESS)) || (fontList[fClassItemList.getSelectionIndex()].equals(SDViewPref.PREF_ASYNC_MESS_RET))) {
+        if ((fontList[fClassItemList.getSelectionIndex()].equals(ISDPreferences.PREF_SYNC_MESS)) || (fontList[fClassItemList.getSelectionIndex()].equals(ISDPreferences.PREF_SYNC_MESS_RET))
+                || (fontList[fClassItemList.getSelectionIndex()].equals(ISDPreferences.PREF_ASYNC_MESS)) || (fontList[fClassItemList.getSelectionIndex()].equals(ISDPreferences.PREF_ASYNC_MESS_RET))) {
             fBackGroundColor.setEnabled(false, fButtonArea);
         } else {
             fBackGroundColor.setEnabled(true, fButtonArea);
         }
 
         // No font used for execution occurrence and global frame
-        if ((fontList[fClassItemList.getSelectionIndex()].equals(SDViewPref.PREF_EXEC)) || (fontList[fClassItemList.getSelectionIndex()].equals(SDViewPref.PREF_FRAME))) {
+        if ((fontList[fClassItemList.getSelectionIndex()].equals(ISDPreferences.PREF_EXEC)) || (fontList[fClassItemList.getSelectionIndex()].equals(ISDPreferences.PREF_FRAME))) {
             fTextColor.setEnabled(false, fButtonArea);
         } else {
             fTextColor.setEnabled(true, fButtonArea);
         }
 
-        if (fontList[fClassItemList.getSelectionIndex()].equals(SDViewPref.PREF_FRAME)) {
+        if (fontList[fClassItemList.getSelectionIndex()].equals(ISDPreferences.PREF_FRAME)) {
             fFont.setEnabled(false, fButtonArea);
         } else {
             fFont.setEnabled(true, fButtonArea);
         }
     }
 
+    /**
+     * Swap viewer preferences.
+     *
+     * @param toTemp Switch to the temporary preferences
+     */
     protected void swapPref(boolean toTemp) {
         String TAG1 = "";//$NON-NLS-1$
         String TAG2 = TEMP_TAG;
@@ -452,10 +422,6 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
-     */
     @Override
     public void widgetDefaultSelected(SelectionEvent e) {
     }
This page took 0.026767 seconds and 5 git commands to generate.