List of usage examples for org.eclipse.jface.fieldassist FieldDecoration FieldDecoration
public FieldDecoration(Image image, String description)
From source file:com.nokia.tools.variant.common.ui.wizards.dialogfields.DialogField.java
License:Open Source License
protected FieldDecoration getErrorDecoration() { if (errorDecoration == null) { FieldDecoration standardError;/* ww w.j a va2 s. c o m*/ if (hasQuickFix()) { standardError = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR_QUICKFIX); } else { standardError = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); } if (getErrorMessage() == null) { errorDecoration = standardError; } else { errorDecoration = new FieldDecoration(standardError.getImage(), getErrorMessage()); } } return errorDecoration; }
From source file:com.nokia.tools.variant.common.ui.wizards.dialogfields.DialogField.java
License:Open Source License
protected FieldDecoration getWarningDecoration() { if (warningDecoration == null) { FieldDecoration standardWarning = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_WARNING); if (getWarningMessage() == null) { warningDecoration = standardWarning; } else {// www . j ava 2s .c om warningDecoration = new FieldDecoration(standardWarning.getImage(), getWarningMessage()); } } return warningDecoration; }
From source file:org.eclipse.birt.chart.ui.swt.fieldassist.AssistField.java
License:Open Source License
/** * Returns error decoration./*from w ww . j av a2s . co m*/ * * @return */ public FieldDecoration getErrorDecoration() { if (errorDecoration == null) { FieldDecoration standardError; if (hasQuickFix()) { standardError = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR_QUICKFIX); } else { standardError = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); } if (getErrorMessage() == null) { errorDecoration = standardError; } else { errorDecoration = new FieldDecoration(standardError.getImage(), getErrorMessage()); } } if (getErrorMessage() != null) { errorDecoration.setDescription(getErrorMessage()); } return errorDecoration; }
From source file:org.eclipse.birt.chart.ui.swt.fieldassist.AssistField.java
License:Open Source License
/** * Returns warning decoration.// w w w . j av a2 s . c o m * * @return */ public FieldDecoration getWarningDecoration() { if (warningDecoration == null) { FieldDecoration standardWarning = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_WARNING); if (getWarningMessage() == null) { warningDecoration = standardWarning; } else { warningDecoration = new FieldDecoration(standardWarning.getImage(), getWarningMessage()); } } return warningDecoration; }
From source file:org.eclipse.wb.internal.swing.MigLayout.model.ui.ErrorMessageTextField.java
License:Open Source License
public ErrorMessageTextField(Composite parent, int style) { super(parent, style, new org.eclipse.jface.fieldassist.TextControlCreator()); // prepare decoration {/*from w w w. j ava 2 s .c om*/ FieldDecoration standardDecoration = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); m_fieldDecoration = new FieldDecoration(standardDecoration.getImage(), ""); } }
From source file:org.elbe.relations.internal.utility.FormUtility.java
License:Open Source License
/** * Creates an instance of <code>FieldDecoration</code> to decorate a * required field with the specified image. * //from w w w. j a v a2 s . co m * @param inImage * Image * @return FieldDecoration */ public final static FieldDecoration createRequiredDecoration(final Image inImage) { return new FieldDecoration(inImage, RelationsMessages.getString("RequiredText.deco.required")); //$NON-NLS-1$ }