A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / dialogs / MessageLine.java
index 71577cf..dc9ac8d 100644 (file)
@@ -14,10 +14,11 @@ import org.eclipse.swt.widgets.Composite;
  * A message line displaying a status.
  */
 public class MessageLine extends CLabel {
-       
+
        private static final RGB ERROR_BACKGROUND_RGB = new RGB(230, 226, 221);
-       
+
        private Color fNormalMsgAreaBackground;
+
        private Color fErrorMsgAreaBackground;
 
        /**
@@ -28,15 +29,15 @@ public class MessageLine extends CLabel {
        }
 
        /**
-        * Creates a new message line as a child of the parent and with the given SWT stylebits.
+        * Creates a new message line as a child of the parent and with the given
+        * SWT stylebits.
         */
        public MessageLine(Composite parent, int style) {
                super(parent, style);
-               fNormalMsgAreaBackground= getBackground();
-               fErrorMsgAreaBackground= null;
+               fNormalMsgAreaBackground = getBackground();
+               fErrorMsgAreaBackground = null;
        }
 
-       
        private Image findImage(IStatus status) {
                if (status.isOK()) {
                        return null;
@@ -51,34 +52,35 @@ public class MessageLine extends CLabel {
        }
 
        /**
-        * Sets the message and image to the given status.
-        * <code>null</code> is a valid argument and will set the empty text and no image
+        * Sets the message and image to the given status. <code>null</code> is a
+        * valid argument and will set the empty text and no image
         */
        public void setErrorStatus(IStatus status) {
                if (status != null) {
-                       String message= status.getMessage();
+                       String message = status.getMessage();
                        if (message != null && message.length() > 0) {
                                setText(message);
                                setImage(findImage(status));
                                if (fErrorMsgAreaBackground == null) {
-                                       fErrorMsgAreaBackground= new Color(getDisplay(), ERROR_BACKGROUND_RGB);
+                                       fErrorMsgAreaBackground = new Color(getDisplay(),
+                                                       ERROR_BACKGROUND_RGB);
                                }
                                setBackground(fErrorMsgAreaBackground);
                                return;
                        }
-               }               
+               }
                setText("");
                setImage(null);
-               setBackground(fNormalMsgAreaBackground);        
+               setBackground(fNormalMsgAreaBackground);
        }
-       
+
        /*
         * @see Widget#dispose()
         */
        public void dispose() {
                if (fErrorMsgAreaBackground != null) {
                        fErrorMsgAreaBackground.dispose();
-                       fErrorMsgAreaBackground= null;
+                       fErrorMsgAreaBackground = null;
                }
                super.dispose();
        }