/**********************************************************************
- * 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
/**
* Temporary preferences tag
*/
- protected static final String TEMP_TAG = SDViewPref.TEMP_TAG;
+ private static final String TEMP_TAG = SDViewPref.TEMP_TAG;
// ------------------------------------------------------------------------
// Attributes
/**
* 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
@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;
// 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();
}
}
- keySet = SDViewPref.getInstance().fBackColorPref.keySet();
+ keySet = SDViewPref.getInstance().getBackColorPref().keySet();
it = keySet.iterator();
while (it.hasNext()) {
Object prefName = it.next();
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();
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();
* @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();
}
}