Revision 185eb33b
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/CdmPreferencePage.java | ||
---|---|---|
13 | 13 |
import org.eclipse.swt.SWT; |
14 | 14 |
import org.eclipse.swt.layout.GridData; |
15 | 15 |
import org.eclipse.swt.layout.GridLayout; |
16 |
import org.eclipse.swt.widgets.Button; |
|
16 | 17 |
import org.eclipse.swt.widgets.Composite; |
17 | 18 |
|
19 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
|
18 | 20 |
import eu.etaxonomy.taxeditor.preference.IE4PreferencePage; |
19 | 21 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
20 | 22 |
|
... | ... | |
28 | 30 |
private boolean isApply; |
29 | 31 |
|
30 | 32 |
protected boolean isAdminPreference = false; |
33 |
protected String overrideString = Messages.GeneralPreference_allowOverride; |
|
31 | 34 |
|
32 | 35 |
public CdmPreferencePage() { |
33 | 36 |
this(null, null); |
... | ... | |
70 | 73 |
protected Composite createComposite(Composite composite) { |
71 | 74 |
Composite activateComp = new Composite(composite, SWT.NULL); |
72 | 75 |
GridLayout layout = new GridLayout(); |
73 |
if (isAdminPreference){ |
|
74 |
layout.numColumns = 2; |
|
75 |
} |
|
76 |
layout.numColumns = 2; |
|
76 | 77 |
activateComp.setLayout(layout); |
77 | 78 |
GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL); |
79 |
|
|
78 | 80 |
activateComp.setLayoutData(gridData); |
79 | 81 |
return activateComp; |
80 | 82 |
} |
81 | 83 |
|
82 | 84 |
|
85 |
protected GridData createTextGridData() { |
|
86 |
GridData sepGrid = new GridData(GridData.FILL_HORIZONTAL); |
|
87 |
sepGrid.horizontalSpan = 2; |
|
88 |
return sepGrid; |
|
89 |
} |
|
90 |
|
|
91 |
protected void getValues(){ |
|
92 |
|
|
93 |
} |
|
94 |
|
|
95 |
|
|
96 |
protected Button createAllowOverrideButton(Composite activateComp) { |
|
97 |
final Button allowOverrideCheckButton = new Button(activateComp, SWT.CHECK); |
|
98 |
allowOverrideCheckButton.setText(overrideString); |
|
99 |
GridData grid = new GridData(); |
|
100 |
grid.horizontalAlignment = SWT.END; |
|
101 |
allowOverrideCheckButton.setLayoutData(grid); |
|
102 |
return allowOverrideCheckButton; |
|
103 |
} |
|
104 |
|
|
105 |
|
|
83 | 106 |
|
84 | 107 |
} |
Also available in: Unified diff
ref #7849: improve DB preference handling and use editorpreferencePredicates keys also for local preferences