ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / preferences / SDViewerPage.java
index 30c59d4ebe90340df2082f247aceb54660c47623..43d922daf84e6a86ce9b480efd3ef0c8c0b63cdd 100755 (executable)
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2014 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
@@ -48,7 +48,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
     /**
      * Temporary preferences tag
      */
-    protected static final String TEMP_TAG = SDViewPref.TEMP_TAG;
+    private static final String TEMP_TAG = SDViewPref.TEMP_TAG;
 
     // ------------------------------------------------------------------------
     // Attributes
@@ -56,51 +56,51 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
     /**
      * The preference handler used to access the PreferenceStore
      */
-    protected SDViewPref fPreferences = null;
+    private SDViewPref fPreferences = null;
     /**
      * BackGround color selector
      */
-    protected ColorFieldEditor fLineColor = null;
+    private ColorFieldEditor fLineColor = null;
     /**
      * Foreground color selector
      */
-    protected ColorFieldEditor fBackGroundColor = null;
+    private ColorFieldEditor fBackGroundColor = null;
     /**
      * Font color selector
      */
-    protected ColorFieldEditor fTextColor = null;
+    private ColorFieldEditor fTextColor = null;
     /**
      * List which display all modifiable sequence Diagram font
      */
-    protected List fClassItemList = null;
+    private List fClassItemList = null;
     /**
      * Font selector (The same is used for each modifiable font)
      */
-    protected FontFieldEditor fFont = null;
+    private FontFieldEditor fFont = null;
     /**
      * Link font when zooming selector
      */
-    protected BooleanFieldEditor fLink = null;
+    private BooleanFieldEditor fLink = null;
     /**
      * Enable tooltip selector
      */
-    protected BooleanFieldEditor fTooltip = null;
+    private BooleanFieldEditor fTooltip = null;
     /**
      * Do not take external time into account in the min max computation
      */
-    protected BooleanFieldEditor fNoExternalTime = null;
+    private BooleanFieldEditor fNoExternalTime = null;
     /**
      * Use gradient color selector
      */
-    protected BooleanFieldEditor fUseGrad = null;
+    private BooleanFieldEditor fUseGrad = null;
     /**
      * A button area.
      */
-    protected Composite fButtonArea;
+    private Composite fButtonArea;
     /**
      * SwimLane width selector
      */
-    protected IntegerFieldEditor fLifelineWidth = null;
+    private IntegerFieldEditor fLifelineWidth = null;
 
     // ------------------------------------------------------------------------
     // Methods
@@ -108,7 +108,10 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
 
     @Override
     protected Control createContents(Composite parent) {
-        parent.setLayout(new GridLayout());
+        GridLayout gl = new GridLayout();
+        gl.marginHeight = 0;
+        gl.marginWidth = 0;
+        parent.setLayout(gl);
         Composite page = new Composite(parent, SWT.NONE);
         GridLayout pageLayout = new GridLayout();
         pageLayout.numColumns = 2;
@@ -241,7 +244,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         // and all the fonts and colors
         // fonts and colors are stored for each time because
         // we are using only one FontFieldEditor
-        Set<String> keySet = SDViewPref.getInstance().fFontPref.keySet();
+        Set<String> keySet = SDViewPref.getInstance().getFontPref().keySet();
         Iterator<String> it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
@@ -253,7 +256,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
             }
         }
 
-        keySet = SDViewPref.getInstance().fBackColorPref.keySet();
+        keySet = SDViewPref.getInstance().getBackColorPref().keySet();
         it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
@@ -270,7 +273,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         fBackGroundColor.setPreferenceName(fontList[fClassItemList.getSelectionIndex()] + SDViewPref.BACK_COLOR_POSTFIX + TEMP_TAG);
         fBackGroundColor.load();
 
-        keySet = SDViewPref.getInstance().fForeColorPref.keySet();
+        keySet = SDViewPref.getInstance().getForeColorPref().keySet();
         it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
@@ -285,7 +288,7 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
         fLineColor.setPreferenceName(fontList[fClassItemList.getSelectionIndex()] + SDViewPref.FORE_COLOR_POSTFIX + TEMP_TAG);
         fLineColor.load();
 
-        keySet = SDViewPref.getInstance().fTextColorPref.keySet();
+        keySet = SDViewPref.getInstance().getTextColorPref().keySet();
         it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
@@ -352,56 +355,56 @@ public class SDViewerPage extends PreferencePage implements IWorkbenchPreference
      * @param toTemp Switch to the temporary preferences
      */
     protected void swapPref(boolean toTemp) {
-        String TAG1 = "";//$NON-NLS-1$
-        String TAG2 = TEMP_TAG;
+        String tag1 = "";//$NON-NLS-1$
+        String tag2 = TEMP_TAG;
         if (!toTemp) {
-            TAG1 = TEMP_TAG;
-            TAG2 = "";//$NON-NLS-1$
+            tag1 = TEMP_TAG;
+            tag2 = "";//$NON-NLS-1$
         }
-        Set<String> keySet = SDViewPref.getInstance().fFontPref.keySet();
+        Set<String> keySet = SDViewPref.getInstance().getFontPref().keySet();
         Iterator<String> it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
             if (prefName instanceof String) {
-                fFont.setPreferenceName((String) prefName + TAG1);
+                fFont.setPreferenceName((String) prefName + tag1);
                 fFont.load();
-                fFont.setPreferenceName((String) prefName + TAG2);
+                fFont.setPreferenceName((String) prefName + tag2);
                 fFont.store();
             }
         }
 
-        keySet = SDViewPref.getInstance().fBackColorPref.keySet();
+        keySet = SDViewPref.getInstance().getBackColorPref().keySet();
         it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
             if (prefName instanceof String) {
-                fBackGroundColor.setPreferenceName((String) prefName + TAG1);
+                fBackGroundColor.setPreferenceName((String) prefName + tag1);
                 fBackGroundColor.load();
-                fBackGroundColor.setPreferenceName((String) prefName + TAG2);
+                fBackGroundColor.setPreferenceName((String) prefName + tag2);
                 fBackGroundColor.store();
             }
         }
 
-        keySet = SDViewPref.getInstance().fForeColorPref.keySet();
+        keySet = SDViewPref.getInstance().getForeColorPref().keySet();
         it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
             if (prefName instanceof String) {
-                fLineColor.setPreferenceName((String) prefName + TAG1);
+                fLineColor.setPreferenceName((String) prefName + tag1);
                 fLineColor.load();
-                fLineColor.setPreferenceName((String) prefName + TAG2);
+                fLineColor.setPreferenceName((String) prefName + tag2);
                 fLineColor.store();
             }
         }
 
-        keySet = SDViewPref.getInstance().fTextColorPref.keySet();
+        keySet = SDViewPref.getInstance().getTextColorPref().keySet();
         it = keySet.iterator();
         while (it.hasNext()) {
             Object prefName = it.next();
             if (prefName instanceof String) {
-                fTextColor.setPreferenceName((String) prefName + TAG1);
+                fTextColor.setPreferenceName((String) prefName + tag1);
                 fTextColor.load();
-                fTextColor.setPreferenceName((String) prefName + TAG2);
+                fTextColor.setPreferenceName((String) prefName + tag2);
                 fTextColor.store();
             }
         }
This page took 0.053258 seconds and 5 git commands to generate.