List of usage examples for org.eclipse.jface.resource JFaceResources getString
public static String getString(String key)
From source file:uk.ac.gda.ui.preferences.ScaleBoxFieldEditor.java
License:Open Source License
/** * Creates a string field editor. Use the method <code>setTextLimit</code> to limit the text. * /*w ww .jav a2s .co m*/ * @param name * the name of the preference this field editor works on * @param labelText * the label text of the field editor * @param width * the width of the text input field in characters, or <code>UNLIMITED</code> for no limit * @param strategy * either <code>VALIDATE_ON_KEY_STROKE</code> to perform on the fly checking (the default), or * <code>VALIDATE_ON_FOCUS_LOST</code> to perform validation only after the text has been typed in * @param parent * the parent of the field editor's control * @since 2.0 */ public ScaleBoxFieldEditor(String name, String labelText, int width, int strategy, Composite parent) { init(name, labelText); widthInChars = width; setValidateStrategy(strategy); isValid = false; errorMessage = JFaceResources.getString("StringFieldEditor.errorMessage");//$NON-NLS-1$ createControl(parent); }
From source file:zigen.plugin.db.preference.SQLFormatPreferencePage.java
License:Open Source License
public void modifyText(ModifyEvent e) { if (!StringUtil.isNumeric(maxText.getText())) { updateStatus(JFaceResources.getString("IntegerFieldEditor.errorMessage")); return;/*from w w w. j a v a 2s.co m*/ } if (maxText.getText().length() == 0) { updateStatus(JFaceResources.getString("IntegerFieldEditor.errorMessage")); return; } updateStatus(null); }