-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[26218] add nutrition multiplicator to preference and optifier
- Loading branch information
Showing
6 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...elexis.base.ch.arzttarife.model/src/ch/elexis/base/ch/arzttarife/ArzttarifeConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package ch.elexis.base.ch.arzttarife; | ||
|
||
public class ArzttarifeConstants { | ||
|
||
public static final String NUTRITION_MULTIPLICATOR_NAME = "NUT"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
bundles/ch.elexis.base.ch.arzttarife/src/ch/elexis/tarmedprefs/NutritionPrefs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2006, G. Weirich and Elexis | ||
* 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: | ||
* G. Weirich - initial implementation | ||
* | ||
*******************************************************************************/ | ||
|
||
package ch.elexis.tarmedprefs; | ||
|
||
import org.eclipse.jface.preference.PreferencePage; | ||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.GridLayout; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Control; | ||
import org.eclipse.swt.widgets.Label; | ||
import org.eclipse.ui.IWorkbench; | ||
import org.eclipse.ui.IWorkbenchPreferencePage; | ||
|
||
import ch.elexis.base.ch.arzttarife.ArzttarifeConstants; | ||
import ch.elexis.core.ui.preferences.ConfigServicePreferenceStore; | ||
import ch.elexis.core.ui.preferences.ConfigServicePreferenceStore.Scope; | ||
import ch.elexis.core.ui.preferences.inputs.MultiplikatorEditor; | ||
import ch.elexis.core.ui.util.SWTHelper; | ||
|
||
public class NutritionPrefs extends PreferencePage implements IWorkbenchPreferencePage { | ||
|
||
@Override | ||
public void init(IWorkbench workbench) { | ||
setPreferenceStore(new ConfigServicePreferenceStore(Scope.MANDATOR)); | ||
setTitle("Ernährungsberatung"); | ||
} | ||
|
||
@Override | ||
protected Control createContents(Composite parent) { | ||
Composite ret = new Composite(parent, SWT.NONE); | ||
ret.setLayout(new GridLayout()); | ||
new Label(ret, SWT.NONE).setText(Messages.Preferences_pleaseEnterMultiplier); | ||
MultiplikatorEditor me = new MultiplikatorEditor(ret, ArzttarifeConstants.NUTRITION_MULTIPLICATOR_NAME); | ||
me.setLayoutData(SWTHelper.getFillGridData(1, true, 1, false)); | ||
|
||
return ret; | ||
} | ||
|
||
} |