directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1688694 - /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/StringValueDecorator.java
Date Wed, 01 Jul 2015 17:27:32 GMT
Author: elecharny
Date: Wed Jul  1 17:27:32 2015
New Revision: 1688694

URL: http://svn.apache.org/r1688694
Log:
Add the possibility to inject an Image in the decorator

Modified:
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/StringValueDecorator.java

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/StringValueDecorator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/StringValueDecorator.java?rev=1688694&r1=1688693&r2=1688694&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/StringValueDecorator.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/StringValueDecorator.java
Wed Jul  1 17:27:32 2015
@@ -31,6 +31,9 @@ import org.eclipse.swt.widgets.Shell;
  */
 public class StringValueDecorator extends TableDecorator<StringValueWrapper>
 {
+    /** The associated image, if any */
+    private Image image;
+    
     /**
      * Create a new instance of StringValueDecorator
      * @param parentShell The parent Shell
@@ -41,6 +44,15 @@ public class StringValueDecorator extend
         setDialog( new StringValueDialog( parentShell, attributeName ) );
     }
     
+    
+    /** 
+     * Adds an Image to this decorator 
+     * @param image The Image
+     */
+    public void setImage( Image image )
+    {
+        this.image = image;
+    }
 
     /**
      * Construct the label for a String.
@@ -66,7 +78,7 @@ public class StringValueDecorator extend
      */
     public Image getImage( Object element )
     {
-        return null;
+        return image;
     };
 
     



Mime
View raw message