当前位置: 首页>>代码示例>>Java>>正文


Java JFaceResources.getString方法代码示例

本文整理汇总了Java中org.eclipse.jface.resource.JFaceResources.getString方法的典型用法代码示例。如果您正苦于以下问题:Java JFaceResources.getString方法的具体用法?Java JFaceResources.getString怎么用?Java JFaceResources.getString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.resource.JFaceResources的用法示例。


在下文中一共展示了JFaceResources.getString方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkState

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
protected boolean checkState() {

        String msg = null;

        String path = getTextControl().getText();
        if (path != null) {
			path = path.trim();
		} else {
			path = "";//$NON-NLS-1$
		}
        if (path.length() == 0) {
            if (!isEmptyStringAllowed()) {
				msg = getErrorMessage();
			}
        } else {
            File file = new File(path);
            if (file.isFile()) {
                if (enforceAbsolute && !file.isAbsolute()) {
					msg = JFaceResources
                            .getString("FileFieldEditor.errorMessage2");//$NON-NLS-1$
				}
            } else {
                msg = getErrorMessage();
            }
        }

        if (msg != null) { // error
            showErrorMessage(msg);
            return false;
        }

        // OK!
        clearErrorMessage();
        return true;
    }
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:36,代码来源:ProjectFileFieldEditor.java

示例2: PersistBoundsAction

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
PersistBoundsAction() {
	super(JFaceResources.getString("PopupDialog.persistBounds"), //$NON-NLS-1$
			IAction.AS_CHECK_BOX);
	setChecked(persistLocation && persistSize);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:6,代码来源:PopupDialog.java

示例3: PersistSizeAction

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
PersistSizeAction() {
	super(JFaceResources.getString("PopupDialog.persistSize"), //$NON-NLS-1$
			IAction.AS_CHECK_BOX);
	setChecked(persistSize);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:6,代码来源:PopupDialog.java

示例4: PersistLocationAction

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
PersistLocationAction() {
	super(JFaceResources.getString("PopupDialog.persistLocation"), //$NON-NLS-1$
			IAction.AS_CHECK_BOX);
	setChecked(persistLocation);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:6,代码来源:PopupDialog.java

示例5: ProgressTask

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
private ProgressTask() {
    super(JFaceResources.getString("ProgressMonitorDialog.title"));
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:4,代码来源:ProgressTask.java

示例6: buildTitle

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public String buildTitle(String dialogTitle) {
	return dialogTitle == null ? JFaceResources.getString("Problem_Occurred") : //$NON-NLS-1$
			dialogTitle;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:ExceptionDetailsErrorDialog.java

示例7: ExceptionDetailsErrorDialog

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Creates an error dialog. Note that the dialog will have no visual
 * representation (no widgets) until it is told to open.
 * <p>
 * Normally one should use <code>openError</code> to create and open one
 * of these. This constructor is useful only if the error object being
 * displayed contains child items <it>and </it> you need to specify a mask
 * which will be used to filter the displaying of these children.
 * </p>
 * 
 * @param parentShell
 *            the shell under which to create this dialog
 * @param dialogTitle
 *            the title to use for this dialog, or <code>null</code> to
 *            indicate that the default title should be used
 * @param message
 *            the message to show in this dialog, or <code>null</code> to
 *            indicate that the error's message should be shown as the
 *            primary message
 * @param status
 *            the error to show to the user
 * @param displayMask
 *            the mask to use to filter the displaying of child items, as
 *            per <code>IStatus.matches</code>
 * @see org.eclipse.core.runtime.IStatus#matches(int)
 */
public ExceptionDetailsErrorDialog(Shell parentShell, String dialogTitle, String message,
        IStatus status, int displayMask) {
    super(parentShell);
    this.title = dialogTitle == null ? JFaceResources
            .getString("Problem_Occurred") : //$NON-NLS-1$
            dialogTitle;
    this.message = message == null ? status.getMessage()
            : JFaceResources
                    .format(
                            "Reason", new Object[] { message, status.getMessage() }); //$NON-NLS-1$
    this.status = status;
    this.displayMask = displayMask;
    setShellStyle(getShellStyle() | SWT.RESIZE);
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:41,代码来源:ExceptionDetailsErrorDialog.java

示例8: TextFieldEditor

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Creates a string field editor. Use the method <code>setTextLimit</code>
 * to limit the text.
 * 
 * @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 TextFieldEditor(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);
}
 
开发者ID:evilwan,项目名称:raptor-chess-interface,代码行数:31,代码来源:TextFieldEditor.java

示例9: TextAreaFieldEditor

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Creates a string field editor.
 * Use the method <code>setTextLimit</code> to limit the text.
 *
 * @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 TextAreaFieldEditor(String name, String labelText, Composite parent, int width, int height)
{
    init(name, labelText);
    widthInChars = width;
    heightInChars = height;
    isValid = false;
    errorMessage = JFaceResources
            .getString("StringFieldEditor.errorMessage");//$NON-NLS-1$
    createControl(parent);
}
 
开发者ID:kasemir,项目名称:org.csstudio.display.builder,代码行数:25,代码来源:TextAreaFieldEditor.java

示例10: DataAdapterErrorDialog

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Creates an error dialog. Note that the dialog will have no visual
 * representation (no widgets) until it is told to open.
 * <p>
 * Normally one should use <code>openError</code> to create and open one
 * of these. This constructor is useful only if the error object being
 * displayed contains child items <it>and </it> you need to specify a mask
 * which will be used to filter the displaying of these children. The error
 * dialog will only be displayed if there is at least one child status
 * matching the mask.
 * </p>
 * 
 * @param parentShell
 *            the shell under which to create this dialog
 * @param dialogTitle
 *            the title to use for this dialog, or <code>null</code> to
 *            indicate that the default title should be used
 * @param message
 *            the message to show in this dialog, or <code>null</code> to
 *            indicate that the error's message should be shown as the
 *            primary message
 * @param status
 *            the error to show to the user
 * @param displayMask
 *            the mask to use to filter the displaying of child items, as
 *            per <code>IStatus.matches</code>
 * @see org.eclipse.core.runtime.IStatus#matches(int)
 */
public DataAdapterErrorDialog(Shell parentShell, String dialogTitle, String message,
		IStatus status) {
	super(parentShell);
	this.title = dialogTitle == null ? JFaceResources
			.getString("Problem_Occurred") : //$NON-NLS-1$
			dialogTitle;
	this.message = message == null ? status.getMessage()
			: JFaceResources
					.format(
							"Reason", new Object[] { message, status.getMessage() }); //$NON-NLS-1$
	this.status = status;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:41,代码来源:DataAdapterErrorDialog.java

示例11: NStringFieldEditor

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Creates a string field editor. Use the method <code>setTextLimit</code> to limit the text.
 * 
 * @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 NStringFieldEditor(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);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:NStringFieldEditor.java

示例12: FontFieldEditorExtended

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/**
 * Creates a font field editor with an optional preview area.
 * 
 * @param name
 *            the name of the preference this field editor works on
 * @param labelText
 *            the label text of the field editor
 * @param previewAreaText
 *            the text used for the preview window. If it is <code>null</code> there will be no
 *            preview area,
 * @param parent
 *            the parent of the field editor's control
 */
public FontFieldEditorExtended(	final String name,
								final String labelText,
								final String previewAreaText,
								final Composite parent) {
	init(name, labelText);

	_previewAreaText = previewAreaText;
	_buttonText = JFaceResources.getString("openChange"); //$NON-NLS-1$

	createControl(parent);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:FontFieldEditorExtended.java


注:本文中的org.eclipse.jface.resource.JFaceResources.getString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。