Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.FieldDecorationRegistry$Entry


    }

    protected void updateDecoration(ControlDecoration decoration, IStatus status) {
        if (status != null) {
            Image newImage = null;
            FieldDecorationRegistry registry = FieldDecorationRegistry.getDefault();
            switch (status.getSeverity()) {
                case IStatus.INFO:
                    newImage = registry.getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED).getImage();
                    break;
                case IStatus.WARNING:
                    newImage = registry.getFieldDecoration(FieldDecorationRegistry.DEC_WARNING).getImage();
                    break;
                case IStatus.ERROR:
                    newImage = registry.getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage();
            }
            decoration.setDescriptionText(status.getMessage());
            decoration.setImage(newImage);
            decoration.show();
        } else {
View Full Code Here


   *
   * @param image
   *            desired image to be shown in the ImageAndMessageArea
   */
  public void setImage(Image image) {
    FieldDecorationRegistry registry = FieldDecorationRegistry.getDefault();
    registry.registerFieldDecoration("messageImage", null, image); //$NON-NLS-1$
    messageField.addFieldDecoration(registry
        .getFieldDecoration("messageImage"), //$NON-NLS-1$
        SWT.LEFT | SWT.TOP, false);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.fieldassist.FieldDecorationRegistry$Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.