1 package org.argosfields.preference;
2
3 import org.argosfields.resource.ResourceManager;
4 import org.argosfields.widget.MultiLineInputDialog;
5 import org.eclipse.jface.dialogs.Dialog;
6 import org.eclipse.jface.preference.StringButtonFieldEditor;
7 import org.eclipse.swt.widgets.Composite;
8
9 /***
10 * LargeStringFieldEditor.java
11 * @author Xavier Cho
12 * @version $Revision: 1.1 $ $Date: 2004/04/15 05:43:55 $
13 */
14 public class LargeStringFieldEditor extends StringButtonFieldEditor {
15
16 public LargeStringFieldEditor() {
17 }
18
19 /***
20 * @param name
21 * @param labelText
22 * @param parent
23 */
24 public LargeStringFieldEditor(final String name, final String labelText,
25 final Composite parent) {
26 super(name, labelText, parent);
27 }
28
29 /***
30 * @see org.eclipse.jface.preference.StringButtonFieldEditor#changePressed()
31 */
32 protected String changePressed() {
33 ResourceManager resources = ResourceManager.getInstance();
34
35 String label = getLabelText();
36 String message = resources.getString("message.pref.input",
37 new String[] {label});
38
39 MultiLineInputDialog dialog = new MultiLineInputDialog(getShell(),
40 label, message, getStringValue(), null);
41
42 if (dialog.open() == Dialog.OK) {
43 return dialog.getValue();
44 }
45
46 return getStringValue();
47 }
48 }
This page was automatically generated by Maven